即使项目生成,Visual Studio也会显示错误

即使项目生成,Visual Studio也会显示错误

问题描述:

我在C#解决方案上的Visual Studio遇到问题.它显示完全随机的错误,但项目已建立.现在,我有33个有错误的文件,并且所有文件中都可以看到红色的波浪线.

I have a problem with Visual Studio on a C# solution. It displays totally random errors, but the projects build. Right now, I have 33 files with errors, and I can see red squiggly lines in all of them.

我尝试清洁/重建解决方案,关闭Visual Studio,甚至重新启动计算机.即使在Visual Studio中出现编译器错误,我也确保执行调试运行中所述的步骤.我可以修改.cs文件,然后看到解决方案中的更改.

I tried cleaning / rebuilding the solution, closing Visual Studio and even restarting my computer. I also made sure to do the steps described in Debugging runs even with compiler's errors in Visual Studio. I can modify .cs files and I see the changes in the solution.

有人知道为什么这么做吗?

Does anyone have an idea about why it does that?

如果您有ReSharper,请尝试清空ReSharper缓存:

If you have ReSharper, try emptying the ReSharper cache:

在菜单中的ReSharper>选项>环境>常规>清除缓存

In menu, ReSharper > Options > Environment > General > Clear Caches

并禁用和重新启用ReSharper:

and disabling and re-enabling ReSharper:

在菜单中,工具>选项> ReSharper>常规>挂起/还原

In menu, Tools > Options > ReSharper > General > Suspend / Restore