Publish web application from MSBuild Script using VS2010 targets resets working directory

Posted by Raoul on Stack Overflow See other posts from Stack Overflow or by Raoul
Published on 2010-09-01T13:40:03Z Indexed on 2011/01/05 20:54 UTC
Read the original article Hit count: 253

I am trying to automatically publish and deploy my .Net 4 web application automatically from a build script to be run by our continuous integration server. I am using the new _WPPCopyWebApplication target from VS2010 to perform the publish, however it appears to reset the current working directory of the msbuild project to c:\ this causes my prebuild steps to fail as they have relative paths to some external tools. The task I am running from our master.build file is as follows:

<Target Name="PublishWeb">
    <MSBuild 
        Projects="$(ProjectPath)"
        Targets="ResolveReferences;_WPPCopyWebApplication"
        Properties="WebProjectOutputDir=$(DeployPath);OutDir=$(TempOutputFolder)$(WebOutputFolder)\;OutputPath=$(ProjectPath)\bin\Debug;" />
</Target>    

This does not happen when using the legacy _CopyWebApplication. Does anyone have any idea how to resolve this problem?

© Stack Overflow or respective owner

Related posts about visual-studio-2010

Related posts about deployment