Visual Studio 2015 doesn't open saved projects - c++

I'm just starting off with VS (2015 version) (C++ in general) and, knowing my luck, I immediately stumble upon an issue: VS 2015 doesn't open saved projects. I believe that it loads them up but doesn't bother to view them. I can't really describe it in words so I'll post a GIF. Any and all help would be appreciated.
A more detailed GIF

On the right side of your screen there should be a vertical tab called "Solution Explorer".
Clicking on it reveals your solution, its projects, and all the files associated with it. From there you should be able to find the files.
If you still can't find the files, it is likely that you didn't include them. You can add them to a directory in "Solution Explorer" by Right-clicking -> Add -> New Item -> C++ File
This happens when you close every tab in your project, and because VS saves the state of your tabs, when you reopen the project, they are all closed.
Also note that by default, when creating a whole new project, there are no files to open, so the screen will also be empty.

You can also use the shortcut key to show the solution explorer. Ctrl-Alt-L by default I believe.

Related

Can I make Visual Studio show a notification or alert when I open a particular project or solution

I would like to perform an action upon opening a particular Visual Studio 15/17/19 solution.
I need to inform anyone who is about to work on the project that there are important notes (included in the project) that they should read first. Ideally it would be a pop up so as to be very obvious.
When googling I can only find solutions that involve Visual Studio extensions but I need something that does not rely on anyone else doing anything (e.g. installing the extension) - it needs to be something dependent only on the project itself.
I'm hoping for something that I can add in the .sln or .scproj file that VS will see when it loads the solution and take action, but anything that achieves the same purpose would be good.
I'd be grateful if someone is able to let me know how I can achieve this.
You've got an extension called Solution Open Pop Up supported on many versions of Visual Studio.
In the Overview tab there is a Features section where you can see a short example of how to use it. From the extension's website:
If a file called SolutionOpenPopUp.txt and/or ReadMe.txt exists in the root folder of the solution, the contents are shown in a pop-up when the solution is open.

Which attach to process should I choose for visual studio 2017?

I'm not sure which one should I pick.
Visual Studio is trying to find an instance of the program that matches the cpp file you opened to debug the program. Not what you want to do.
You need to create a Visual Studio project to manage the program you're going to build. Select File->New->Project
From the Dialog that brings up, Track down and expand Visual C++ in the tree structure on the left. Look for and select Win32. Click Win32 Console Project from the pane in the middle. Name the project appropriately and place it somewhere on the hard drive where you can find it easily later. Click OK.
Now you get the Application Wizard. Click Next. Uncheck Precompiled Header. You probably don't care about the SDL checks either, but they won't give you the kinds of grief the Precompiled Headers will at this stage of your career. I don't think anyone really knows why Precompiled Headers are on by default, but by the time you need them, you know what they are and how to take advantage of them. A one file program doesn't need them and leaving them on will give you a bunch of errors. Click Finish.
Select all of the code in the editor. Paste the code provided by the instructor over top of it.
To build and run the program click the green Play button.

Turn off Visual Studio popups

I have a large project that I have to load and work on. Nothing I can do about it - just load the solution and all projects within it.
Problem is that first several minutes VS loads project one by one and it constantly inform me about it by constantly displaying some "Loading project is required..." window. Sure, I know it is required, but cannot it be somehow done in the background? I would be content if I could just open some text editor and tune configs or read documentation without popups stealing the focus.
It happens on all project regeneration (we use GYP) - since VS solution and projects are generated each time I have to work on new C++ defines/flags/dependencies settings I have to sit and watch VS spamming those little windows.
It has another drawback - if right after project regeneration I'll try to build it VS will "block" - it will complain that it cannot close the project when build is running and I have to terminate the build in order to "close" the project. I understand that what it really does is close and reopen it in order to update settings... but popup that locks whole IDE certainly makes it more annoying.
I know that I can disable automatic reload of source file when it was edited outside by e.g. Sublime Text. Are there some solutions that would allow me to do the same for projects? Some settings, plugins or register entries that would prevent those windows from spamming or which would reload project when it suits me? It's really annoying when I have to switch to ST each time I regenerate and build projects because Visual Studio will stay locked until the build is finished.
I have a similar issue with CMake-generated Visual Studio solutions. While I don't have a solution, I've found a workaround which works just fine for me - close the solution before re-running the generator, and open it again when the re-run's finished. Under normal keymappings, it's Alt+FT to close, and Alt+FJ1 to open again.
Disable Intellisense, Visual Studio usually takes a great deal of time during project load parsing headers and building up its intellisense database. Disable that and see if your load times improve.
Might not be applicable if you can't change your solution, but I'd try to move less important modules/projects to DLL or prebuilt libraries. Candidates for this are 3rd party / external libraries that you don't plan on changing or potentially really stable sections of your code base.
Good luck.
The VS system records the last solution associated with each project in the .SUO files. If you delete the .SUO files, you will then be able to open the project files individually, and then save a solution containing just the projects you want to open.

Using Visual Studio 2012 Express Version to reference dll

I recently have been asked to write a .dll and some function that works with it. Since I've never touched this before, I would appologize if I asked something stupid.
First of all, my IDE is Visual Studio 2012 Express version.
On the other (green) hand, I follow the instructions at: http://msdn.microsoft.com/en-us/library/ms235636(v=vs.110).aspx to create projects.
I successfully built the dll project as adviced. The .dll file is peacefully lying in the Debug folder. However, when I create another project and try to reference to the .dll file that I created in the first project, at Framework and References page, I clicked Add New Reference, and no dll is found.
I am quite confused at this, since I've done everything the MSDN said. Thus I start to wonder if this is a limitation of Express version.
Can anyone clue me if I am on the right track?
Many thanks in advance.
The instructions say
The Add Reference dialog box lists the libraries that you can
reference. The Project tab lists the projects in the current solution
and any libraries that they contain. On the Projects tab, select the
check box next to MathFuncsDll, and then choose the OK button.
This means you add a reference to the dll project in the references section, not the dll that it produces.
Don't forget to link with the .lib file the dll project produces and give it a fighting chance of finding any header files you need to include, as per the instructions

Visual Studio 2008 Navigation Bar Confused

I am refactoring a (rather long) C program using Visual Studio Professional 2008 (9.0.30729.4462 QFE). I use function picker drop-down in the navigation bar to jump between functions in the source quickly.
I added a function to the top of some source code and now the function picker drop-down in the navigation bar is just wrong. It sometimes jumps me to a different function, or inside another function.
I've tried cleaning, building, rebuilding the project, closing and reopening the project and even rebooting my computer, and nothing fixes this.
My supposition is that the IDE needs to rebuild its source code index, but I've been searching to no avail to location such a file much less how to force a rebuild.
Thanks!
Deleting the .ncb file and reopening the solution should fix the problem.
Visual studio parses your source code and stores the results inside the .ncb (Intellisense database). The file is used for auto-completion, class-view browser, etc... It usually rebuilds automatically, but sometimes it needs a manual clean.