diff --git a/src/FSharp.Build/FSharp.Build.fsproj b/src/FSharp.Build/FSharp.Build.fsproj
index 8f2fd4f5951..080c53399b1 100644
--- a/src/FSharp.Build/FSharp.Build.fsproj
+++ b/src/FSharp.Build/FSharp.Build.fsproj
@@ -46,6 +46,7 @@
+
diff --git a/src/FSharp.Build/GenerateILLinkSubstitutions.fs b/src/FSharp.Build/GenerateILLinkSubstitutions.fs
new file mode 100644
index 00000000000..457ba39bbe6
--- /dev/null
+++ b/src/FSharp.Build/GenerateILLinkSubstitutions.fs
@@ -0,0 +1,84 @@
+// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information.
+
+namespace FSharp.Build
+
+open System
+open System.IO
+open System.Text
+open Microsoft.Build.Framework
+open Microsoft.Build.Utilities
+
+///
+/// MSBuild task that generates ILLink.Substitutions.xml file to remove F# metadata resources during IL linking.
+///
+type GenerateILLinkSubstitutions() =
+ inherit Task()
+
+ ///
+ /// Assembly name to use when generating resource names to be removed.
+ ///
+ []
+ member val AssemblyName = "" with get, set
+
+ ///
+ /// Intermediate output path for storing the generated file.
+ ///
+ []
+ member val IntermediateOutputPath = "" with get, set
+
+ ///
+ /// Generated embedded resource items.
+ ///
+ [