A
A
Andrey Strelkov2019-01-18 13:32:52
MSBuild
Andrey Strelkov, 2019-01-18 13:32:52

Do I need to install the Web Deploy component on a virtual machine to build and publish projects?

Good afternoon, a virtual machine is set up to build C # projects with subsequent publication on the IIS web server, where the WebDeploy service is also installed.
There was a question, when publishing a project through Visual Studio, there are no questions, everything is successfully published.
If you start the assembly and publication on the assembly machine using msbuild, then after successful compilation it swears at the Webdeploy component.
The command to run msbuild is the following:

'"C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\msbuild.exe" /p:DeployOnBuild=True /p:Configuration=Debug /p:Platform="Any CPU" /p:VisualStudioVersion=15.0 /p:WebPublishMethod=MSDeploy /p:MSDeployServiceURL="https://140vm-cmain:8172/msdeploy.axd" /p:DeployIISAppPath="MainSite/WebApp" /p:MSDeployPublishMethod=WMSVC /p:AllowUntrustedCertificate=True /p:PublishProfile=Dev.pubxml /p:AuthType=NTLM WebApp.sln'

The output error is the following:
C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\Microsoft\VisualStudio\v15.0\Web\Microsoft.Web.Publishing.targets(3758,5): error : Package/Publish task Microsoft.Web.Publishing.Tasks.IsCleanMSDeployPackageNeeded failed to load Web Deploy assemblies. Microsoft Web Deploy is not correctly installed on this machine. Microsoft Web Deploy v3 or higher is recommended. [C:\GitLab-Runner\builds\BPKNgzEq\0\140strelkov\webapp\WebApp\WebApp.csproj]

The virtual machine is lightweight. minimum additional software: WinServer 2016, NetFramework 4.7 + SDK, nuget.exe,
vs_buildtools.exe --add Microsoft.VisualStudio.Workload.WebBuildTools --add Microsoft.VisualStudio.Workload.MSBuildTools

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question