diff --git a/tests/fsharp/single-test.fs b/tests/fsharp/single-test.fs
index 14a79c360d22134480c763a9a14e4bf8ad4171d4..557ee021ed9df2439796ed42af5e4e3419f477e7 100644
--- a/tests/fsharp/single-test.fs
+++ b/tests/fsharp/single-test.fs
@@ -89,7 +89,7 @@ let generateOverrides =
"
template
-let generateProjectArtifacts (pc:ProjectConfiguration) targetFramework =
+let generateProjectArtifacts (pc:ProjectConfiguration) targetFramework configuration =
let computeSourceItems addDirectory addCondition (compileItem:CompileItem) sources =
let computeInclude src =
let fileName = if addDirectory then Path.Combine(pc.SourceDirectory, src) else src
@@ -130,6 +130,8 @@ let generateProjectArtifacts (pc:ProjectConfiguration) targetFramework =
FX_RESHAPED_REFLECTION
NETCOREAPP
false
+ $(RestoreFromArtifactsPath)
+ $(RestoreAdditionalProjectSources);$(RestoreFromArtifactsPath)
@@ -170,6 +172,8 @@ let generateProjectArtifacts (pc:ProjectConfiguration) targetFramework =
|> replaceTokens "$(OPTIMIZE)" optimize
|> replaceTokens "$(DEBUG)" debug
|> replaceTokens "$(TARGETFRAMEWORK)" targetFramework
+ |> replaceTokens "$(RestoreFromArtifactsPath)" (Path.GetFullPath(__SOURCE_DIRECTORY__) + "/../../artifacts/packages/" + configuration)
+
generateProjBody
let singleTestBuildAndRunCore cfg copyFiles p =
@@ -212,7 +216,7 @@ let singleTestBuildAndRunCore cfg copyFiles p =
let executeFsc testCompilerVersion targetFramework =
let propsBody = generateProps testCompilerVersion
emitFile propsFileName propsBody
- let projectBody = generateProjectArtifacts pc targetFramework
+ let projectBody = generateProjectArtifacts pc targetFramework cfg.BUILD_CONFIG
emitFile projectFileName projectBody
use testOkFile = new FileGuard(Path.Combine(directory, "test.ok"))
exec { cfg with Directory = directory } cfg.DotNetExe (sprintf "run -f %s" targetFramework)
@@ -222,7 +226,7 @@ let singleTestBuildAndRunCore cfg copyFiles p =
let executeFsi testCompilerVersion targetFramework =
let propsBody = generateProps testCompilerVersion
emitFile propsFileName propsBody
- let projectBody = generateProjectArtifacts pc targetFramework
+ let projectBody = generateProjectArtifacts pc targetFramework cfg.BUILD_CONFIG
emitFile projectFileName projectBody
use testOkFile = new FileGuard(Path.Combine(directory, "test.ok"))
exec { cfg with Directory = directory } cfg.DotNetExe "build /t:RunFSharpScript"