开发者

Why does changing the OutputPath when using MsBuild not compile websites?

开发者 https://www.devze.com 2023-03-15 18:35 出处:网络
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.

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=&quot;Any CPU&quot;" />
  <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.

0

精彩评论

暂无评论...
验证码 换一张
取 消