No Auto Complete Visual Studio 2010 - c++

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

Related

Visual Studio Intellisense only operates on the current Startup Project

Visual Studio Intellisense is bugging out and only works on my current startup project.
I'm in the process of building a multi-project solution and as of earlier today Visual Studio decided that Intellisense would stop colour coding and providing information about code that I hover over with my mouse.
this is happening in all files within the solution apart from the single one in my current Startup Project.
I'm unsure whether the fact that that file is inside the startup project is important or not or what at all caused the bug to begin the first place.
I've been searching around for a while and tried just about every 'solution' that has come up.
I've changed the relevant settings off and on again.
I've deleted the dynamic .suo file in the hidden .vs folder.
I've reopened the files, visual studio, updated, made sure intellisense wasn't doing something in the background.
Apparently this bug can be caused by a corrupt .ncb file that lives in the solution directories, but I've failed to locate a file with that extension anywhere.
I'm also not using any extensions or such that mess with Intellisense's operation.
Are there any other possible things to try (hopefully not reinstalling) or just continue writing code in black and white?
Intellisense working:
Intellisense not working:
Maybe you can check your intellisense setting in Tools > Options > Text Editor > C/C++:
This is a document about intellisense in C++. Hope it can help you.
If it doesn't work you can try to Reset all setting in Tools > Import and export settings. Or try to repair visual studio in visual studio installer.
If the above methods don't work, maybe you can only try to reinstalle visual studio.

Refreshing the auto complete (IntelliSense) database in Visual Studio

