消息“与目录中的编译器使用共享编译”消息是什么,什么是共享编译?

Ign*_*cia 7 .net c# msbuild

从VS2010升级到VS2015之后,我们在编译输出中看到以下消息,该消息以前是不存在的:

“与目录中的编译器一起使用共享编译”

这是什么意思,什么是共享编译概念?

谷歌搜索它,我什么也没发现。

Pat*_*man 7

从我阅读的文档中并不清楚,但是在源代码文档中有一个线索:

/// If this property is true then the task will take every C# or VB
/// compilation which is queued by MSBuild and send it to the
/// VBCSCompiler server instance, starting a new instance if necessary.
/// If false, we will use the values from ToolPath/Exe.
Run Code Online (Sandbox Code Playgroud)

似乎重用相同的服务可以最大程度地减少构建时间,因为编译器可以使用过去的构建中间体和结果以及其他相关项目的编译结果。

项目的其他人(Jared Parsons,Microsoft)的一些其他线索

发生了什么事,MSBuild属性UseSharedCompilation被设置为false。因此,我们不使用编译器服务器,而您要为每次构建支付CSC的JIT成本。这就是减速的原因。