2010 年 Web 部署项目的奇怪问题

发布于 2024-09-18 17:43:45 字数 482 浏览 2 评论 0原文

我正在将我的 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)))"。

i'm in the process or upgrading my CI configuration to Web Deployment projects 2010 (from 2008)

i'm geting a really strange issue durin build as shown below - i've been looking into it a a few hours to no resolve, and am starting to think the issue is elsewhere...)

C:\Program Files (x86)\MSBuild\Microsoft\WebDeployment\v10.0\Microsoft.WebDeployment.targets(103, 46): error MSB4092: An unexpected token ")" was found at character position 174 in condition "'$(_ExcludeWAPBaseIntermediateOutputPath)' == ''
And !$([System.IO.Path]::IsPathRooted($(_ExcludeWAPBaseIntermediateOutputPath)))".

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

跨年 2024-09-25 17:43:45

我也面临着同样的问题。通过使用正确的 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>

I was also facing the same issue. Resolved by using correct tool version for MSBuild which is 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>
恍梦境° 2024-09-25 17:43:45

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

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

Out of the blue, I think that your CI server doesn't use MSBuild to run the Build, so the property function $([System.IO.Path]::IsPathRooted(...) is not recognized.

Check that MSBuild 4 is the version used by your CI server.

柠檬心 2024-09-25 17:43:45

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

Although i had selected to use MSBUILD version 4 and the MSBUILD tools 4.0 it still failed - upon upgrading to the latest version of TeamCity all the issues went away :)

凝望流年 2024-09-25 17:43:45

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

If you are using a Visual Studio command prompt to run MSBuild, make sure that it is a "Visual Studio Command Prompt (2010)"

无敌元气妹 2024-09-25 17:43:45

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

<property name="nant.settings.currentframework" value="net-4.0" />

I was using Nant on an old solution and needed to set the Fx version in nant

<property name="nant.settings.currentframework" value="net-4.0" />
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文