Using Shared Compilation with Roslyn in a self contained build environment? -


we have upgraded our build system vs 2013 2015 update 2 , our build times have increased dramatically. our build environment self-contained, run msbuild package (using devpath) rather installed location. looking @ logs appears increase in build time in csc build task. installing msbuild on machine has no impact, although if run installed location rather our self-contained location build times similar see 2013. when running installed location can see shared compliation being used message "using shared compilation compiler directory: c:\program files (x86)\msbuild\14.0\bin". @ moment under impression enabling shared compilation our build times, haven't been able working our self-contained environment. setting "usesharedcompilation" true has no impact , doesn't result in message above during build.

is there way enable shared compilation roslyn when running msbuild path other installed location?

have tried overriding "csc" task altogether? evaluated sample csharp project command-line using preprocess (i.e., "/pp:out.txt") switch, opened "out.txt", , found references "usesharedcompilation" in 1 shape or related csc build task.

a stab in dark search of text files on github.com revealed e! true hollywood story of usesharedcompilation. following nuget package 'microsoft.net.compilers':

  <!-- usingtask, usesharedcompilation, , toolpath/exe variables interact     choose compiler path use , whether or not use compiler server.    if usingtask , usesharedcompilation set compiler server next    task used (i.e., 1 in package).    if usesharedcompilation false or toolpath/exe set compiler server    not used , compiler exe @ toolpath, if set, executed, otherwise    executable in msbuild install path executed. --> 

so, according above xml comment, have employ msbuild trickery realize self-contained build environment "usesharedcompilation". full text of above snippet, see https://raw.githubusercontent.com/dotnet/roslyn/c5b249b16f7d67ee1645a1b75fa3de6f16314672/build/nugetadditionalfiles/microsoft.net.compilers.props.


Comments

Popular posts from this blog

javascript - Thinglink image not visible until browser resize -

firebird - Error "invalid transaction handle (expecting explicit transaction start)" executing script from Delphi -

mongodb - How to keep track of users making Stripe Payments -