Help with VSDevEnv task

Feb 29, 2012 at 5:57 PM


I am trying to compile a 1.1 .NET Library with the VSDevEnv task and I always get this error. The project compiles fine localy as-per-usual :) but not on the build.

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

Any help with what exaclty is it complaining about?

I have all dependencies resolving to a project path and files are present. If I open the solution on the build I can build it fine asis.


Feb 29, 2012 at 6:25 PM

Can you post a sample of how you are using the task

Feb 29, 2012 at 6:59 PM

you bet.

<?xml version="1.0" encoding="utf-8"?>

<Project DefaultTargets="Default" xmlns="">


   <Import Project="$(MSBuildExtensionsPath)\ExtensionPack\4.0\MSBuild.ExtensionPack.tasks"/>


 <MSDevEnv Include="$(MSBuildProjectDirectory)\Framework_1.1.sln"></MSDevEnv>



 <Target Name="Default">


<MSBuild.ExtensionPack.VisualStudio.VSDevEnv FilePath="@(MSDevEnv)" Configuration="Debug|Any CPU" Rebuild="true" Version="7.0" >

     <Output TaskParameter="ExitCode" PropertyName="Exit" />


   <Message Text="ExitCode: $(Exit)"/>




I am building on a x64 bit machine and have my build definition set to x86.


Mar 2, 2012 at 5:41 PM

Alright I figured it out,

I got the source saw the registery key is looking for the InstallDir key. My 7.0 installation does not have this key. Changing the version to 7.1 works.

I did run a test and the logging failed as it threw an error along the lines of the log was not initialized. So perhaps this would require a fix?

I also tried using  the ToolPath attribtue of the base classe to try to override the path but that didn't work. Perhaps all VS tasks should behave use the same to look up the tool to use? I like the VB6 poiting to the task and dislike I cannot do the same with the VSDevEnv.

My 2 cents, You are still doing great work keep it up!

Mar 2, 2012 at 7:32 PM
Edited Mar 2, 2012 at 7:33 PM

Figure a few more things out an here they are. This is VS2003 related, not MSBuild issues.

1. VSDevEnv and 7.1 Task fails with "Debug|Any CPU" Config on x64 Machine (x86 untested)

How to Fix: remove "|Any CPU"

2. VSDevEnv and 7.1 cannot build Database projects. It hangs at the MSbuild command becaused the project on the build server (via VS2003 IDE?) Is trying to establish a connection to the database itself.

How to Fix: Make sure you only build the vbproj you want instead of building from the solution file.