-
Notifications
You must be signed in to change notification settings - Fork 146
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
.NET Standard - issues referencing library that uses SQLProvider #547
Comments
To use type provider with .NET Standard you have to use compatible fsharp compiler and do the compilation with .Net451 version of SQLProvider.dll. On runtime you can use the .NET Standard dll. |
It is working on runtime, just not when called from another assembly. How can I fix it? |
Ok, the first issue is that your ActualApp .NET Just add a copy or reference to the file so that there will be the netstandard2.0 version of the file in the ActualApp bin folder. It can be done in multiple ways, e.g. adding to your ActualApp project file from NuGet cache or from any other local folder: <ItemGroup>
<Reference Include="FSharp.Data.SqlProvider">
<HintPath>C:\Users\myuser\.nuget\packages\SQLProvider\1.1.42\lib\netstandard2.0\FSharp.Data.SqlProvider.dll</HintPath>
</Reference>
</ItemGroup> Now, it seems that the dotnet.exe doesn't clean up the resources nicely when you try to rebuild. So please delete What will fail next is that ActualApp doesn't find |
That did help, thanks a lot! Just to be sure: when you said
you actually meant
? |
It depends on .NET Standard backward compatibility, but I think the current short answer is yes. :-) |
Description
I have a project that successfully talks to DB, but the same function fails when referenced from another project.
Repro steps
dotnet run
on DataAccessApp projectdotnet run
on ActualApp projectAlternative repro steps
Expected behavior
Both executions succeed
Actual behavior
Only first execution succeeeds. The second fails with
Related information
dotnet --version
is 2.1.4The text was updated successfully, but these errors were encountered: