CS2015 ~\6.0.201\Sdks\Microsoft.NET.Sdk.Web\analyzers\cs\Microsoft.AspNetCore.Analyzers.dll is a binary file instead of a text file

Minas Kyriakou 1 Reputation point
2022-03-18T07:57:26.777+00:00

When i try to compile my asp.net core 5.0 application i am getting this error
-Error CS2015 'C:\Program Files\dotnet\sdk\6.0.201\Sdks\Microsoft.NET.Sdk.Web\analyzers\cs\Microsoft.AspNetCore.Analyzers.dll' is a binary file instead of a text file WebUI C:\Users\Minas\Source\Repos\Photiades Education\PhotiadesEducation\WebUI\CSC 1 it looks like my parser is not recognizing the dlls alongsite with core analyzer also core mvc analyzer, compnents analyzer. This project builds and run fine in my other computers.

-I tried to clean my solution and rebuild.
-Hard delete obj and bin folders and rebuild.
-Deleted .nuget folder and restore my project.
-And also re install visual studio 2022 after full formatting my computer.

But the error is not resolved.

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,623 questions
Not Monitored
Not Monitored
Tag not monitored by Microsoft.
39,806 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Minas Kyriakou 1 Reputation point
    2022-03-21T15:30:13.617+00:00

    @Tianyu Sun-MSFT Thanks for the comment. I resolve the problem by manually installing the previus dotnet sdk and update the MSBuild path in my IDE. (5.0) The problem was that after installing 6.0 sdk something went wrong and MSBuild directory was pointing to the latest version even tho my project was build on the previus.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.