diff --git a/setup/resources/Microsoft.FSharp.NetSdk.Shim.props b/setup/resources/Microsoft.FSharp.NetSdk.Shim.props
index cf7cb8b4c60..203b37e5734 100644
--- a/setup/resources/Microsoft.FSharp.NetSdk.Shim.props
+++ b/setup/resources/Microsoft.FSharp.NetSdk.Shim.props
@@ -1,5 +1,6 @@
-
+
+
diff --git a/setup/resources/Microsoft.FSharp.NetSdk.Shim.targets b/setup/resources/Microsoft.FSharp.NetSdk.Shim.targets
index 3d740fef747..f5212ec914a 100644
--- a/setup/resources/Microsoft.FSharp.NetSdk.Shim.targets
+++ b/setup/resources/Microsoft.FSharp.NetSdk.Shim.targets
@@ -1,5 +1,6 @@
-
+
+
diff --git a/setup/resources/Microsoft.FSharp.Overrides.NetSdk.Shim.targets b/setup/resources/Microsoft.FSharp.Overrides.NetSdk.Shim.targets
index 4dccd2290a7..c7c7b8a477b 100644
--- a/setup/resources/Microsoft.FSharp.Overrides.NetSdk.Shim.targets
+++ b/setup/resources/Microsoft.FSharp.Overrides.NetSdk.Shim.targets
@@ -1,5 +1,6 @@
-
+
+
diff --git a/setup/resources/Microsoft.FSharp.Shim.targets b/setup/resources/Microsoft.FSharp.Shim.targets
index 5b1fff34c73..62b798f5e78 100644
--- a/setup/resources/Microsoft.FSharp.Shim.targets
+++ b/setup/resources/Microsoft.FSharp.Shim.targets
@@ -1,5 +1,6 @@
-
-
-
+
+
+
+
diff --git a/setup/resources/Microsoft.Portable.FSharp.Shim.targets b/setup/resources/Microsoft.Portable.FSharp.Shim.targets
index 80044a1f23e..5aecfd384fa 100644
--- a/setup/resources/Microsoft.Portable.FSharp.Shim.targets
+++ b/setup/resources/Microsoft.Portable.FSharp.Shim.targets
@@ -1,5 +1,6 @@
-
-
-
+
+
+
+
diff --git a/vsintegration/src/FSharp.Editor/Build/SetGlobalPropertiesForSdkProjects.fs b/vsintegration/src/FSharp.Editor/Build/SetGlobalPropertiesForSdkProjects.fs
index a7360b36df8..f1c49af7496 100644
--- a/vsintegration/src/FSharp.Editor/Build/SetGlobalPropertiesForSdkProjects.fs
+++ b/vsintegration/src/FSharp.Editor/Build/SetGlobalPropertiesForSdkProjects.fs
@@ -22,10 +22,5 @@ type internal SetGlobalPropertiesForSdkProjects
inherit StaticGlobalPropertiesProviderBase(projectService.Services)
override __.GetGlobalPropertiesAsync(_cancellationToken: CancellationToken): Task> =
- let editorDirectory = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location)
- [ "FSharpPropsShim", "Microsoft.FSharp.NetSdk.props"
- "FSharpTargetsShim", "Microsoft.FSharp.NetSdk.targets"
- "FSharpOverridesTargetsShim", "Microsoft.FSharp.Overrides.NetSdk.targets" ]
- |> List.map (fun (key, value) -> (key, Path.Combine(editorDirectory, value)))
- |> List.fold (fun (map:ImmutableDictionary) (key, value) -> map.Add(key, value)) (Empty.PropertiesMap)
- |> Task.FromResult>
+ let properties = Empty.PropertiesMap.Add("FSharpCompilerPath", Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location))
+ Task.FromResult>(properties)
diff --git a/vsintegration/src/FSharp.ProjectSystem.Base/Project/Utilities.cs b/vsintegration/src/FSharp.ProjectSystem.Base/Project/Utilities.cs
index 74a717d5a3b..09ab5927849 100644
--- a/vsintegration/src/FSharp.ProjectSystem.Base/Project/Utilities.cs
+++ b/vsintegration/src/FSharp.ProjectSystem.Base/Project/Utilities.cs
@@ -738,12 +738,14 @@ public static Microsoft.Build.Evaluation.Project InitializeMsBuildProject(Micros
if (buildProject == null)
{
- buildProject = buildEngine.LoadProject(fullProjectPath);
+ var globalProperties = new Dictionary()
+ {
+ { "FSharpCompilerPath", Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) }
+ };
+ buildProject = buildEngine.LoadProject(fullProjectPath, globalProperties, null);
buildProject.IsBuildEnabled = true;
}
- buildProject.SetProperty("FSharpTargetsPath", Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "Microsoft.FSharp.targets"));
-
return buildProject;
}