Aspnetcore: Microsoft.AspNetCore.All 2.0.0 breaks with .NET Core 2.0 Preview 2 tooling

Created on 13 Aug 2017  路  5Comments  路  Source: dotnet/aspnetcore

I'm not sure this is the right place with the Microsoft.AspNetCore.All package now, but hoping so.

I just tried updating my sample apps for libraries using Microsoft.AspNetCore.All 2.0.0-preview2-final to the 2.0.0 release now listed on NuGet.org. I was using the .NET Core Preview 2 tooling (the latest available from https://www.microsoft.com/net/core/preview as of writing this.

This causes an exception on load:
Could not load file or assembly 'System.Diagnostics.DiagnosticSource, Version=4.0.2.1

(I'm sorry I don't have a full stack, I thought I had it in the paste buffer before upgrading but didn't). Throw at (default/vanilla Program.cs):

c# WebHost.CreateDefaultBuilder(args) .UseStartup<Startup>() .Build();

...so only a runtime issue, it compiles fine.

To resolve this, I had to grab a nightly SDK build from https://github.com/dotnet/cli/tree/release/2.0.0#installers-and-binaries, then it runs just fine. IMO this is a very confusing state for users, where they can't use the latest stable package with the latest available tooling, both on the stable/public sites and not the nightly path.

Can we do something about this? Should the 2.0.0 package not be listed yet on NuGet?

Most helpful comment

cc @muratg . Publishing unlisted is certainly something we can try next time there's this type of incompatibility.

All 5 comments

This is indeed a side effect of packages being published early, before the matching runtime/SDK build. NuGet does not have a true staging feature as yet so we we're unable to pre-stage them then make them live simultaneously with the SDK. That said, we could possibly push them unlisted so that they aren't offered as updates or returned in search results until the SDK is out too.

@eilon

I agree with unlisted publish + loop through API calls to list upon SDK release, that seems like the sanest option currently available.

Had this exact error last night. Puzzled me for an hour. Luckily some other users on discord pointed me to the same SDK fix. (Why are they so hard to find?)

cc @muratg . Publishing unlisted is certainly something we can try next time there's this type of incompatibility.

It's out now!

Was this page helpful?
0 / 5 - 0 ratings