1

I'm in the process of updating a library in a larger solution. For this purpose, I have removed the old references in all projects and added new ones.

If I compile the solution now I get about 3000 build errors, which indicate that various classes are defined in the old, removed libraries and I should add a reference to them.

After I have opened a reported file, Visual Studio recognizes that these classes are also included in the new libraries and removes the error.

Now I don't want to open hundreds of files to make these ghost errors disappear, especially because the problem repeats itself after the next build.

Does anyone have any idea how I can get Visual Studio to stop reporting ghost bugs?

I'm using Visual Studio 2022.

ΩmegaMan
  • 29,542
  • 12
  • 100
  • 122
ringhat
  • 23
  • 4
  • C#? VB.NET? C++? TypeScript? Keep in mind no other here can see your screen, so edit the question to include enough details (or screen shots if it is difficult to describe clearly). – Lex Li Sep 14 '22 at 15:46
  • Sorry, its a solution with C# Projecta. But it seems to me to be more an VS issue than a language problem. – ringhat Sep 15 '22 at 06:23
  • 4
    Clean the solution, remove bin and obj directories, restart Visual Studio, remove the .vs directory? – CodeCaster Sep 15 '22 at 15:10
  • Try to close Visual Studio and delete .vs folder in project location, it should work. Take a look at this answer, https://stackoverflow.com/a/57519860/3559462 – Vikas Lalwani Sep 15 '22 at 15:15
  • 1
    While you might feel like it is a VS issue, different languages use different technologies behind the scene to enable code analysis and error reporting. By knowing you are working on C# projects, I can then add two more tags and experts in those areas can take a look. Make sure you select the correct tags for your future questions here. – Lex Li Sep 15 '22 at 15:22
  • For VS 2022 caching is a common issue. see what @-CodeCaster said – T.S. Sep 15 '22 at 18:15

0 Answers0