MSBuild invokes the batch goal of a web project

Does anyone know the components that must be installed to make Package Target available through MSBuild.

You can use Package using MSBuild on a computer with Visual Studio installed, but not on the build server with only the .NET 4 SDK and Web Deploy 2.0 installed, resulting in the following error:

 msbuild "Package" does not exist in the project. 

This applies in part to the following missing files on the server:

 c:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\Web\*.* 

Of course, this can be solved by copying the contents of the MSBuild VisualStudio folder to the equivalent directory on the build server, but this is not a managed solution for server configuration.

All the answers that I read are related to installing Visual Studio or copying files. Is it possible to compile the Web Deploy package without installing Visual Studio?

+4
source share
2 answers

I have a TeamCity CI server without VS installed to create a web project configured in the same way as creating a deployment package for a successful build. However, throughout my life I can’t remember whether I copied these files manually or if they were installed by some component.

The relevant components that I installed are as follows if you want to take a snapshot:

I installed VS Shell to be able to install the VS 2010 SDK, which, in turn, was necessary to install the visualization and simulation SDKs so that I could run T4 conversions on the build server.

Using these components and setting the following MSBuild properties DeployOnBuild=true;DeployTarget=Package to create the deployment package I had no problems, but as I said earlier, I may have copied the files manually after giving up hope of finding a cleaner solution and now my brain blocks any memory of such a bad action.

+6
source

Source: https://habr.com/ru/post/1382507/


All Articles