fsprojects / FSharp.TypeProviders.SDK

The SDK for creating F# type providers
https://fsprojects.github.io/FSharp.TypeProviders.SDK/
MIT License
298 stars 94 forks source link

Question: Reference to deprecated preview of NETStandard.Library.NETFramework in the Readme? #296

Closed Thorium closed 2 years ago

Thorium commented 5 years ago

The Readme.md tells the user reference to NETStandard.Library.NETFramework at Making a .NET Standard 2.0 TPDTC. This also comes with the LemonadeProvider template.

However, NuGet package of NETStandard.Library.NETFramework contains only non-stable version available, and the package states:

This package is deprecated. To consume .NET Standard libraries from .NET Framework in VS2017 15.3, you only need the .NET Core 2.0 SDK installed.

So my question is that should I rather include a netstandard.dll from my installed frameworks C:\Program Files\dotnet\sdk\ to the NuGet package, and which version? At least 2.1.202\Microsoft\Microsoft.NET.Build.Extensions\net461\lib\ seems to work?

Thorium commented 5 years ago

The answer seems to be yes, you can update the dll, but then your TypeProvider won't work anymore.

dsyme commented 5 years ago

We should fix this - my understanding is that adding a netstandard.dll to your TPDTC will basically no longer be needed

Are you using a separated TPDTC like we discussed at F# Exchange?

Thorium commented 5 years ago

I didn't get the CompilerServices.TypeProviderAssembly in the TPRTC to find the given TPDTC (as they are in different runtimes and paths?) and also the LemonadeProvider example referenced explicitly the old TPDTC netstandard.dll in LemonadeProvider.DesignTime.fsproj:

    <None Include="..\..\packages\NETStandard.Library.NETFramework\build\net461\lib\netstandard.dll" Condition="'$(TargetFramework)' == 'net45'">
        <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </None>

It seemed also that the source code is about the same files for both, so I went to the easy road and reverted back the old version of netstandard.dll, and suddenly everything worked fine.

dsyme commented 2 years ago

This has been removed a while back