Skip to content

Commit 8d2fb0d

Browse files
vasily-kirichenkolatkin
authored andcommitted
enable parallel build in Visual Studio
fixes dotnet/fsharp#94 closes dotnet/fsharp#487
1 parent cfae0cf commit 8d2fb0d

File tree

1 file changed

+1
-28
lines changed
  • vsintegration/src/vs/FsPkgs/FSharp.Project/Common.Source.CSharp/Project

1 file changed

+1
-28
lines changed

vsintegration/src/vs/FsPkgs/FSharp.Project/Common.Source.CSharp/Project/ProjectConfig.cs

Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1674,33 +1674,6 @@ public class BuildableProjectConfig : IVsBuildableProjectCfg
16741674
{
16751675

16761676
#if FX_ATLEAST_45
1677-
#if VS_VERSION_DEV12
1678-
private static string RegistryRoot = @"SOFTWARE\Microsoft\VisualStudio\12.0\";
1679-
#else
1680-
private static string RegistryRoot = @"SOFTWARE\Microsoft\VisualStudio\14.0\";
1681-
#endif
1682-
private static bool? isMultiThreadedBuildEnabled = null;
1683-
internal static bool IsMultiThreadedBuildEnabled()
1684-
{
1685-
if (!isMultiThreadedBuildEnabled.HasValue)
1686-
{
1687-
isMultiThreadedBuildEnabled = false;
1688-
string key = RegistryRoot + @"Projects\{f2a71f9b-5d33-465a-a702-920d77279786}";
1689-
using (RegistryKey subKey = Registry.LocalMachine.OpenSubKey(key))
1690-
{
1691-
if (subKey != null)
1692-
{
1693-
object valueAsObject = subKey.GetValue(@"IsMultiThreadedBuildEnabled"); // Note: VS caches the registry pretty aggressively, may need "devenv /setup" to pick up a changed value
1694-
if (valueAsObject != null && valueAsObject is string)
1695-
{
1696-
isMultiThreadedBuildEnabled = ((string)valueAsObject) == "1";
1697-
}
1698-
}
1699-
}
1700-
}
1701-
return isMultiThreadedBuildEnabled.Value;
1702-
}
1703-
17041677
private bool IsInProgress()
17051678
{
17061679
return buildManagerAccessor.IsInProgress();
@@ -1736,7 +1709,7 @@ public int GetBuildCfgProperty(int propid, out object pvar)
17361709
{
17371710
case VSBLDCFGPROPID_SupportsMTBuild:
17381711
// Indicate that we support multi-proc builds
1739-
pvar = IsMultiThreadedBuildEnabled();
1712+
pvar = true;
17401713
return VSConstants.S_OK;
17411714
default:
17421715
pvar = null;

0 commit comments

Comments
 (0)