Using Shared Compilation with Roslyn in a self contained build environment?
<p>We have recently upgraded our build system from VS 2013 to 2015 Update 2 and our build times have increased dramatically.  Our build environment is self-contained, so we run MSBuild from a package (using devpath) rather than from an installed location. Looking at the logs it appears that the increase in build time is almost all in the csc build task. Installing MSBuild on the machine has no impact, although if we run from the installed location rather than our self-contained location the build times are similar to what we see with 2013.  When running from an installed location we can see that shared compliation is being used from the message "<em>Using shared compilation with compiler from directory: C:\Program Files (x86)\MSBuild\14.0\bin</em>". At the moment we are under the impression that enabling shared compilation will help with our build times, but we haven't been able to get it working from our self-contained environment.  Setting "UseSharedCompilation" to true has no impact and doesn't result in the message above during the build.</p>

<p>Is there a way to enable shared compilation with Roslyn when running MSBuild from a path other than the installed location?</p>