Skip to content
This repository was archived by the owner on Jan 12, 2024. It is now read-only.
This repository was archived by the owner on Jan 12, 2024. It is now read-only.

Unable to load projects on .NET SDK 6.0.301 due to NuGet.Frameworks load errors #1470

@baronfel

Description

@baronfel

Describe the bug

The language server extension bundles a version of NuGet dlls that is incompatible with the ones shipped in the SDK. Because MSbuild Locator is used to locate and run MSBuild DLLs from the SDK, there are version mismatches that lead to errors running targets in the build.

This was initially reported at dotnet/sdk#26065, with detailed resolution steps here.

To Reproduce

Please see the linked issue for reproduction steps.

Expected behavior

The language server should be able to load projects.

System information

  • Version of the NuGet package or extension for which the problem occurs: v0.24.210930
  • Your operating system and .NET Core version: Ubuntu 22.04, .NET SDK 6.0.301
  • For issues with extensions, the version of the IDE for which the problem occurs: Visual Studio Code version 1.68.1

Additional context

The short form of the resolution is that the NuGet.Frameworks PackageReference in the LanguageServer should be marked ExcludeAssets="runtime".

Metadata

Metadata

Labels

area: editorExtensions for Visual Studio and Visual Studio CodebugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions