Web部署项目2010的奇怪问题

时间:2010-09-12 03:15:46

标签: msbuild continuous-integration web-deployment-project

我正在进行此过程或将我的CI配置升级到Web部署项目2010(自2008年起)

我正在制作一个非常奇怪的问题,如下图所示 - 我一直在研究它几个小时到没有解决,我开始认为这个问题在其他地方......)

  

C:\ Program Files(x86)\ MSBuild \ Microsoft \ WebDeployment \ v10.0 \ Microsoft.WebDeployment.targets(103,46):错误MSB4092:在条件位置174处发现了意外的令牌“)” “'$(_ ExcludeWAPBaseIntermediateOutputPath)'==''                                                      并且!$([System.IO.Path] :: IsPathRooted($(_ ExcludeWAPBaseIntermediateOutputPath)))“。

5 个答案:

答案 0 :(得分:10)

我也面临同样的问题。通过使用MSBuild的正确工具版本(4.0

)解决
<tasks>
  <msbuild>
    <executable>**C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe**</executable>
    <workingDirectory></workingDirectory>
    <projectFile></projectFile>
    <buildArgs>/noconsolelogger </buildArgs>
    <targets>RunFxcop</targets>
    <logger>C:\Program Files\CruiseControl.NET\Server\ThoughtWorks.CruiseControl.MsBuild.dll</logger>
    <timeout>3600</timeout>
  </msbuild>
</tasks>

答案 1 :(得分:1)

出乎意料的是,我认为您的CI服务器不使用MSBuild来运行Build,因此无法识别属性函数$([System.IO.Path]::IsPathRooted(...)

检查MSBuild 4是否为CI服务器使用的版本。

答案 2 :(得分:0)

虽然我选择使用MSBUILD版本4和MSBUILD工具4.0但它仍然失败 - 升级到最新版本的TeamCity后,所有问题都消失了:)

答案 3 :(得分:0)

如果您使用Visual Studio命令提示符运行MSBuild,请确保它是“Visual Studio命令提示符(2010)”

答案 4 :(得分:0)

我在旧解决方案上使用Nant,需要在Nant中设置Fx版本

<property name="nant.settings.currentframework" value="net-4.0" />
相关问题