I've noticed that the auto complete feature in Visual Studio no longer works properly once my project has reached a certain size (in my case ~4,100 lines of code). I've also noticed that performance also degrades once the number of third-party libraries increases (namespaces and class attributes and methods are no longer visible).
Is there a way of manually updating the auto completion database or create a new one for an existing project?
I am currently working under Visual Studio 2008, but I have experienced this issue in Visual Studio 2010 as well.
For VS2015, 2017 and VS2019 close Visual Studio and delete the .vs folder in the same folder as the solution. It contains among other things the intellisense database (it should be possible to delete only the files specific to intellisense, if we knew which ones). Note that if you delete the whole folder you will lose your window layout configurations etc.
For previous versions, close Visual Studio and navigate to your project folder. The *.sdf file there contains the intellisense database- if you delete this files and reopen your project in visual studio, it rebuilds the cache.
Deleting the sdf file solved the problem for me.
Sometimes working with a big solution (mainly C++ projects) becomes
unbearably slow. To fix it you need to close the solution and go
delete the .SDF file. After that it returns to normal again, for about
a week, or so until you need to do it again.
The underlying cause is that the SDF file gets fragmented and,
according to xperf profiling I've done, VS will sometimes do 20,000+
random reads from it when changing between debug and release. Putting
the SDF files on an SSD fixes the problem but should not be necessary.
VS needs to use the SDF file more efficiently and not do blocking SDF
operations, ever.
Source: https://visualstudio.uservoice.com/forums/121579-visual-studio/suggestions/2255455-fix-the-delete-sdf-file-problem
In Visual Studio 2022, open Tools -> Options -> [type in "database" in the search box] -> Text Editor -> C/C++ -> Advanced -> Recreate Database = TRUE, and then reopen the solution.
In VS2017 I often run into this situation when I use interop to call CPP from C#, when something is changing on the CPP side.. e.g. constructor arguments.
Unload and reload the CPP project in the solution helps to solve the red lines..
I am using Visual Studio 2019 and have also been experiencing problems with Intellisense along with other features. I would be able to get through about 2 or 3 updates to a file before Intellisense stopped working along with code formatting.
The only way I was able to get things working again was to restart Visual Studio, I tried removing both the intellisense folder and the whole .vs folder but this didn't solve the problem, it helped but something else was going on.
I was finally able to fix this by turning off the Track changes option under
Tools->Options->Text Editor->General.
Right click on the solution and press "Rescan Solution".
It seemed to work for me.
For Visual Studio 2017 (and I think Visual Studio 2019 also), close Visual Studio, go into the .vs folder in your projects folder and delete all the contents apart from the .suo file, then reopen Visual Studio.
This way you can rebuild the Intellisense cache without losing your preferences.
After verifying daniol's results of Mar 15, I went into the .vs folder -> {MyProject} folder -> DesignTimeBuild folder and deleted the .dbtcache file and Intellisense now works "intelligently" with no loss of Window Layout or other .suo info. I suspect that the 'Diagnostics.DTBBLog' command offered by eq_ on Jan 4 did the same thing but that command seems no longer available, at least by that name.
For Visual Studio 2017 (and mainly using C# projects), the following has always worked for me:
Open a Command Window (View/Other Windows/Command Window) [Ctrl+W,A]
Enter the command "Diagnostics.DTBBLog" and press enter
No need to close solution and reload etc.
It was devastating to find out that for Visual Studio 2019 this command is removed...

VS 2010 intellisense not working for upconverted project

We have a very big C++ solution with several projects for which intellisense works perfectly in Visual Studio 2008, but not at all in Visual Studio 2010 (not even for structs defined in the same file where they are used). I've verified that intellisense does work in VS 2010 for other projects on my machine. I've tried importing one of the problematic projects from a brand-new solution with no success. Re-building the project files from scratch seems promising, but it would require days of work to follow that path, with no guarantee of success at the end. Any alternative suggestions are welcome. The actual error message I get is:
"Intellisense: 'No additional information available'(See 'Troubleshooting IntelliSense in C++ Projects' for further help.)
I've tried that, but there's basically only one suggestion on the MSDN webpage, to make sure "stdafx.h" on the include path, but we're not using precompiled headers and don't include it from anywhere, so I'm pretty sure that's not the problem.
Have you deleted all of the generated database (.ncb and .sdf) files? Corrupted database files is the most likely cause of Visual Studio failing to display IntelliSense.
Intellisense was not included as a component of Visual Studio 2010 for C++/CLI. Unfortunately, it seems they are not going to support it soon either. This is an incredible detriment, as i find myself having to open VS2005 on occasion to simply find an object member.
Here is Microsoft's release on the subject:
http://blogs.msdn.com/b/vcblog/archive/2011/03/03/10136696.aspx

How to downgrade solution from Visual Studio 2010 to Visual Studio 2005?

I have a huge Visual Studio 2010 solution. I work with Visual Studio 2005, so I want to convert the solution to the desired version. Basically, it's a portable C++ code so it should compile on Visual Studio 2005 too. Changing the version in the *.sln file doesn't help because the *.vcxproj format is completely different from the old *.vcproj format.
Recreating the solution by hand is not an option because of its size. Also there may be some non-default compiler flags, dependencies, etc. that I don't know of (and I can't look through ALL this XML junk that I don't understand).
There is already a related question on How Do I Downgrade a C++ Visual Studio 2008 Project to 2005. However, the utility suggested there supports at most Visual Studio 2008.
Any suggestions?
It really totally sucks, that every proprietary IDE today thinks it needs to create its own project file format.
"Dear IDE developers, just use Makefiles and create a nice GUI for it so that also people without Makefile knowledge can use it!" In VS6 it was at least possible to import/export Makefiles, but not today anymore. And it was possible to use nmake for automated builds. No IDE needed to be installed, just the toolchain which could be grabbed by a simple checkout without installation.
I use CMake now. It's free, it's cross-platform, it is well supported in free IDEs like KDevelop, QtCreator, etc. It can generate Makefiles and Visual Studio projects.
So you maintain only one project source, the CMakeLists.txt file and can work with any IDE. No pain with different versions of Visual Studio or with other proprietary project file formats.
This way you can generate or VS projects for developing and you can generate Makefiles for commandline builds using nmake like in the good old days.
BTW, it's much easier to change settings in a CMakeLists.txt than clicking through various GUI dialogs. But this is a matter of personal preferences.
In my work made a utility which utilized the EnvDTE.dll and scanned a vcproj-file and optionally all vcproj-files within a sln-file. It compared all settings with a "template" and would issue a warning or optionally update the setting to correct values. We used this utility so that settings would be verified to be correct and consistent throughout all projects. I haven't updated the utility to 2010 yet due to other priorities.
EnvDTE hasn't changed much from Visual Studio 2008 to Visual Studio 2010. Perhaps it is possible to create a simple utility which opens the vcxproj-file using DTE100 and saves it using DTE90, or earlier.
Easiest way is probably to create a new project in VS 2005, and use the add existing item dialog to add the code to the project. I'd suggest using 'Empty Project' as the project type, so you don't have a lot of rubbish autogenerated for you that you'll just delete anyway.
I haven't tried it, but this looks promising:
http://www.emmet-gray.com/Articles/ProjectConverter.htm
edit: Nope, not promising, sorry :-(

Visual Studio: Intellisense Problems and Linux Compatibility

Two somewhat unrelated questions:
Sometimes when I am working on a C++ project in Visual Studio 2008 Express, intellisense just does not want to "work" even though it really should. Auto completion box does not show and status bar says something along the lines of: "Intellisense: No further information is available".
Sometimes it can be fixed by either rebuilding the solution or re-opening the solution, and sometimes even that doesn't work. Is this a known problem? If so: are there any known fixes?
Is there any C++ IDE for Linux that has compatibility with MSVC++'s .sln files? I sometimes want to work on some project without having to go through the hassle of creating a new project and adding the files or manually creating a Make file.
edit:
To answer my own questions:
Apparently there's no real fix other than to try and delete the .ncb file. Alternative would be a different IDE or to use a commercial package replacing intellisense.
Code::Blocks seems to be able to open Visual Studio files. Or at least import them easily.
I posted these together as they both related to visual studio and I didn't deem them important enough to both deserve their own topic.
Do think the downvote is a little harsh though!
Intellisense failing is usually because of a "corrupt" ncb file. The usual solution is to delete it.
Reportly the next version VS 2010 will not be using ncb files anymore.
I've actually had some luckk opening .sln files using Monodevelop.
To avoid creating the Make files by hand try CMake
To answer your second question, there is no way to open .sln files in anything other than Visual Studio. They're a proprietary file type that (it seems) no one has any interest in writing a parser for.
You can however use Visual Studio to generate a makefile automatically. Just use the "Projects > Export Makefile" menu command in Visual Studio.