Help with MSBuild.ExtensionPack.VisualStudio.VSDevEnv

Jun 25, 2012 at 4:19 PM

I'm moving an existing build script which works fine using the VS command prompt into TFS.  Everything is working fine up to the point where MSBuild.ExtensionPack.VisualStudio.VSDevEnv is used.  This is a 2008 project.

 

 

<MSBuild.ExtensionPack.VisualStudio.VSDevEnv FilePath="$(ProjectPath)" Configuration="Release|Any CPU" Rebuild="true

 

 

><

Output TaskParameter="ExitCode" PropertyName="ErrorCode"

/></

MSBuild.ExtensionPack.VisualStudio.VSDevEnv

>

The following error occurs:

The specified task executable "devenv.exe" could not be run. The system cannot find the file specified

 The VSINSTALLDIR variable is properly created and pointing to the right place on the build machine registry.  The InstallDir key to the devenv.exe folder is present and correct.  (Hard coding the path also didn't work)

 

<VSINSTALLDIR Condition="'$(VSINSTALLDIR)' == ''">

$(Registry:HKEY_LOCAL_MACHINE\\SOFTWARE\Microsoft\VisualStudio\9.0@InstallDir)

</VSINSTALLDIR>

The InstallDir key points to D:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\

It just can't seem to locate the executable for some reason.

 Thanks in advance.

 

Coordinator
Jun 25, 2012 at 10:12 PM

What version of the extension pack are you using?

Is this a 64 bit OS?

Mike

Jun 26, 2012 at 9:16 PM

I ended up resolving this.  The MSBuild Platform setting was on Auto rather than x86 in the build definition settings.  I'm not sure why that would result in a file not found on devenv.exe.  Maybe it really meant it couldn't find MSBuild but everything appears similar under Program Files vs. Program Files(x86).