jamheadart
jamheadart

Reputation: 5293

Visual Studio project Code Analyser path has changed

I created a default asp.net core 3.1 project. When I unload the project and reload, the three analyzers in Dependencies > Analyzers have yellow exclamation marks and they become absolute filepaths e.g.

C:\Program Files\dotnet\sdk\3.1.100\Sdks\Microsoft.Net.Sdk.Web\analyzers\cs\Microsoft.AspNetCore.Analyzers.dll

They also don't have properties (which is where that filepath normally lies)

What happened here? How can I fix this?

After unloading and reloading project:

Erroneous Full File Path

Clicking on the above analyzers shows nothing in the properties window

What it normally looks like:

Normal

These defaulted analyzers show a populated path property

Upvotes: 4

Views: 849

Answers (1)

jamheadart
jamheadart

Reputation: 5293

Though the default project is created without Nuget packages, I managed to fix this by installing Microsoft.AspNetCore.Components.Analyzers 3.1.0 with the NuGet package manager.

After unloading and reloading again, it worked.

Upvotes: 3

Related Questions