Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Microsoft.CodeAnalysis.Analyzers, version 2.9.4 was not found Error

I am getting below error while build application, I have Microsoft.CodeAnalysis.Analyzers package is installed.

Error   NETSDK1064  Package Microsoft.CodeAnalysis.Analyzers, version 2.9.4 was not found. It might have been deleted since NuGet restore. Otherwise, NuGet restore might have only partially completed, which might have been due to maximum path length restrictions. TA_App  C:\Program Files\dotnet\sdk\6.0.401\Sdks\Microsoft.NET.Sdk\targets\Microsoft.PackageDependencyResolution.targets
like image 309
Rajesh Sawant Avatar asked Mar 23 '26 06:03

Rajesh Sawant


1 Answers

Clear all Nuget packages with this command

dotnet nuget locals --clear all

after that rebuild your solution will work for you.

like image 93
Kiran Joshi Avatar answered Mar 24 '26 21:03

Kiran Joshi