fsprojects / FSharp.Configuration

The FSharp.Configuration project contains type providers for the configuration of .NET projects.
http://fsprojects.github.io/FSharp.Configuration/
Other
114 stars 63 forks source link

Don't include binary dependencies in the nuget package #124

Closed jbrestan closed 7 years ago

jbrestan commented 7 years ago

I've noticed that the FSharp.Configuration nuget package contains SharpYaml and System.ValueTuple binaries directly as binary content, which is then all referenced together. I believe these should be made external so that NuGet/Paket can manage them properly.

Including System.ValueTuple caused build issues for me with v1.2.0, so I had to revert to v1.1.0.

FSC : error FS3031: The type provider '[...]\packages\FSharp.Configuration\lib\net46\FSharp.Configuration.dll' reported an error: Assembly attribute 'TypeProviderAssemblyAttribute' refers to a designer assembly 'FSharp.Configuration' which cannot be loaded or doesn't exist. Could not load file or assembly 'FSharp.Core, Version=4.4.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.

Reverting to 1.1.0 and running paket install to remove duplicate project file dependencies solved the issue for me without any modifications to other dependencies or binding redirects.

I'm working on a PR to address this

jbrestan commented 7 years ago

I've found a previous attempt at this which was rolled back due to TypeProvider implementation complexities. Found this in the links: http://bluemountaincapital.github.io/FSharpRProvider/devnotes.html

I think that with the new FSharp.Core and its transitive dependencies, unless there is a workaround that I am missing, there might be no other way...

rojepp commented 7 years ago

@jbrestan I'm running into this too. Is rolling back to 1.1.0 the only workaround?

rojepp commented 7 years ago

I wonder if updating this repo to FSharp.Core 4.2.1 would fix this since it doesn't reference System.ValueTuple? System.ValueTuple is not really needed for this project AFAICT?

jbrestan commented 7 years ago

@rojepp It's the only quick workaround that I found. Other one may be manually removing the extra System.ValueTuple reference from the project files (it will be used in design time though), but next paket install will create it again. I think it doesn't use value tuples anywhere, it's just a transitive dependency that needs to be carried around.

AFAIK FSharp.Core 4.2.1 can't support Type Providers yet. They need to be ported to .NET Standard 2.0 first. I'm also not sure how would 4.2.1 affect projects otherwise targeting full .NET Framework 4.6.x (like ours) using FSharp.Core 4.1.17 as runtime core lib.

rojepp commented 7 years ago

@jbrestan If I understand correctly, type providers work fine in 4.2.1, but only when you compile against NetFramework?

dnauck commented 7 years ago

@jbrestan had the same problem, downgraded to 1.1.0 (ref https://twitter.com/dnauck/status/869919003883524097)

sergey-tihon commented 7 years ago

Please try v1.3.0 This version is compiled using F# 4.0 for .NET 4.5 and does not include System.ValueTuple.dll and Fsharp.Core.dll inside.

Feel free to reopen this issue if something

jbrestan commented 7 years ago

I've tried 1.3.0 and it works perfectly. Thank you!

dnauck commented 7 years ago

Looks like this issue is also gone for me, thank you.