开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