VS 2012 Intellisense cannot open source file *.tlh - Intellisense not working - visual-studio

I am working on a big solution that contains a mix of C# and C++ code using Visual Studio 2012 Professional with the latest Resharper plugin.
I obtain a fresh copy of the entire solution from source control.
As expected, Intellisense places its curly red lines under many types and fields in C++ code before I compile my Solution for the first time. However now these squiggly lines do not disappear even after (successfully) compiling the entire solution.
I get 100+ Intellisense errors saying "Intellisense: cannot open source file .tlh
But these files definitely exist at the given location and VS has full access rights to them as I start it with elevated rights..
I am even able to jump into the namespaces, declarations or whatever with the red lines underneath so the code definitely exists.
How do I make Intellisense worke again and make these annoying lines disappear?

Related

Visual Studio Diff shows unwanted case differences

I'm trying to compare two versions of a VBA file which are placed on a TFS. The Diff Tool shows several changes, but there actually are none.
♪And they don't stop coming...
In fact, VS tries to beautify the code by changing it's case despite the fact that I turned the Pretty Listing feature off.
Example
Well, I've disabled literally EVERYTHING here
Note: VS does not change the files either on disk or TFS.
The question is how to make it stop. I can't find real changes when comparing files.
Microsoft Visual Studio Community 2019
Version 16.4.6

View complete list of IntelliSense suggestions

I need to refactor a project in Visual Studio 2017, that has ~100 code files, each code file has few problems with variable/proc names, which IntelliSense suggests to fix. Can I see a full list of IntelliSense suggestions and apply them all - for all files or for a single file?

Visual Studio 17 And Unreal Engine

So, I have installed Visual Studio 17 for my Unreal Engine. I used Visual Studio 15 before. I know that Intellisense takes a lot of time to catch up with Unreal identifiers but I have waited for hours and Intellisense complains even with FName. It shows an error with a red squiggly line which says identifier "......"(<-could be FName,FString,AActor,etc) undefined. I developed the project in VS 15 till now and now I upgraded to VS17 and then I wanted to finish the project in VS17. But now Intellisense is acting weird. Also VS17 can't even open header files located inside a folder.The ones I had already opened in Visual Studio 15 work ok but complain of not being able to open source file. Compiling from the Unreal Engine still shows no error though. And the project runs fine. Attaching 2 pics below highlighting my issues.ALso VS17 also complains about being unable to open source file.
I have tried reinstalling VS17 and even adding /YU for making Intellisense load faster but it still doesn't help.
Also, when I type in Unreal commands, it doesn't even show up the commands or the information for them like their prototype and all the good stuff that Intellisense is supposed to help with.

Viewing a VB6 file in Visual Studio 2010 without trying to "build" it

I have a C#/.Net 4.0 project in Visual Studio 2010. Parts of this project were originally from an old VB6 program that was converted to C#.
Sometimes I need to look at the old VB6 code side-by-side with the C# code, and so it's very convenient to just open and view the file in Visual Studio. V.S. even displays comments and keywords in appropriate colors for easy viewing. To open the VB6 file I'm doing a File>Open>File. The VB6 file has a .cls extension.
The problem is that when I do that it also tries to do background compilation of it, so as soon as I open it, it registers hundreds of errors because VB6 isn't a supported language and even if I do a Build Solution or Rebuild Solution it includes those results in the build so I can't build my C# project when the VB6 file is open.
1. Why does it do this, considering that the VB6 file is not part of the current solution or project?
2. How do I turn it off so I can view the file but not have Visual Studio try to compile it?
Why does it do this?
The cls extension is mapped to the Visual Basic language service. It will interpret any file with that extension as a VB.Net file and process it as such.
The Visual Basic Language service is always compiling files to a degree in the background. It doesn't actually produce EXE / DLL but will go far enough to provide semantic information to the front end. This is used in intellisense, code highlighting, error squiggles, etc ...
How do I turn it off?
Unfortunately you can't. Visual Basic background compilation is not configurable. Hence any file which it believes to be VB.Net code will be processed in the background and errors will be displayed.
The only way to view it without errors is to rename the file to an extension not thought to be VB.Net code (like txt)

Visual Studio Intellisense crashes due to macro file

In Visual Studio 2005, I have a .h file with preprocessor macros in it. They are apparently too complicated for Visual Studio's Intellisense because they make Visual Studio crash if they are present whereas it works fine if they are not. Does anyone know of a way to prevent Visual Studio parsing the file for Intellisense but still include it in the build. By the way, I have already tried the following:
Disabling Intellisense by renaming feacp.dll. Works, but impractical.
Visual Assist. Works, but $250.
Installing Visual Studio SP1 + the Intellisense hotfix (KB947315). Doesn't fix it (and ate 1GB of hard drive space).
The first thing to try is to install Visual Studio 2005 SP1. This fixes a lot of intellisense related issues which may help you out
http://msdn.microsoft.com/en-us/vstudio/bb265237.aspx
If that doesn't fix the problem try excluding the file from the project. This prevents it any any of it's contents from appearing in Visual Studio features (such as intellisense). If it's just a header file it shouldn't impact the build as the actual file won't be removed, it just won't be considered part of the project.
Ok, for the benefit of others, I'm going to solve this myself! I've been fiddling and the answer is as follows. If you have this problem, and you delete your ncb file to force Intellisense to update, you can prove to yourself that this works.
#ifdef out the offending code in your .h file as follows:
#ifdef SOMETHING_UNIQUE
<the offending code>
#endif
in the file that actually uses the macros (the cpp file that #includes the .h file):
#define SOMETHING_UNIQUE
Intellisense will now ignore the code in the .h file that causes it to crash (it will be greyed out in the editor), but it still gets compiled.

Resources