-
Notifications
You must be signed in to change notification settings - Fork 63
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
Enable ResxProvider on net5.0-windows #164
base: master
Are you sure you want to change the base?
Conversation
This provides an upgrade path for projects moving from .NET Framework to .NET 5+.
I've manually tested this by enabling and running the ResXProvider tests in the FSharp.Configuration.Tests project. I was only able to run the tests through Visual Studio after the applying the workaround in #146. I've left those changes out, though, since I haven't tested that they work on all platforms and outside Visual Studio. I am a bit confused regarding src/FSharp.Configuration/FSharp.Configuration.fsproj. Is that still used? If so, should I add the "net5.0-windows" target there as well? I am wondering since it is referring to source files that do not exist. |
I see there are more things that need to be done in order to build the net5.0-windows configuration and get it included in the nuget package. I'll see if I can figure it out on my own. |
Likely the whole TP still needs updating for netcore @baronfel any idea where we're at on this one? |
If I create a NuGet package with the latest changes on this branch, I am able to successfully use the type provider from within Visual Studio (2019) and compilation works fine. However, it does not work when using
Any clue what may cause the type provider to work with VS, but not with I'll mark this PR as a draft until this is resolved, and to avoid spamming you guys too much. |
The downside of this fix is that after the merge we will have to build NuGet package always on Windows (because of use TPDTC loading rules were developer before .NET 5. I am not sure if @danabr meanwhile, you should be able to test it. You can add some code inside |
Unfortunately, I am not able to build the tests even on the master branch. I get build errors like the following (this is after switching to the master branch and running
I might give up on using type providers for the time being, and just go with code generation for my project instead. |
@danabr Is it result of execution |
Yes, this is using build.cmd from a VS 2019 developer command prompt. Thanks for the link to the Github Actions output. I see the same error is present there:
Comparing some other invocations of dotnet.exe, it seems like the path to fsc.dll is missing. Compare this working call with the call that gave the error above. |
I'm closing this for now, since I've not been able to get even the master branch to build cleanly on my system (using build.cmd). I might revisit this later. |
@danabr plz keep it open. it is good piece of works that should be merged at some point of time. I already take a look and already understand why it does not work on you machine (it uses fsc.props to build project using full framework version of FSC) I still looking for a working sample of TP with dependencies that build with .NET 5/6. When I find out how it should work .... I will merge migration to .NET 6 #165 and then this PR. |
This provides an upgrade path for projects moving from .NET Framework to
.NET 5+.