Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 786
jamheadart Avatar asked Sep 18 '25 14:09

jamheadart


1 Answers

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.

like image 142
jamheadart Avatar answered Sep 21 '25 03:09

jamheadart