Difference between .NetCore, VisualStudio build and MSBuild task in Azure Pipeline?
As we know, dotnet is built on top of msbuild, we could call msbuild tasks by using the dotnet CLI.
That is the reason why you can use MSBuild task or .Net Core task to build your project/solution.
Assuredly, dotnet has some features that aren't in msbuild, like dotnet new. At this point, dotnet is easier to use than msbuild.
But, if we build some .net projects (not .net core), we just need use MSBuild task instead of .NET Core task. Because we do not need install unnecessary dotnet SDK.
So, when we building the project/solution without special needs, the .net core task and the msbuild task are just a matter of taste.
On the other hand, MSBuild is part of Visual Studio, when we build the project/solution with Visual Studio, it will invoke the MSBuild to execute some build task to complete the build project/solution.
Sometimes we do not want to install the full Visual Studio on our build server just to build our project/solution, in this case, we could use the MSBuild task to build the project/solution on the server instead of installing the full Visual Studio.
So in a nutshell, dotnet is built on top of msbuild and MSBuild is part of Visual Studio, that is the reason why you can use MSBuild and Visual Studio to build .net core project.
Check this thread for some more details.
Hope this helps.