问题描述
我不经常重启计算机,今天早上才这样做。 VSCode启动时,看起来好像进行了更新,现在IDE正在抱怨错误。
我的应用程序仍然可以编译并且可以正常运行,但是在IDE中,我看到30k错误,都表示类似以下内容:
'The type XXXXXX is defined in an assembly that is not referenced. You must add a reference to assembly 'netstandard,Version=2.0.0.0,Culture=neutral,PublicKeyToken=cc7b13ffcd2ddd51'. [MyApp.Application]'
好像omnisharp是最新的。
我也在Mac上。
解决方法
感谢@Martin Ullrich和@Chris Kooken的一个很好的问题。我认为这应该是该页面的下一个访问者的认可答案。
遵循这些steps可以帮助我解决问题:
* Go to the VSCode settings (File > Preferences > Settings).
* Search with the keywords omnisharp use global mono to locate the configuration.
* Change the value to never from either auto or always.
* REMEMBER to restart the VSCode to activate the change (I restarted it twice to be sure).