Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Differences between Visual Studio Build step and MSBuild Build step

I'm creating some build definitions and the only difference I see between the Visual Studio Build Step and MSBuild Build Step is that the VS Build Step adds the visual studio version to the build.

Somebody can explain maybe more differences?

like image 760
Fabito Avatar asked Sep 23 '16 19:09

Fabito


People also ask

Does Visual Studio include MSBuild?

If you have Visual Studio, then you already have MSBuild installed. With Visual Studio 2019 and later, it's installed under the Visual Studio installation folder. For a typical default installation on Windows 10, MSBuild.exe is under the installation folder in MSBuild\Current\Bin.

Is MSBuild a build tool?

MSBuild is a build tool that helps automate the process of creating a software product, including compiling the source code, packaging, testing, deployment and creating documentations. With MSBuild, it is possible to build Visual Studio projects and solutions without the Visual Studio IDE installed.

Is MSBuild part of .NET framework?

MSBuild 4.5 is still part of the . NET 4.5. 1 Framework. The Framework's MSBuild will still be used by Visual Studio 2012, and is able to build any projects that round trip from Visual Studio 2013 to Visual Studio 2012.

What version of MSBuild does vs2017 use?

Visual Studio 2013 uses a ToolsVersion of 12.0. Visual Studio 2015 uses ToolsVersion 14.0, and Visual Studio 2017 uses ToolsVersion 15.0.


2 Answers

They are almost the same just as Daniel mentioned. The main difference is just as what you have found: Visual Studio Build step add Visual Studio Version to the build.

Should I use the Visual Studio Build step or the MSBuild step?

If you are building a solution, in most cases you should use the Visual Studio Build step. This step automatically:

  • Sets the /p:VisualStudioVersion property for you. This forces MSBuild to use a particular set of targets that increase the likelihood of a successful build.

  • Specifies the MSBuild version argument.

In some cases you might need to use the MSBuild step. For example, you should use it if you are building code projects apart from a solution.

like image 121
Eddie Chen - MSFT Avatar answered Sep 29 '22 23:09

Eddie Chen - MSFT


Very little. The two tasks are open-source, and they both seem to do more or less the same stuff.

https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/build/msbuild?view=vsts

https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/build/visual-studio-build?view=vsts

like image 39
Daniel Mann Avatar answered Sep 30 '22 00:09

Daniel Mann