-
Notifications
You must be signed in to change notification settings - Fork 38
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
Are .net core dependencies necessary for the framework version? #174
Comments
Thanks for pointing this out. I reproduced this issue with a new 4.7.1 Net Framework project. I'm not sure how to prevent these warnings. Ideally, I would code the .csproj file so that it only includes the .Net Core packages in .Net Core projects. However, there seems to be no way in .csproj files to target Net Framework or Net Core projects. You can target Netstandard or Netframework versions in the .csproj file. However, it is perfectly legal to have a .Net Core project that uses say .Net 4.7.1. This is why when you install JSNLog in a .Net Framework project, it imports both the .Net Core packages and the .Net Framework packages. I could introduce different Nuget packages for Net Core and Net Framework. However, I much prefer to keep the one package for maintenance reasons. |
I think it's related to this: dotnet/standard#481 The thing is, I cannot switch to PackageReference as I have an asp.net project. Will keep investigating for a possible solution. |
Please introduce different nuget packages as seems to be common practice. I don't want to have to pull in and reference the 30+ .NET Core packages if I'm not using them. |
official announcement: aspnet/Announcements#324 - ASP.NET Core 3.0 will only run on .NET Core, so you cannot have a dependency on it, if you want to serve .net framework clients as well. |
I am having a similar issue. Is there any workaround to remove the AspNetCore references? |
Potentially Also connected to #203 |
The 2.28.0 nuget packages defines many asp.net core, and with them .net core dependencies for the .net Framework 4.5.2 version of the package:
Creating an empty .NET 4.7.2 web project, and adding the jsnlog dependency leads to many references warning as they are duplicates of the Framework:
Would it be possible to prevent those, by dropping the .net core dependencies in the Framework version ?
The text was updated successfully, but these errors were encountered: