Visual Studio 2017 IntelliSense is not working for C++ - c++

IntelliSense is underlining all my identifiers in my C++ code and says:
identifier "WhateverPtr" is undefined.
But my code compiles without error and IntelliSense used to work a few days ago. Also there is no auto completion. IntelliSense works fine for my C# code though.
I have googled and tried every solution I found and I could think of, there are quite a lot solutions, because this seems to happen more often with VS 2017.
I found this site were basicly every solution is summarized, but none of them worked for me.
I tried to:
delete the hidden ".vs" folder
Check the Options -> Text Editor -> All Languages -> General "Auto List Members" (it was already checked)
Check if IntelliSense is disbled: Options -> Text Editor -> C/C++ -> Advanced -> IntelliSense DiableIntelleSense is False (it was on false like it should)
Of course I also tried restart VS / PC and rebuild and clean of the solution.
I changed nothing (at least nothing I would remember to cause such a behavior). The solution I have is very big with 160 projects and 1/3 of them are C++ projects. I also have Resharper Installed, but not for C++, so I do not think that ReSharper influence it.
Update:
Today I installed the newest update of Visual Studio (Version 15.9.14) and now my IntelliSense works again. But it stills underlines some of my Identifiers for no reasons.

Related

VS2017 Getting numerous 'Cannot resolve symbol' errors in source but everything builds

I am getting numerous 'Cannot resolve symbol' errors in a VB.Net source code file. Everything in the solution builds without a problem.
Peek Definition and Goto Implementation work fine.
Thus far, I have tried the following:
Did a Build | Clean, closed VS 2017, re-started VS 2017 and did a Build | Rebuild Solution.
Cleared the ReSharper Cache, Closed VS 2017, Restarted VS 2017.
Closed VS 2017, Deleted all .SUO files, Restarted VS 2017.
Manually deleted all output followed by a Rebuild All.
Are there any other known solutions to this issue?
Did you update Visual Studio recently? I had this happen after updating recently. The way I fixed it was within VS go into Tools -> Options -> "Projects and Solutions" and uncheck "allow parallel project initialization". Now load the solution and hopefully it will load ok now. Once everything looks good again, close the solution and go back and turn the option on again. Haven't seen the issue again after that.

Visual Studio 2015 (C++) : Stop compile on first build error (not first project)

