src/NuGet/Microsoft.Net.Compilers.Toolset/README.md
The compiler produces a number of Toolset NuGet packages that allow developers to override the Roslyn compiler that comes with MSBuild or .NET SDK. Installing these packages effectively tells the underlying MSBuild engine to use the provided version of the Roslyn build tasks vs. the installed ones.
The underlying mechanism used is the same between all of the packages here but they differ in scenarios.
msbuild on a .NET SDK based project uses the version of Roslyn that shipped with the .NET SDK, not the one that happens to be installed for MSBuild. Users enable this by setting the property BuildWithNetFrameworkHostedCompiler to true⚠️Warning⚠️ ️
Using these packages directly is not a supported operation. These packages are meant as a mechanism for hot patching toolset bugs, distributing compiler bits for our internal build purposes or as an implementation detail of .NET SDK features.