FSharp.Data icon indicating copy to clipboard operation
FSharp.Data copied to clipboard

The netstandard2.0 FSharp.Data.DesignTime.dll, is compiled as a desktop assembly.

Open KevinRansom opened this issue 5 years ago • 1 comments

@dsyme

As far as I can tell the netstandard2.0 FSharp.Data.DesignTime.dll, in the lib\netstandard2.0 directory is compiled as a desktop assembly, that doesn't seem to be correct.

mscorlib, System, System.Xml, System.Core and System.Xml.Linq are desktop references.

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

stdin(10,10): error FS3033: The type provider 'ProviderImplementation.JsonProvider' reported an error in the context of provided type 'FSharp.Data.JsonProvider,Sample="http://api.openweathermap.org/data/2.5/weather?id=2172797&APPID=93a2637fe6dad8426d128d5289325ca9"', member 'Load'. The error: assembly mscorlib not found

If I disassemble it the references look like:

// Microsoft (R) .NET Framework IL Disassembler. Version 4.6.1055.0 // Copyright (c) Microsoft Corporation. All rights reserved.

// Metadata version: v4.0.30319 .assembly extern mscorlib { .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. .ver 4:0:0:0 } .assembly extern FSharp.Core { .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: .ver 4:3:1:0 } .assembly extern System { .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. .ver 4:0:0:0 } .assembly extern System.Xml { .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. .ver 4:0:0:0 } .assembly extern System.Xml.Linq { .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. .ver 4:0:0:0 } .assembly extern System.Core { .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. .ver 4:0:0:0 } .assembly FSharp.Data.DesignTime { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, int32, int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) .custom instance void [mscorlib]System.Runtime.CompilerServices.InternalsVisibleToAttribute::.ctor(string) = ( 01 00 1C 46 53 68 61 72 70 2E 44 61 74 61 2E 44 // ...FSharp.Data.D 65 73 69 67 6E 54 69 6D 65 2E 54 65 73 74 73 00 // esignTime.Tests. 00 ) .custom instance void [mscorlib]System.Reflection.AssemblyTitleAttribute::.ctor(string) = ( 01 00 16 46 53 68 61 72 70 2E 44 61 74 61 2E 44 // ...FSharp.Data.D 65 73 69 67 6E 54 69 6D 65 00 00 ) // esignTime.. .custom instance void [mscorlib]System.Reflection.AssemblyProductAttribute::.ctor(string) = ( 01 00 0B 46 53 68 61 72 70 2E 44 61 74 61 00 00 ) // ...FSharp.Data.. .custom instance void [mscorlib]System.Reflection.AssemblyDescriptionAttribute::.ctor(string) = ( 01 00 32 4C 69 62 72 61 72 79 20 6F 66 20 46 23 // ..2Library of F# 20 74 79 70 65 20 70 72 6F 76 69 64 65 72 73 20 // type providers 61 6E 64 20 64 61 74 61 20 61 63 63 65 73 73 20 // and data access 74 6F 6F 6C 73 00 00 ) // tools.. .custom instance void [mscorlib]System.Reflection.AssemblyVersionAttribute::.ctor(string) = ( 01 00 07 33 2E 31 2E 31 2E 30 00 00 ) // ...3.1.1.0.. .custom instance void [mscorlib]System.Reflection.AssemblyFileVersionAttribute::.ctor(string) = ( 01 00 07 33 2E 31 2E 31 2E 30 00 00 ) // ...3.1.1.0.. .custom instance void [mscorlib]System.Runtime.Versioning.TargetFrameworkAttribute::.ctor(string) = ( 01 00 1A 2E 4E 45 54 46 72 61 6D 65 77 6F 72 6B // ....NETFramework 2C 56 65 72 73 69 6F 6E 3D 76 34 2E 35 01 00 54 // ,Version=v4.5..T 0E 14 46 72 61 6D 65 77 6F 72 6B 44 69 73 70 6C // ..FrameworkDispl 61 79 4E 61 6D 65 12 2E 4E 45 54 20 46 72 61 6D // ayName..NET Fram 65 77 6F 72 6B 20 34 2E 35 ) // ework 4.5

// --- The following custom attribute is added automatically, do not uncomment ------- // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 03 00 00 00 00 00 )

.hash algorithm 0x00008004 .ver 3:1:1:0 }




KevinRansom avatar May 01 '19 00:05 KevinRansom

@KevinRansom @dsyme could this be related to the problem I am having here https://gist.github.com/jackfoxy/fdf6827257518ae07ab504dd5a7e15b1 Html types and methods are not recognized by the compiler, giving red squigglies and not building, yet I can run this in FSI.

Update: my problem solved by adding #r "System.Xml.Linq". To me this is a problem in itself that I need to add this reference.

jackfoxy avatar Dec 22 '19 17:12 jackfoxy