How to stop the compilation of Visual Studio 2015 when it detects compile error?
I mean first build error (may be first .cpp), not first project because it takes too much time.
(I have only 1 project.)
An extension named "StopOnFirstBuildError" is not an answer,
because it stop on first project that has error.
Question
(more elaborate)
When I pressed F5 or Ctrl+Shift+B, the compiler would compile all (or some) files.
In my case, it can detect some errors using only 5 seconds, so I want it to stop compiling NOW.
However, the VS 2015 become non-responsive.
It also has strong resistance against Ctrl+Break.
It takes about 30 seconds before I can navigate to the location of error.
How can I stop the compile-process on the first compile error automatically?
History
There is an old thread asked about this for Visual Studio 2008.
Its most accepted solution is to go to :-
Visual Studio -> Tools -> Macros -> Macro IDE... (or ALT+F11)
and paste a certain piece of code.
However, macro is not supported anymore in VS 2012.
(I tried to press Alt+F11 in VS 2015, no macro editor / menu appear.)
The claim is consistent with a question for VS 2010 stated that the above trick is not work.
The solution for the VS2010 question is to install an extension named "CancelFailedBuild".
Thus, I downloaded it.
When executed .vsix (the installer), it said
"This extension is not installable on any currently installed products.".
... it makes sense because the extension said "Works with : Visual Studio 2010, 2012".
Now I think I am left with a single choice :-
Use macro (the old VS 2008 way) by installing Macros extension.
(The extension is a result of users' complain about losing the old macro feature.)
Is downloading the extension a good idea?
If so, what is the step after that? Is there a code that I should copy-paste?
If not, what is the easier way?
Sorry for posting a lot of hyperlinks.
Workaround
Below are the approaches that may alleviate some inconvenience, but do not answer the actual question at all.
Install a patch that make Visual Studio responsive, so Ctrl+Break works.
It requires me to press keyboard manually.
It seems to work only for Windows 7. (not tested)
Shorten compile time by creating a simple dummy .cpp, then compiling only that single file.
It is useful for some cases.
The solution for the VS2010 question is to install an extension named "CancelFailedBuild".
...
This extension is not installable on any currently installed products.
...it makes sense because the extension said that "Works with: Visual Studio 2010, 2012."
Visual Studio 2012 extensions are frequently compatible with VS2013 and VS2015. You can update the extension yourself by unzipping the .vsix file (it's just a ZIP archive) and updating its manifest (which is an XML file).
This guide shows you the XML elements to change.

Visual Studio 2012 / 2013 Syntax Highlighting errors

I have a problem with syntax highlighting in visual studio 2012 and 2013 preview with C++. I've had this problem since I installed both a few days ago (tried 2013 after I saw the problem in 2012).
As you can see from below, the colours are completely messed up in the text; some keywords such as int aren't properly highlighted, the grey return value is completely broken on various texts, the class colours have merged with various texts etc.
I've done the usual stuff found from google but had zero success, such as:
Reset intellisence from %appdata%
Reset user settings via command prompt or from Tools -> Import & Export settings
Turned off hardware acceleration in Visual Studio options.
This does not happen at all in Visual Studio 2010 fortunately, so I've kept that on my machine in the mean time. I did install 2012 and 2013 while 2010 was still present on my machine, but during install, i did not select the options to import 2010 settings, so "technically" they should have been clean IDE installs. The only other thing I've noticed is; when you start a project in 2012 or 2013, all the code highlighting is completely correct, but as soon as you change or add any text, everything messes up (like in the above image). So it does seem that Intellisense or whatever controls the highlighting only functions once on start up, and suddenly stops working for the duration of the program.
Delete this key
HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\12.0\FontAndColors\Cache
and restart vs2013.
Found it in a discussion on codeplex. Although my problem was the lack of colors, you should try it
I can't offer a solution to this issue, but I can tell you that it's an issue that's plagued Microsoft Visual Studio 2012. In VS2010, the highlighting was fairly basic for C++, as you couldn't set the colouring on user types and loads of other things.
In VS2010, like you I had no problem with the syntax highlighting at all, but there was a lot less that you could actually highlight. Ever since they introduced this extra highlighting for C++ so you could colour a lot more items, it's been very buggy.
At the moment, I've got operators in all sorts of colours, matching brackets and braces in different colours and half-coloured qualifiers etc. I've just had to live with it... but if you're reading this MS, please... PLEASE... pretty please get it fixed.

VS2010, DirectX and Intellisense troubles

I have both VS2010 and VS2012 installed, but only in VS2012 highlighting and auto-complete seems to work correctly. At the same time Intellisense seems to work on VS2010, but not for DirectX... Here's an example:
VS2012 - all well. Also note how all the Windows/DirectX types are highlighted.
VS2010 - no highlighting, no auto-completion.
VS2010 - but here we can see that IntelliSense actually works, just kind of selectively.
I have to use VS2010 so I need that problem fixed. I'm kind of new to Visual Studio so it may be something obvious I'm missing. Thanks for any help.
You can read about the IntelliSense in VS2010 in the documentation. The Complete Word option is also available:
"To open the completion list, type the first few letters of the name, or press ALT+RIGHT ARROW or CTRL+SPACEBAR."
You should also be aware of When IntelliSense Is Unavailable. Make sure you specified include directories for DirectX headers in the project's options correctly. Rebuilding the solution also helps sometimes.

No Auto Complete Visual Studio 2010

Im using MS visual studio 2010 PRoofessional version , and in both languages I'm using (C++ and UnrealScript with Nfringe ) there seems to be no auto complete , also with the nfringe there is no auto indentation either .
I was wondering how to fix this?
Most probably you accidentally switched into low-impact IntelliSense mode by pressing
CTRL+ALT+SPACE Just hit CTRL+ALT+SPACE to go back to the IntelliSense mode.
Are you writing a totally unmanaged C++ dll? There is no intellisense support for CLI/C++ projects in VS 2010
I have actually problems with C++ and Intellisense since VC6...
We now use Whole Tomatoes "Visual Assist" and it repairs Intellisense. :-) This single feature is the money worth.
When you open the solution file, do you get a warning about being unable to open the IntelliSense database? If so, that's the reason—UnrealEngine intentionally has a directory with the same name as the IntelliSense database to prevent its creation (Visual Studio can't create a file if a directory of the same name already exists). The engine code base is so large that having IntelliSense enabled slows everything to a crawl when you're editing code.
I'm also using Unreal Engine, and I met the same problem before, the solution was set the dirs by myself in VS project setting.
Open the property window of ur game project(e.g UDKGame), navigate to "NMake", "Include Search Path", and fill the needed header search path there.
You may copy the path list from the output of UnrealBuildTool.
The values u set here is only used by Visual Studio's IntelliSense, so there's no need to worry about build error.
This only works for C++, I'm not sure what's wrong with Unreal Script. I just updated to Visual Studio 2010 and has not installed the new nFringe.
Hope this answer is not too late