Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

DeployOnBuild not working with VS2017 MSBuild tools

i installed the VS2017 build tools with vs_buildtools.exe --add Microsoft.VisualStudio.Workload.MSBuildTools --quiet but now when I build with the installed MSbuild, passing the /p:DeployOnBuild=true, there seems to be no attempt to do any of the config transformation, aspnet compilation, or deployment that happens when i use the v14.0 tools.

what extra magic incantation do i have to do to make this work?

like image 257
Spongman Avatar asked Mar 16 '17 19:03

Spongman


People also ask

What is DeployOnBuild?

The DeployOnBuild=true property essentially means "I want to execute an additional target when build completes successfully." The DeployTarget property identifies the name of the target you want to execute when the DeployOnBuild property is equal to true.

How do I publish with MSBuild?

You can pass /p:PublishUrl="newpath" to the msbuild command. You would also see this set in the csproj file which you can change.

What does MSBuild do in Sitecore?

MSBuild runs the PrepareFilesToList before Hello target. Inside the PrepareFilesToList we create FilesToList item and then it can be used by Hello target. To separate list of targets use ; .


1 Answers

Make sure that you use the proper MSBuild.exe. This: C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin

Or if IDE (enterprise) installed: C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin

If configure an MSBUILD step in a TFS server, set the path of the MSBUILD.exe manualy (Advenced/MSBuild/Specify location): Set TFS MSBuild step

Using this: C:\Program Files (x86)\MSBuild\15.0\Bin

will cause that no deployment package created.

like image 55
siposz Avatar answered Sep 20 '22 17:09

siposz