-
Notifications
You must be signed in to change notification settings - Fork 2
Conditional Microsoft.Extensions.Logging.Abstractions inclusion based on netcoreapp2.1 targeting #10
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
Comments
To answer the easiest question first, even though it's not the main one:
Target frameworks and dependencies in the project file for a package apply to that package, not to the application that's using it. The conditional stuff in our project file that refers to |
As for why we have a reference to It's not the case that So I think we would probably need to do a new release to fix this. Technically .NET Core 2.x is already EOL and so we will be completely dropping support for it in a future SDK release, but our current SDK version that was 2.x-compatible (or at least was meant to be) is still supported and so it's still our policy to fix any issues it currently has. Right now I'm trying to think through what the right approach is to versioning such a fix. I think it depends on whether this could have ever worked for .NET Core 2.x apps. If it could not have (i.e. you're the first to have tried), then that's just a bugfix and so it's easy: we can put out a patch version that updates that one dependency. However... since the problem (I think) is more specifically with the dependency constraints of ASP.NET Core, it might be that a .NET Core 2.x app that did not use ASP.NET could have worked with our current package dependencies, in which case we would be breaking such an app if we changed our dependency version... so, by semantic versioning rules, we would need to have that be a major version release of |
In fact that is definitely the case, since our current CI builds include one that runs in .NET Core 2.1. So, the rest of what I said above is applicable. |
Okay, thanks for explaining that. It makes it a lot clearer. 👍
Yes, it does seem to only show warnings for me with ASP.NET Core projects (2.1 and 2.2). I tried making a minimal project to try to reproduce the runtime issues I'm encountering, but I haven't been able to. So there might be some other kind of package incompatibilities that I'm encountering in my larger project. |
Hi there,
We're having some issues right now with a
netcoreapp2.2
app withMicrosoft.NET.Sdk.Web
as project usingLaunchDarkly.ServerSdk
version 6.3.2. This server SDK version usesLaunchDarkly.Logging
version 1.0.1. From what I can see on this line, it looks like you're explicitly includingMicrosoft.Extensions.Logging.Abstractions
at version 3.1.9 for apps usingnetcoreapp2.1
. I'm not exactly sure why this is affecting my app that is usingnetcoreapp2.2
, but nevertheless, the error that I'm seeing is:If I add
Microsoft.Extensions.Logging.Abstractions
version 3.1.9 directly to my project, I get this warning when building:This builds, but ultimately leads to runtime errors.
From what I've understood, these
Microsoft.Extensions.*
packages are versioned in line with the current .NET Core (and now .NET) versioning scheme. So I would expect that if you're doing conditional targeting fornetcoreapp2.1
, the package version should be the latest within the 2.1.* line (or just use 2.1.* within the.csproj
to get the latest version).Am I misunderstanding something?
I know you don't officially support
netcoreapp2.2
, but I feel like there must be some way to have conditional targeting to allow for 2.* versions of theMicrosoft.Extensions.Logging.Abstractions
package. It would really help to unblock me, and possibly others in the 2.* version line of .NET Core.I suspect this issue will mostly go away in .NET Core 3.* and up since it seems like you no longer need to add these packages explicitly; they are added automatically as part of the
Microsoft.NET.Sdk.Web
project.Please let me know what you think, or if there is anything I can do to help.
Thanks!
The text was updated successfully, but these errors were encountered: