Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1710,33 +1710,6 @@ public class BuildableProjectConfig : IVsBuildableProjectCfg
{

#if FX_ATLEAST_45
#if VS_VERSION_DEV12
private static string RegistryRoot = @"SOFTWARE\Microsoft\VisualStudio\12.0\";
#else
private static string RegistryRoot = @"SOFTWARE\Microsoft\VisualStudio\14.0\";
#endif
private static bool? isMultiThreadedBuildEnabled = null;
internal static bool IsMultiThreadedBuildEnabled()
{
if (!isMultiThreadedBuildEnabled.HasValue)
{
isMultiThreadedBuildEnabled = false;
string key = RegistryRoot + @"Projects\{f2a71f9b-5d33-465a-a702-920d77279786}";
using (RegistryKey subKey = Registry.LocalMachine.OpenSubKey(key))
{
if (subKey != null)
{
object valueAsObject = subKey.GetValue(@"IsMultiThreadedBuildEnabled"); // Note: VS caches the registry pretty aggressively, may need "devenv /setup" to pick up a changed value
if (valueAsObject != null && valueAsObject is string)
{
isMultiThreadedBuildEnabled = ((string)valueAsObject) == "1";
}
}
}
}
return isMultiThreadedBuildEnabled.Value;
}

private bool IsInProgress()
{
return buildManagerAccessor.IsInProgress();
Expand Down Expand Up @@ -1778,7 +1751,7 @@ public int GetBuildCfgProperty(int propid, out object pvar)
{
case VSBLDCFGPROPID_SupportsMTBuild:
// Indicate that we support multi-proc builds
pvar = IsMultiThreadedBuildEnabled();
pvar = true;
return VSConstants.S_OK;
default:
pvar = null;
Expand Down