diff --git a/FSharpBuild.Directory.Build.targets b/FSharpBuild.Directory.Build.targets
index 7548cef7acf..3132ba1c970 100644
--- a/FSharpBuild.Directory.Build.targets
+++ b/FSharpBuild.Directory.Build.targets
@@ -1,4 +1,5 @@
+
@@ -8,7 +9,7 @@
+ BeforeTargets="AssignTargetPaths;BeforeBuild;GenerateFSharpTextResources">
<__TargetFilePath>@(NoneSubstituteText->'$(IntermediateOutputPath)%(Filename)%(Extension)')
@@ -20,16 +21,19 @@
<_CopyToOutputDirectory Condition="'%(NoneSubstituteText.CopyToOutputDirectory)' != ''">%(NoneSubstituteText.CopyToOutputDirectory)
<_CopyToOutputDirectory Condition="'%(NoneSubstituteText.CopyToOutputDirectory)' == ''">Never
+
+ <_IncludeInVsix>false
+ <_IncludeInVsix Condition="'%(NoneSubstituteText.IncludeInVsix)' == 'true'">true
-
-
+
+
@@ -61,4 +65,27 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/fcs/build.fsx b/fcs/build.fsx
index 1c2528dd2e0..af21298e7ab 100644
--- a/fcs/build.fsx
+++ b/fcs/build.fsx
@@ -66,16 +66,16 @@ Target.create "Build" (fun _ ->
runDotnet __SOURCE_DIRECTORY__ "build" "../src/buildtools/buildtools.proj -v n -c Proto"
let fslexPath = __SOURCE_DIRECTORY__ + "/../artifacts/bin/fslex/Proto/netcoreapp2.1/fslex.dll"
let fsyaccPath = __SOURCE_DIRECTORY__ + "/../artifacts/bin/fsyacc/Proto/netcoreapp2.1/fsyacc.dll"
- runDotnet __SOURCE_DIRECTORY__ "build" (sprintf "FSharp.Compiler.Service.sln -v n -c Release /p:FsLexPath=%s /p:FsYaccPath=%s" fslexPath fsyaccPath)
+ runDotnet __SOURCE_DIRECTORY__ "build" (sprintf "FSharp.Compiler.Service.sln -nodereuse:false -v n -c Release /p:DisableCompilerRedirection=true /p:FsLexPath=%s /p:FsYaccPath=%s" fslexPath fsyaccPath)
)
Target.create "Test" (fun _ ->
// This project file is used for the netcoreapp2.0 tests to work out reference sets
- runDotnet __SOURCE_DIRECTORY__ "build" "../tests/projects/Sample_NETCoreSDK_FSharp_Library_netstandard2_0/Sample_NETCoreSDK_FSharp_Library_netstandard2_0.fsproj -v n /restore /p:DisableCompilerRedirection=true"
+ runDotnet __SOURCE_DIRECTORY__ "build" "../tests/projects/Sample_NETCoreSDK_FSharp_Library_netstandard2_0/Sample_NETCoreSDK_FSharp_Library_netstandard2_0.fsproj -nodereuse:false -v n /restore /p:DisableCompilerRedirection=true"
// Now run the tests
let logFilePath = Path.Combine(__SOURCE_DIRECTORY__, "..", "artifacts", "TestResults", "Release", "FSharp.Compiler.Service.Test.xml")
- runDotnet __SOURCE_DIRECTORY__ "test" (sprintf "FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.Tests.fsproj --no-restore --no-build -v n -c Release --test-adapter-path . --logger \"nunit;LogFilePath=%s\"" logFilePath)
+ runDotnet __SOURCE_DIRECTORY__ "test" (sprintf "FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.Tests.fsproj --no-restore --no-build -nodereuse:false -v n -c Release --test-adapter-path . --logger \"nunit;LogFilePath=%s\"" logFilePath)
)
Target.create "NuGet" (fun _ ->
diff --git a/src/fsharp/FSharp.Build/FSharp.Build.fsproj b/src/fsharp/FSharp.Build/FSharp.Build.fsproj
index 76b9c7043e9..f427453df99 100644
--- a/src/fsharp/FSharp.Build/FSharp.Build.fsproj
+++ b/src/fsharp/FSharp.Build/FSharp.Build.fsproj
@@ -26,6 +26,7 @@
+
diff --git a/src/fsharp/FSharp.Build/Microsoft.FSharp.Targets b/src/fsharp/FSharp.Build/Microsoft.FSharp.Targets
index 8421c8ea504..0b51d7204f6 100644
--- a/src/fsharp/FSharp.Build/Microsoft.FSharp.Targets
+++ b/src/fsharp/FSharp.Build/Microsoft.FSharp.Targets
@@ -29,6 +29,7 @@ this file.
+
true
diff --git a/src/fsharp/FSharp.Build/SubstituteText.fs b/src/fsharp/FSharp.Build/SubstituteText.fs
new file mode 100644
index 00000000000..16b8eab5245
--- /dev/null
+++ b/src/fsharp/FSharp.Build/SubstituteText.fs
@@ -0,0 +1,92 @@
+// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information.
+
+namespace FSharp.Build
+
+open System
+open System.Collections
+open System.IO
+open Microsoft.Build.Framework
+open Microsoft.Build.Utilities
+
+type SubstituteText () =
+
+ let mutable _buildEngine : IBuildEngine = null
+ let mutable _hostObject : ITaskHost = null
+
+ let mutable copiedFiles = new ResizeArray()
+ let mutable embeddedResources : ITaskItem[] = [||]
+
+ []
+ member this.EmbeddedResources
+ with get() = embeddedResources
+ and set(value) = embeddedResources <- value
+
+ [