我有一个应用MVC,并使用msbuild在三个不同的服务器上编译和发布应用程序。
我已经使用调用msbuild的命令创建了一个.bat文件,它工作正常。
call server_1.bat
call server_2.bat
call server_3.bat
对于任何文件,我都调用msbuild来构建我的解决方案并标记要部署的参数。 像这样
msbuild.exe "C:\Source\GestaoEscolar\solution.sln /p:DeployOnBuild=true /p:configuration="Release" /p:Platform="Any CPU" /p:PublishProfile=profileServer1 /p:Password="pwdServer1"
msbuild.exe "C:\Source\GestaoEscolar\solution.sln /p:DeployOnBuild=true /p:configuration="Release" /p:Platform="Any CPU" /p:PublishProfile=profileServer2 /p:Password="pwdServer2"
msbuild.exe "C:\Source\GestaoEscolar\solution.sln /p:DeployOnBuild=true /p:configuration="Release" /p:Platform="Any CPU" /p:PublishProfile=profileServer3 /p:Password="pwdServer3"
最后我的问题。 在这种情况下,msbuild被调用三次,而应用程序则被调用三次,并在相应的服务器上发布。 我只想构建解决方案一次,然后再发布所有服务器。有可能吗?
tks!