Visual Studio 2010 Wrongly underlines code / comments with a red error line when there is no error

I am working on a rather large project, and I am having strange problems with the IDE in terms of error checking and somewhat with IntelliSense.

Usually, if I typed something piercing, for example, "int a =" aa ";", he would underline "aa" in red. However, I see that VS does this to random parts of my code when I make minor changes.

For instance:

/* Some comment here, just going to stretch it out for my example.. */ int proto1(); int proto2(); 

If I make changes to other parts of the project, sometimes random functions will get the underlined and even part of the comment. As just 30 minutes ago, he emphasized the equivalent of half of this comment, starting in the middle of the word “comment,” he also emphasized all int proto1 (); and the int proto2 () part;

I would post screenshots, but I am bound by a contract so as not to disclose any work, and I cannot easily reproduce it in small projects.

I don’t understand why he does it. When I compile the project, any fake errors and underlining it go away and it compiles in order. The fact is that there are no errors. It creates random errors and emphasizes random lines / words / words. I would also like to point out that there seems to be a big delay in loading new intellisense information, almost 2-3 minutes or longer.

I will try to reproduce it in unrelated projects and publish it here if I can. However, any help would be appreciated.

Thanks!

* Edit: I forgot to notice that pressing the spacebar several times will sometimes correct errors, but this is unreliable and does not always work.

+4
source share
4 answers

Intellisense can sometimes really loop into complex code. I think that before the release of VS2012, we can’t do anything.

However, there is one trick that I use, if that happens - switch the assembly configuration of Debug -> Release, and then again. You do not need to wait, you can just double-click on the drop-down list. It should update the IS cache and make a red mistake, emphasizing dissappear.

+6
source

Intellisense is often turned off, but make sure you have the latest updates. I just installed sp1 yesterday and many problems with Intellisense went.

0
source

I see this is an outdated question, but some may find this helpful.

I had the same problem. I have tried many of the solutions outlined here and elsewhere. I finally tried running Visual Studio as a different user (Shift Right Click Run As Different User), and the problem did not occur. Then I logged on to my computer as another user and deleted the user profile that I had a problem with.

If your profile is important to you or there is information in it, which is important, I highly recommend that you first back up the relevant information. If you do not understand what information your profile contains, make sure that you do this before deleting.

1) Log in as another user (with administrator rights) that you want to delete

2) Open "Properties for the computer"

3) Advanced system settings (on the left side)

4) Settings for user profiles (in the middle)

5) Select the profile you want to delete and click the delete button

6) Reboot

Credit: https://superuser.com/questions/63017/how-do-i-delete-a-user-profile-on-a-windows-7-machine-that-is-part-of-a-domain

0
source

I had the same problem and in my case it was mainly related to library functions and types defined in libraries. This is fixed for me:

Open command line options. You can use the following information: Project> ProjectName properties> Configuration properties> Connector> Command line

In the additional options window below add /I "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include"

You, of course, need the right path where Visual Studio will be installed.

Bingo! Hope this works for you too. :)

-1
source

Source: https://habr.com/ru/post/1401711/


All Articles