【问题标题】:MSBuild with publish profiles and configuration merges具有发布配置文件和配置合并的 MSBuild
【发布时间】:2014-02-13 14:55:18
【问题描述】:

我制作了一个小 ps 脚本来使用 MSBuild 执行我的 Web 应用程序部署包。由于我已经发布了配置文件,所以我想出了这个命令行:

.\MSBuild.exe "C\path\project.csproj" /p:DeployOnBuild=true /p:PublishProfile="C:\path\profile.pubxml" /p:VisualStudioVersion=11.0

效果很好,只做一件事。即使在发布配置文件中指定了 Web.config 合并也不会完成。

我尝试添加 /p:Configuration=myConfig 参数。但是我收到了一些错误,没有提供输出路径

微软大声笑..我怎样才能让它工作?

【问题讨论】:

  • +1 感谢您提及 /p:VisualStudioVersion=11.0 参数,它修复了在发布到 PublishProfile 配置中指定的所需位置时复制 obj\Debug\Package\PackageTmp 目录的内容(在具有VS2010 和 VS2012 都已安装)。

标签: powershell msbuild


【解决方案1】:

我在构建服务器上安装了 VS 更新 3,它现在正在运行。

【讨论】:

    【解决方案2】:

    您是否安装 和 导入

    <Import Project="$(MSBuildExtensionsPath)\MSBuildCommunityTasks\MSBuild.Community.Tasks.Targets" />
    

    还有:

    http://stackoverflow.com/questions/16176894/how-to-build-visual-studio-2012-publishing-profiles-on-a-build-server-with-msbui#_=_
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-12-11
      • 1970-01-01
      • 1970-01-01
      • 2017-11-06
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多