VS2015在构建解决方案中发布多个Web项目
问题描述:
我有三个Web项目(Site1,Site2和Web.Shared)的解决方案。VS2015在构建解决方案中发布多个Web项目
我已经定义发布个人资料全部三个项目。我必须发布每个项目以部署对部署文件夹的更改。我试过VS2012 publish multiple projects in a solution和https://blogs.msdn.microsoft.com/webdev/2013/09/22/web-publish-how-to-automate-multi-project-publish-with-file-system/。这没有帮助。
有没有办法在发布期间发布所有的三个项目?
答
您可以使用PowerShell使用下面的命令来运行的MSBuild:
& "C:\Program Files (x86)\MSBuild\14.0\Bin\msbuild.exe" SolutionXXXX.sln /p:Configuration=Release /p:AllowUntrustedCertificate=true /p:DeployOnBuild=true /p:PublishProfile=PublishRelease /p:VisualStudioVersion=14.0 /MaxCpuCount:8
我测试了使用Visual Studio 2017