How is Roslyn related to MsBuild?

Viewed 7248

I'm wondering: How exactly is Roslyn related to MsBuild?

My understanding was that

  1. Roslyn is a compilation engine
  2. MsBuild is is mostly a set of specifications of how a project is set up - i.e. basically a definition schema for .csproj, .sln files and so on.

Then again, MsBuild also ships with an msbuild.exe - which, correct me if I'm wrong, is able to actually compile projects. But how would this tie in with Roslyn, assuming msbuild.exe can compile projects, but so can Roslyn?

Does msbuild.exe use Roslyn to compile, in case of MSBuild 15? Are they completely seperate? Am I misunderstanding anything?

And furthermore & more specifally: Assuming I want programatically create simple .csproj files, and use Roslyn's MSBuildWorkspace to handle/populate and finally compile these. Would the end user of my application need to have Microsoft's build tools installed on their machine? Or is this not necessary, as Roslyn would be able to read & compile these independently of any local MSBuild installation?

1 Answers
Related