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?
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.
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.
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.
Visual Studio 2013 uses a ToolsVersion of 12.0. Visual Studio 2015 uses ToolsVersion 14.0, and Visual Studio 2017 uses ToolsVersion 15.0.
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.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With