【问题标题】:Teamcity not building my .SLN in release modeTeamcity 未在发布模式下构建我的 .SLN
【发布时间】:2011-10-27 09:42:21
【问题描述】:

我在 Teamcity 6.5 中使用“SLN Runner”为 VS 2008 解决方案创建了一个发布配置项目。我的调试解决方案与 PDB 文件一起构建得很好 - 但是我根本无法在发布模式下构建东西,而且它会坚持默认为 x64 架构。

我尝试了以下方法:

  • 将 proj 文件显式设置为发布模式
  • 设置构建参数以通过 /platform:anycpu 和 /configuration:release 显式发送到 MSBuild

我在生成的 .sln.proj 文件中注意到以下代码(乍一看)不正确,并且两种配置的配置都设置为调试模式?

 <ItemGroup Condition=" ('$(Configuration)' == 'Debug') and ('$(Platform)' == 'Any CPU') ">
    <BuildLevel0 Include="MySolution.csproj">
      <Configuration>Debug</Configuration>
      <Platform>AnyCPU</Platform>
    </BuildLevel0>
  </ItemGroup>


<ItemGroup Condition=" ('$(Configuration)' == 'Release') and ('$(Platform)' == 'Any CPU') ">
    <BuildLevel0 Include="MySolution.csproj">
      <Configuration>Debug</Configuration>
      <Platform>AnyCPU</Platform>
    </BuildLevel0>
  </ItemGroup>

感谢任何帮助:

【问题讨论】:

  • 所以您尝试将 /p:Configuration=Release 显式传递给 msbuild.exe?
  • 是的,它完全忽略它并发送 /p:Configuration=Debug

标签: c# visual-studio svn teamcity solution


【解决方案1】:

听起来可能很愚蠢,但您的解决方案中的所有项目是否都包含用于发布的Any CPU 平台配置?

这几次让我们感到困惑,有些项目只针对 x86 等

【讨论】:

    猜你喜欢
    • 2012-12-10
    • 2014-08-18
    • 1970-01-01
    • 2021-01-23
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-10-18
    • 1970-01-01
    相关资源
    最近更新 更多