Visual Studio not displaying compile time errors i

2020-02-20 05:46发布

For example, when I write:

string x = "turtle";
x.Go();

There is no red squiggly line detecting the absence of the Go() method on String.

Only when I compile does the error get detected.

I've just upgraded to Windows 7, I have Visual Studio 2008.

In my old environment the errors were detected before the actual compile.

Is there a setting that I am missing?

EDIT: "Tools -> Options -> Text Editor -> C# -> Underline errors in the editor" is checked.

I dont have the "Live Semantic" option. Maybe I need to go to SP1?

7条回答
Root(大扎)
2楼-- · 2020-02-20 06:47

I had the same issue and had SP1 installed and had Underline errors in the editor and Show live semantic errors checked in VS2008's options.

My solution was to download Microsoft Visual Studio 2008 Service Pack 1 (Installer) and re-install the package. It wasn't classified as a 'repair' or a 're-install' despite the fact it was already installed, but it worked.

查看更多
登录 后发表回答