Visual Studio 2010 File->New->Project Grayed Out - c++

I created a solution of Win32 Project.
Then I clicked on File->New->Project and created a new Win32 Project, but added the project to the current solution, just so I could see both projects in the Solution Explorer. (Because Visual Studio can only display one solution at once, as I am told).
Now I am trying to create a third project to the solution, but when I go to File->New->Project, this option is totally grayed out.
What happened here? And how do I solve it? What I want is to be able to have many projects in the Solution Explorer, and I tried to do so by adding the projects to current solution.

I was in Debugging Mode (ie running my program). Therefore, New Project was grayed out. To fix the issue, simply exit debugging mode (Shift + F5)

Related

Visual Studio 2017 source control missing in file menu

As a starting developer I am running into some problemes with Visual Studio 2017. I developed some weeks without any problems, but now I can't add a project under source control.
If I add a blank solution I used to be able to add a new project to that solution, but that option isn't visible anymore. It happend when I added a project under source control. How can I undo this?
missing menu (picture from a manual made earlier)
Solution: File --> Open --> Open from source control --> select the right project.
Now new projects can be added to the solution. Save this solution and you can open it when VS starts.
Not sure, but see if this works. This was in visual studio 2013, but is the same problem.
Click here!

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.

Visual C++ 2010 error. The system cannot find the file specified when running LibICP

There is a code for running libIcp for Andreas Geiger. I downloaded the code, and build the sln based on CMAKELISts.txt. Everything good so far.
According "readme.txt" I Opened the resulting Visual Studio solution with Visual Studio and Switched to 'Release' mode, build all and run the demo program. but 1st this window came up:
And Then I got this error:
Any help is appreciated.
You can not run the ALL_BUILD target it does not create an executable. It is there to force building the entire solution. Select an application target from the solution in Solution Explorer. Right click on that target and click set as start up project. This option should be around in the middle of the popup menu.

Incorrect main method running in visual studio

I'm trying to do some tutorial C++ programs to familiarize myself with the language. I'm using Visual Studio 2010. I have a Visual Studio solution with two projects - I'll just call them projectA and projectB. Each project has a source file with its own main method. However, when I try to run the program in projectB, the program in projectA runs instead. I'm coming from an Eclipse IDE where projects separate the programs. I've some msdn articles on solutions and projects, but I haven't seen anything about being unable to have multiple source files with main methods in them. Can someone help to clarify the Visual Studio Solution/Project structure for me, please.
Right click on the project you want to run, and select Set as StartUp Project
You have to right click on the project and "Set as Startup Project" to tell Visual Studio which project you want to actually run.
I hope this is a nice simple fix: if you look at your solution and have both projects open, you should be able to right click one of them and set it as default (Set as Startup Project), (which sounds like at the moment is set to projectA).
I have highlighted the relevant option in the menu picture:
Either you can right click on the project in the Project Explorer and select Set As StartUp Project or you can use meny item Project and also select Set StartUp Project.

visual studio 2010 unable to start program .dll

I have a problem for my visual studio 2010. When I click start debugging button and it's start debugging.
It seems that there is no error "i just create one "button" on it "
But it will show Unable to start program 'c:\users\.....\xx.dll'
Does someone now how to solve it?
The second question is: when I click left button to see the "Button" source code,
why it will show all this project code? Should I revise some setting?
Visual studio will not run a .dll by itself. does your solution have an .exe project? if so, right click it and select "Set as Startup Project". if not you will need to create one, and instruct it to load the forms within your dll.
as for left clicking the button, I'm not quite sure what you are describing. can you post a picture?
In earlier versions of MSVC while running .dll, will get a dialog asking path for .exe file
But in MSVC 2010 and above there is no such option. To fix this
Right click on your dll project
Properties
Configuration Properties > Debugging. Here, in Command -> add path to your exe.
Add command arguments, if any.
You are good to go!