Roslyn: Version used in VS 15.8 not available on NuGet (Breaks VS extension using MSBuildWorkspace)

Created on 16 Aug 2018  路  12Comments  路  Source: dotnet/roslyn

It seems Visual Studio 15.8 is using version 2.9.0 of the Microsoft.CodeAnalysis assemblies. But these assemblies are not available on NuGet currently.

It seems that MSBuildWorkspace was moved to a new assembly in 2.9.0, which currently breaks one of our Visual Studio extensions. (Also don't know how to make an extension compatible with both 15.8 and older versions, but that may be a discussion for another topic I guess).

Area-Infrastructure Bug Developer Community Resolution-Fixed

Most helpful comment

Just uploaded Microsoft.CodeAnalysis.Workspaces.MSBuild to nuget.org. It is a new package, some extra steps were involved for publishing it, hence the delay. It should appear shortly.

All 12 comments

As a thought, could this have been avoided if TypeForwardedToAttribute had been applied for all types that were moved? And if so, shouldn't that be added? (According to https://docs.microsoft.com/en-us/dotnet/framework/app-domains/type-forwarding-in-the-common-language-runtime)

See the discussion in https://github.com/dotnet/roslyn/pull/21670 for this.

Oh, thanks... wasn't aware of the requirement to reference the assembly to which the type was forwarded. So I take it the breaking change was deemed necessary then, which of course is unfortunate for some of us.

But is there a time frame for when the 2.9.0 versions will be pushed to NuGet so we can at least re-write the extension for 15.8 and get it working there?

@alphaleonis Yes, the old API needed updates that involved signature changes, so even with type forwarding the compatibility would have broken. You can see how the signature change impacted a use of OpenSolutionAsync in DotNetAnalyzers/StyleCopAnalyzers@87c80dbdd549d41c2986cefdf44106e87fd4a184.

also referred here

Tagging @Shyam-Gupta about the uploading timeframe.

@sharwell Couldn't find much of a signature change in the commit you referenced, but I trust you there were some. We'll just have to create a separate extension for 15.8 it seems as soon as version 2.9.0 has been released to NuGet. Thanks for the information though.

The error message tells me I need to add a package reference to Microsoft.CodeAnalysis.Workspaces.MSBuild that doesn't exist and then says see go.microsoft.com/fwlink/?linked=874285 for instruction to use MSBuildWorkspace successfully but this is a 2017 article that does not mention MSBuild.

@paul1956 It seems that they have now uploaded some of the 2.9.0 packages to NuGet, but the new Microsoft.CodeAnalysis.Workspaces.MSBuild package still seems to be missing. :(

@jinujoseph Not sure about the Resolution-Answered tag.. the package is still not available on NuGet it seems, and we haven't been informed on when it will be?

Just uploaded Microsoft.CodeAnalysis.Workspaces.MSBuild to nuget.org. It is a new package, some extra steps were involved for publishing it, hence the delay. It should appear shortly.

Thanks for the quick fix! :)

Was this page helpful?
0 / 5 - 0 ratings