When I change the OutputPath parameter using msbuild via nant, my web application does not compile.
Only when I set OutputPath=bin does my web application compile successfully.
This code currently works for all my开发者_如何学编程 other projects types except web applications
<echo message="Building ${solution} Solution" />
<exec program="${msbuild.exe}" workingdir="${current.dir}">
<arg value="/t:Rebuild" />
<arg value="/p:Configuration=Release" />
<arg value="/p:Platform="Any CPU"" />
<arg value="/p:AssemblyVersion=${CCNetLabel}" />
<arg value="/p:PublishVersion=${CCNetLabel}" />
<arg value="/p:ApplicationVersion=${CCNetLabel}" />
<arg value="/p:OutputPath=${temp.output}" />
<arg value="${solution}" />
</exec>
$(OutDir) is the preferred property to specify; it is derived from $(OutputPath), and $(OutDir) is the preferred property to specify, even though $(OutputPath) is usually specified in the project file. Try setting /p:OutDir=${temp.output} instead.
精彩评论