Does the MSBuildShellExtension app work with Visual Studio 2008 SP1 solutions?

Oct 23, 2008 at 6:23 PM
I'm getting an error when trying to build a Visual Studio 2008 SP1 solution (.Net 3.5 Web App).

"File format version is not recognized.  MSBuild can only read solution files between 7.0 and 9.0, inclusive."

Misc:  I have built the solution from the command line using the MSBuild.exe from (C:\Windows\Microsoft.NET\Framework\v3.5)

Thanks
Coordinator
Oct 28, 2008 at 9:17 AM
I'm using MSBuid Shell Extension with VS2008 SP1 to build sln files. Have you configured the tool to use .NET 3.5? In the configuration (found through the program group), you need to select Extensions, select the file types you are building with .NET 3.5 and select .NET 3.5 in the .NET version combobox. This should do the trick.

Regards,
Thomas Ardal
Nov 11, 2008 at 9:29 AM
Thomas: Thanks. I had the same issue and it resolved my problem :)
Apr 23, 2009 at 4:28 PM
I am following Thomas's instruction to configure.  It works on the *.proj file, but I met an error when right click on the *.sln file.  The error message shown below:

'"C:\Program Files\microsoft visual studio 8\vc\vcvarsall.bat"' is not a build-in or external command.

Does you know how to fix this problem?
Coordinator
Apr 23, 2009 at 4:43 PM
Sounds weird. Try looking at the keys beneath HKEY_CURRENT_USER\Software\Ardal\MSBuildShellExtension\Extensions\sln in registry. Which keys are present and what are their value?
Apr 23, 2009 at 4:46 PM
I have two items:

1. DotNetVersion = v3.5
2. Targets = Build;Clean;Rebuild

I just don't know how you call ""C:\Program Files\microsoft visual studio 8\vc\vcvarsall.bat"" batch.  I can't find any keyword in your source.        
Coordinator
Apr 23, 2009 at 4:55 PM
Thats because it's not in the source code but in registry :)

Try looking beneath the key HKEY_CLASSES_ROOT\SystemFileAssociations\.sln\shell

There should be a key for each build target. Try looking at the default REG_SZ for each command and look at the path. Should look something like this:

cmd.exe /k ""%%windir%%\Microsoft.NET\Framework\v3.5\MSBuild.exe" "%1" /t:Build /v:m /p:Configuration=Debug /l:MSBuildErrorListLogger,"C:\Programmer\MSBuildShellExtension\MSBuildShellExtension.dll"" & exit
Apr 23, 2009 at 4:57 PM
Yes, I checked.  Here is my value:

cmd.exe /k ""%%windir%%\Microsoft.NET\Framework\v3.5\MSBuild.exe" "%1" /t:Build /v:n /p:Configuration=Debug /l:MSBuildErrorListLogger,"C:\Program Files\MSBuildShellExtension\MSBuildShellExtension.dll"" & exit

It looks like just the same as you.
Coordinator
Apr 23, 2009 at 5:00 PM
Try search for the string "C:\Program Files\microsoft visual studio 8\vc\vcvarsall.bat" in registry. Is it specified anywhere which looks to have relations to MSBuildShellExtension?
Apr 23, 2009 at 5:08 PM
Thomas,

You are right!!

There is a registry "HKEY_CLASSES_ROOT\VisualStudio.Launcher.sln\Shell\Build\command" included this path !!!

I changed it and it works now!!

Thank you!!