Web applications 为什么在使用MsBuild时更改OutputPath不会编译网站?

Web applications 为什么在使用MsBuild时更改OutputPath不会编译网站?,web-applications,msbuild,nant,Web Applications,Msbuild,Nant,当我通过nant使用msbuild更改OutputPath参数时,我的web应用程序不会编译 只有当我设置OutputPath=bin时,我的web应用程序才能成功编译 此代码目前适用于除web应用程序之外的所有其他项目类型 <echo message="Building ${solution} Solution" /> <exec program="${msbuild.exe}" workingdir="${current.dir}"> <arg value=

当我通过nant使用msbuild更改OutputPath参数时,我的web应用程序不会编译

只有当我设置OutputPath=bin时,我的web应用程序才能成功编译

此代码目前适用于除web应用程序之外的所有其他项目类型

<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)是要指定的首选属性;它是从$(OutputPath)派生的,并且$(OutDir)是首选的指定属性,即使$(OutputPath)通常在项目文件中指定。请尝试设置/p:OutDir=${temp.output}。

Hi,我尝试了您的建议,它为web应用程序生成,但是它不会将任何文件复制到${temp.output}目录。