Skip to content
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

net40 target has compability issues with .NET 4.5+ frameworks #31

Open
jklawrence opened this issue Aug 19, 2021 · 0 comments
Open

net40 target has compability issues with .NET 4.5+ frameworks #31

jklawrence opened this issue Aug 19, 2021 · 0 comments

Comments

@jklawrence
Copy link

I'm using Lambda2Js.Signed as a transitive dependency of RavenDb.Client in a .NET Framework 4.7.2 application.

Lambda2Js.Signed's NuGet package has a net40 lib and a netstandard1.0 lib. Since I'm using .NET Framework, NuGet package manager picks the latest .NET Framework version of the package, net40. This would be fine, except the net40 package has some compatbility definitions of types that exist in mscorlib in .NET 4.5 and later, such as System.Threading.Interlocked. Because of this, my application is full of warnings like warning CS1685: The predefined type 'System.Threading.Interlocked' is defined in multiple assemblies in the global alias; using definition from 'c:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.7.2\mscorlib.dll'

I am able to manually edit my csproj to use the netstandard1.0 lib instead of net40, which resolves the issue. But any updates through NuGet package manager will reverse this, making this dependency fragile.

Would it be possible to add a new net45 lib to the NuGet package that doesn't contain the net40 compatibility types? This would help anyone on .NET Framework 4.5 or later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant