diff --git a/src/FSharpSource.targets b/src/FSharpSource.targets index ab7250ea04b..b4c1c24825b 100644 --- a/src/FSharpSource.targets +++ b/src/FSharpSource.targets @@ -288,7 +288,7 @@ $(DefineConstants);FX_NO_MISSINGMETHODEXCEPTION $(DefineConstants);DONT_INCLUDE_DEPRECATED $(DefineConstants);QUERIES_IN_FSLIB - $(DefineConstants);FX_NO_STRUCTTUPLE + $(DefineConstants);FX_ASSEMBLYLOADBYSTRING Profile47 v4.0 diff --git a/src/fsharp/FSharp.Core/FSharp.Core.fsproj b/src/fsharp/FSharp.Core/FSharp.Core.fsproj index 9cd792bcdd2..7b5d7b49cd9 100644 --- a/src/fsharp/FSharp.Core/FSharp.Core.fsproj +++ b/src/fsharp/FSharp.Core/FSharp.Core.fsproj @@ -214,10 +214,6 @@ - - ..\..\..\packages\System.ValueTuple.4.0.0-rc3-24212-01\lib\netstandard1.1\System.ValueTuple.dll - - diff --git a/src/fsharp/FSharp.Core/project.json b/src/fsharp/FSharp.Core/project.json index b4105f53d65..9b310893e37 100644 --- a/src/fsharp/FSharp.Core/project.json +++ b/src/fsharp/FSharp.Core/project.json @@ -25,7 +25,6 @@ "System.Threading.Thread": "4.0.0", "System.Threading.ThreadPool": "4.0.10", "System.Threading.Timer": "4.0.1", - "System.ValueTuple": "4.0.0-rc3-24212-01", }, "runtimes": { "win7-x86": { }, diff --git a/src/fsharp/FSharp.Core/reflect.fs b/src/fsharp/FSharp.Core/reflect.fs index adcacc2bd9f..509f352d647 100644 --- a/src/fsharp/FSharp.Core/reflect.fs +++ b/src/fsharp/FSharp.Core/reflect.fs @@ -395,10 +395,13 @@ module internal Impl = let mutable systemValueTupleException = null -#if !FX_NO_STRUCTTUPLE let reflectedValueTuple n = try +#if FX_ASSEMBLYLOADBYSTRING + let a = Assembly.Load("System.ValueTuple") +#else let a = Assembly.Load(new AssemblyName("System.ValueTuple")) +#endif match n with | 1 -> Some (a.GetType("System.ValueTuple`1")) | 2 -> Some (a.GetType("System.ValueTuple`2")) @@ -446,7 +449,6 @@ module internal Impl = let isStructTuple6Type typ = structTupleEquivHeadTypes typ stuple6 let isStructTuple7Type typ = structTupleEquivHeadTypes typ stuple7 let isStructTuple8Type typ = structTupleEquivHeadTypes typ stuple8 -#endif let isTupleType typ = let isRefTupleType = @@ -460,9 +462,6 @@ module internal Impl = || isTuple8Type typ let isStructTupleType = -#if FX_NO_STRUCTTUPLE - false -#else // If we can't load the System.ValueTuple Assembly then it can't be a struct tuple try isStructTuple1Type typ @@ -474,7 +473,6 @@ module internal Impl = || isStructTuple7Type typ || isStructTuple8Type typ with | :? System.IO.FileNotFoundException -> false -#endif isRefTupleType || isStructTupleType let maxTuple = 8 @@ -482,7 +480,6 @@ module internal Impl = let tupleEncField = maxTuple-1 let rec mkTupleType isStruct (tys: Type[]) = -#if !FX_NO_STRUCTTUPLE let deOption (o: option) = match o with | Some v -> v @@ -503,7 +500,6 @@ module internal Impl = deOption(stuple8).MakeGenericType(Array.append tysA [| tyB |]) | _ -> invalidArg "tys" (SR.GetString(SR.invalidTupleTypes)) else -#endif match tys.Length with | 1 -> tuple1.MakeGenericType(tys) | 2 -> tuple2.MakeGenericType(tys)