diff --git a/build.cmd b/build.cmd
index 2de8d8e4fcf..ba25d18b578 100644
--- a/build.cmd
+++ b/build.cmd
@@ -479,7 +479,7 @@ rem Build Proto
if '%BUILD_PROTO%' == '1' (
if '%BUILD_PROTO_WITH_CORECLR_LKG%' == '1' (
- pushd .\lkg & %_dotnetexe% restore --packages %~dp0\packages &popd
+ pushd .\lkg & %_dotnetexe% restore &popd
@if ERRORLEVEL 1 echo Error: dotnet restore failed && goto :failure
pushd .\lkg & %_dotnetexe% publish project.json -o %~dp0\Tools\lkg -r win7-x64 &popd
diff --git a/lkg/project.json b/lkg/project.json
index 1d33c32fd78..3a197eed86e 100644
--- a/lkg/project.json
+++ b/lkg/project.json
@@ -1,7 +1,7 @@
{
"dependencies": {
- "Microsoft.FSharp.Compiler.Host.netcore": "1.0.0-alpha-160807",
+ "Microsoft.FSharp.Compiler.Host.netcore": "1.0.0-alpha-161102",
"Microsoft.NETCore.Runtime.CoreCLR": "1.0.2",
"Microsoft.NETCore.DotNetHostPolicy": "1.0.1",
"Microsoft.NETCore.DotNetHost": "1.0.1"
diff --git a/src/fsharp/FSharp.Core.Unittests/FSharp.Core.Unittests.fsproj b/src/fsharp/FSharp.Core.Unittests/FSharp.Core.Unittests.fsproj
index d372dbee050..2bc2c853b1c 100644
--- a/src/fsharp/FSharp.Core.Unittests/FSharp.Core.Unittests.fsproj
+++ b/src/fsharp/FSharp.Core.Unittests/FSharp.Core.Unittests.fsproj
@@ -61,11 +61,14 @@
FSharp.Core
- ..\..\..\packages\System.ValueTuple.4.4.0-beta-24631-01\lib\netstandard1.0\System.ValueTuple.dll
+ ..\..\..\packages\System.ValueTuple.4.0.0-rc3-24212-01\lib\netstandard1.1\System.ValueTuple.dll
+ ..\..\..\packages\System.ValueTuple.4.4.0-beta-24631-01\lib\netstandard1.0\System.ValueTuple.dll
+ True
+ FSharp.Core\SampleTuples\4.0.0-rc3-24212-01\TupleSample.dll
+ FSharp.Core\SampleTuples\4.4.0-beta-24631-01\TupleSample.dll
True
- ..\..\..\src\fsharp\FSharp.Core.Unittests\FSharp.Core\SampleTuples\TupleSample.dll
diff --git a/src/fsharp/FSharp.Core.Unittests/FSharp.Core/SampleTuples/4.0.0-rc3-24212-01/TupleSample.dll b/src/fsharp/FSharp.Core.Unittests/FSharp.Core/SampleTuples/4.0.0-rc3-24212-01/TupleSample.dll
new file mode 100644
index 00000000000..f1afad418cc
Binary files /dev/null and b/src/fsharp/FSharp.Core.Unittests/FSharp.Core/SampleTuples/4.0.0-rc3-24212-01/TupleSample.dll differ
diff --git a/src/fsharp/FSharp.Core.Unittests/FSharp.Core/SampleTuples/TupleSample.dll b/src/fsharp/FSharp.Core.Unittests/FSharp.Core/SampleTuples/4.4.0-beta-24631-01/TupleSample.dll
similarity index 100%
rename from src/fsharp/FSharp.Core.Unittests/FSharp.Core/SampleTuples/TupleSample.dll
rename to src/fsharp/FSharp.Core.Unittests/FSharp.Core/SampleTuples/4.4.0-beta-24631-01/TupleSample.dll
diff --git a/src/fsharp/FSharp.Core.Unittests/FSharp.Core/SampleTuples/TupleSample.csproj b/src/fsharp/FSharp.Core.Unittests/FSharp.Core/SampleTuples/TupleSample.csproj
index ff48a855e3a..29b42c8a75c 100644
--- a/src/fsharp/FSharp.Core.Unittests/FSharp.Core/SampleTuples/TupleSample.csproj
+++ b/src/fsharp/FSharp.Core.Unittests/FSharp.Core/SampleTuples/TupleSample.csproj
@@ -24,7 +24,7 @@
- ..\..\..\..\..\packages\System.ValueTuple.4.4.0-beta-24631-01\lib\netstandard1.0\System.ValueTuple.dll
+ ..\..\..\..\..\packages\System.ValueTuple.4.0.0-rc3-24212-01\lib\netstandard1.1\System.ValueTuple.dll
diff --git a/src/fsharp/fsc.fs b/src/fsharp/fsc.fs
index 98e30f15c34..a5b04e9e7bf 100644
--- a/src/fsharp/fsc.fs
+++ b/src/fsharp/fsc.fs
@@ -957,22 +957,30 @@ let createMscorlibExportList tcGlobals =
CustomAttrs = mkILCustomAttrs List.empty }) |>
Seq.toList
-let createSystemNumericsExportList tcGlobals =
- let sysAssemblyRef = tcGlobals.sysCcu.ILScopeRef.AssemblyRef
- let systemNumericsAssemblyRef =
- let refNumericsDllName =
- if tcGlobals.usesMscorlib then "System.Numerics"
- else "System.Runtime.Numerics"
- ILAssemblyRef.Create(refNumericsDllName, sysAssemblyRef.Hash, sysAssemblyRef.PublicKey, sysAssemblyRef.Retargetable, sysAssemblyRef.Version, sysAssemblyRef.Locale)
- typesForwardedToSystemNumerics |>
- Seq.map (fun t ->
- { ScopeRef = ILScopeRef.Assembly(systemNumericsAssemblyRef)
- Name = t
- IsForwarder = true
- Access = ILTypeDefAccess.Public
- Nested = mkILNestedExportedTypes List.empty
- CustomAttrs = mkILCustomAttrs List.empty }) |>
- Seq.toList
+let createSystemNumericsExportList tcGlobals (tcImports:TcImports) =
+ let refNumericsDllName =
+ if tcGlobals.usesMscorlib then "System.Numerics"
+ else "System.Runtime.Numerics"
+ let numericsAssemblyRef =
+ match tcImports.GetImportedAssemblies() |> List.tryFind(fun a -> a.FSharpViewOfMetadata.AssemblyName = refNumericsDllName) with
+ | Some asm ->
+ match asm.ILScopeRef with
+ | ILScopeRef.Assembly aref -> Some aref
+ | _ -> None
+ | None -> None
+ match numericsAssemblyRef with
+ | Some aref ->
+ let systemNumericsAssemblyRef = ILAssemblyRef.Create(refNumericsDllName, aref.Hash, aref.PublicKey, aref.Retargetable, aref.Version, aref.Locale)
+ typesForwardedToSystemNumerics |>
+ Seq.map (fun t ->
+ { ScopeRef = ILScopeRef.Assembly(systemNumericsAssemblyRef)
+ Name = t
+ IsForwarder = true
+ Access = ILTypeDefAccess.Public
+ Nested = mkILNestedExportedTypes List.empty
+ CustomAttrs = mkILCustomAttrs List.empty }) |>
+ Seq.toList
+ | None -> []
module MainModuleBuilder =
@@ -1009,7 +1017,7 @@ module MainModuleBuilder =
let CreateMainModule
- (tcConfig:TcConfig,tcGlobals,
+ (tcConfig:TcConfig,tcGlobals,tcImports:TcImports,
pdbfile,assemblyName,outfile,topAttrs,
(iattrs,intfDataResources),optDataResources,
codegenResults,assemVerFromAttrib,metadataVersion,secDecls) =
@@ -1033,7 +1041,7 @@ module MainModuleBuilder =
let exportedTypesList =
if (tcConfig.compilingFslib && tcConfig.compilingFslib40) then
(List.append (createMscorlibExportList tcGlobals)
- (if tcConfig.compilingFslibNoBigInt then [] else (createSystemNumericsExportList tcGlobals))
+ (if tcConfig.compilingFslibNoBigInt then [] else (createSystemNumericsExportList tcGlobals tcImports))
)
else
[]
@@ -2012,7 +2020,7 @@ let main2(Args(tcConfig, tcImports, frameworkTcImports: TcImports, tcGlobals, er
Args(tcConfig,tcImports,tcGlobals,errorLogger,generatedCcu,outfile,optimizedImpls,topAttrs,pdbfile,assemblyName, (sigDataAttributes, sigDataResources), optDataResources,assemVerFromAttrib,signingInfo,metadataVersion,exiter)
let main2b(Args(tcConfig: TcConfig, tcImports, tcGlobals, errorLogger, generatedCcu: CcuThunk, outfile, optimizedImpls, topAttrs, pdbfile, assemblyName, idata, optDataResources, assemVerFromAttrib, signingInfo, metadataVersion, exiter: Exiter)) =
-
+
// Compute a static linker.
let ilGlobals = tcGlobals.ilg
if tcConfig.standalone && generatedCcu.UsesFSharp20PlusQuotations then
@@ -2035,8 +2043,7 @@ let main2b(Args(tcConfig: TcConfig, tcImports, tcGlobals, errorLogger, generated
let permissionSets = ilxGenerator.CreatePermissionSets securityAttrs
let secDecls = if securityAttrs.Length > 0 then mkILSecurityDecls permissionSets else emptyILSecurityDecls
-
- let ilxMainModule = MainModuleBuilder.CreateMainModule (tcConfig,tcGlobals,pdbfile,assemblyName,outfile,topAttrs,idata,optDataResources,codegenResults,assemVerFromAttrib,metadataVersion,secDecls)
+ let ilxMainModule = MainModuleBuilder.CreateMainModule (tcConfig,tcGlobals,tcImports,pdbfile,assemblyName,outfile,topAttrs,idata,optDataResources,codegenResults,assemVerFromAttrib,metadataVersion,secDecls)
AbortOnError(errorLogger,tcConfig,exiter)