My Visual Studio 2017 Enterprise edition CodeLens does not display - visual-studio-2017

Toggle the CodeLens feature off and then on again.
But CodeLens not display on method.
Visual Studio 2015 Enterprise edition working well, in same PC.
Go into Tools -> Options... -> Text Editor -> All Languages -> CodeLens.
Uncheck "Enable CodeLens" option and click OK.
Go back into Tools -> Options... -> Text Editor -> All Languages -> CodeLens.
Check the "Enable CodeLens" option and click OK.

Ok, I've managed to solve the issue for now.I've deleted the .suo file under hidden folder .vs, which lives in solution folder. Just navigate inside this .vs folder and find the v15 subfolder. Inside it, it will be a .suo file. Delete it and restart VS 2017.Hope it works for you!

I tried the solution mentioned here, it did not work.
So I just went ahead n reset the vs settings which did the trick.
Tools>Import and Export settings>Reset all settings (I did not save previous settings)

Related

Visual Studio 2019 Always run OLD version code

I tried many things that searched on google.
listing I had.
Project -> Property -> Debugging -> Debugging = Auto
Build -> Configuration Manager -> Check OK "BUILD" option ( Also I checked solution platforms and configs. )
Tools -> Option -> Build & Run -> Always Build. and Uncheck "just startup project & dependencys"
Those are what I did to build every pressing F5.
It doesn't work. even though I restart computer or visual studio.
What should I do for it?
ps. My Project is Visual Studio C++ (Empty)
I had the same problem. Looking for days but finally i found a solution.
The first step is to completely delete Visual Studio (installer as well,yes) and then install it again.This time check on "general options" and not "recommended for C++" in the beginning of the installation(Its where you choose the color of the IDE).I know it's sounds..weird.Let me know if it worked for you too!
This may be due to your visual studio having settings that launch the old working code if the current code has some issues.
You could change that setting using the below steps:
Tools > Options > Project and Solutions > Build and Run
Do below settings on the left pull-down menu
On Run, when build or deployment error occurs > Do not launch

Visual Studio 2017, Intellisense is not working

I just upgraded from VS2015 to 2017, and intellisense highlighting of syntax errors has disappeared completely.
I tried some suggestions found online, mainly Edit->Intellisense->Refresh Local Cache, but that option is not there anymore.
Under Edit->Intellisense there is only Quick info which does nothing when I press it, and toggle completion mode which is greyed out
I'm using Windows 10, C++ project.
Do I need to delete some old files from VS2015 in order for intellisense to work again? like the VC.db file?
Thanks
When IntelliSense stopped working in some files, I just deleted the project cache, restarted Visual Studio and opened the project again. Bear in mind that some minor settings also get reset (like the selected architecture).
Step by step
View => Solution Explorer (in case it isn't already open)
Right click "Solution 'Project name'"
Click "Open Folder in File Explorer"
Close Visual Studio
Show hidden folders (Win10 How-to)
Delete folder ".vs"
Open Visual Studio and project (wait a few seconds)
Hope this helps. -Minding
If you encounter a file in which the intellisense or error list is not functioning properly, look at the top-left corner of the navigation bar and check to see if that file is marked as “Miscellaneous Files”
If it is, the steps to solve the issue is:
Go to the file inside Solution Explorer.
Right-Click file and select Exclude From Project.
Right-Click your project/folder where the file was and click Add Existing Item, and add the file you just removed back into your project.
This should fix whatever issues you're having. (Tip: You can multi-select source/header files, so this does not need to be done one at a time).
Right-click on solution and select Rescan Solution (Visual Studio 2017). This should re-sync IntelliSense with solution data.
Please try to click Tools->Text Editor->C/C+±>Advanced, under IntelliSense, set
Member List Commit Aggressive to True and recheck this issue. Also, set
Use Aggressive Member list for Auto Member list to *False.
In my case, the project was referring to 2 different versions of the same library. I uninstalled one of the versions and intellisense started working.

Please select a valid startup item

I have migrated from Visual Studio 2008 to VS 2017.
I am getting this error when I try to run project with the green play button:
Obviously I have to select a valid startup item, but there are two pieces of information I need to do that:
what are typical valid startup items that I can try to select?
How do I select them?
I am a long time developer, but I am new to visual studio so please give me instructions based on terminology I can see on the screen.
It might be the case that you have opened your project using
File->Open->Folder
Use the right method to open your project using
File->Open->Project/Solution
or
File->Open->Website
File > New > Project From existing code. Select type of project > Next. Enter project name > Finish.
I went to File > Open > project/Solution and found the ".sln" file. I clicked on it and then pressed open and it worked for me. Just spent ages trying to figure this out!
Regards,
Open Visual Studio ------------------
Click File
Click Open
Open as Web Sites
Another method
Click File
Click Open
Open as Project
I found this question after I did File → Open → Folder as well. However in my case it's not a website, all I have is a source file. I don't want to create a full solution.
Now that Visual Studio supports CMake (to some degree), easiest is to add a simple CMakeLists.txt file, like this:
project (theproject)
add_executable (thetarget source.cpp)
As soon as the folder contains this file, Set as Startup Item turns up as a menu item in the Solution Explorer!
The only solution is that or this error:
please select a valid startup file is that repair your visual studio
double click on visual studio installer and then click on the More then repair your visual studio

Can't debug in Visual Studio 2017 (This project is out of date) [duplicate]

If I press F5, my project runs but it doesn't "see" any of the changes that I made. I need to manually (re)build before pressing F5 for it to work.
It worked well previously. Any idea what I need to change?
Also :
Right Click on the solution in the solution explorer.
Click on "Properties".
Navigate to configuration Properties -> Configuration on the left side of the window.
Make sur the "Build" checkbox is checked on the line of your project.
Is it possible that you've reconfigured your "Build and Run" settings to "Never build"?
To check, follow these steps:
From the Visual Studio IDE, open the "Tools" menu, and click "Options".
Expand the "Projects and Solutions" header on the left.
Click the "Build and Run" item.
In the combo box labeled "On Run, when projects are out of date", ensure that you have the "Always build" option selected.
Another reason (which I had) could be dependencies.
In Solution Explorer, right click the Startup Project - Build Dependencies - Project Dependencies.
If the project you are working on is not set as a dependency of the Startup project then it won't get Built when you F5 / run.
Ok, for some reason all of the above solutions do not work for me, so I made a Pre-Build event (Right click project -> Properties -> Build Events) where I delete the bin and obj folder before building.
I am new to C# and Visual Studio but i found that going to Build -> Clean Project also worked for me, if you have already tried to select "Always build" option and it didn't work.

How to enable IntelliSense for C++ in Visual Studio 2015

I've just installed VS2015 for C++ development, however traditional hot keys like ctrl+space or . or -> don't show the IntelliSense window.
Somewhere on the web I found that I needed to open the IntelliSense Manager from the Tools menu. But that's not in my Tools window.
In addition, I reviewed related items in my IDE settings and found a Text Editor -> C++ -> Advanced - IntelliSense section with a number of settings, including Disable IntelliSense, which is True in my setup. The problem is that all settings in this section are readonly (not editable).
How do I fix the problem?
VS2015.2, fresh install. No previous installation on this host.