2011-06-28 54 views
0

当我使用msbuild通过nant更改OutputPath参数时,我的web应用程序无法编译。为什么在使用MsBuild不编译网站时更改OutputPath?

只有当我设置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> 

回答

0

$(OUTDIR)是首选属性来指定;它是从$(OutputPath)派生而来的,并且$(OutDir)是要指定的首选属性,即使通常在项目文件中指定了$(OutputPath)。改为尝试设置/p:OutDir=${temp.output}。

+0

嗨,我试过你的建议,它为web应用程序构建,但它不会将任何文件复制到$ {temp.output}目录。 – Lennox

相关问题