In Visual Studio, can you add a folder-based project in a solution? - visual-studio-2017

Visual Studio finally has the ability to open folder-only projects, which makes it great for simple web sites that serve from the file system, etc. However, I can't find a way to add one of these projects to my existing solution. Whenever I try opening it, it tells me to close it.
So, how can you add a folder-based project to Visual Studio solution? Or can you?

Related

How to properly open a Visual Studio project?

I have a problem that will be very simple to solve but I don't know how to do it.
Scenario: I want to run an emulator coded in C++ by a YT (javidx9) in Visual Studio. The project is here: https://github.com/OneLoneCoder/olcNES and the folder is "Part#2 - CPU"
Problem: I never use Visual Studio, so its something new for me, and my problem is that I don't know how to run the project (emulator). And I can't find any post or article on the internet about my problem. (I tried to create an empty project in VS and then copy the emulator files to the folder of my empty project and then run it, but it sent me an error that the files were not found (and its because that isn't the correct way to run the program and I don't know how to do it)).
My request: I would be very grateful if someone could explain to me how to open and run this project (the emulator) correctly in Visual Studio.
Thanks!!!
Your project does not have. sln file. You need to create new project in visual studio. Last file has main function as below. You need to run this main file(olcNes_Video1_6502.cpp)
You may need to check path of headers included from other projects.

Visual Studio IPC API : Accessing and modifying projects from outside

I'm currently working to extend some of our own tools (external from VS) to support communication with Visual Studio, to generate and add new code files to existing projects, and preferably also ask a visual studio instance for the currently open solution file to find the right process to talk to.
Right now the only way for me to do this is to directly access the project XML file, and add the files on my own, and then tell windows to open my new file, and hope it get opened in the right visual studio instance... and visual studio will most likely ask me if I want to reload the changes in the project file.
This feels like a very brute force and roundabout way to do it, so I suspect there might be some better way, but all my searched have given me no results. It might be because all searches for IPC and Visual Studio just gives me results with others working with IPC related stuff in visual studio, and all I can find about visual studios API is team oriented or for extensions. If anyone could directly me in the right direction to find more info about this, or anything similar, it would be great!
(if easily doable from C++ is a plus, but if I need to wrap a DLL or use other scripts it's okay as well)
Thanks!

Add an existing (GitHub) C++ project in Visual Studio 2013 (without solution file)

I would like to add an existing C++ GitHub project to Visual Studio. I already know how to how do I add an existing Solution to GitHub from Visual Studio 2013. Here is my procedure
In Visual Studio 2013
I go to Team explorer tab / Connect to team project / Clone
In the clone dialog I enter my https GitHub link and my local repository path
I click on Clone button
After that I don't know what to do. The problem is I don't have a solution file. I have my idea: I need to to create a new solution file, then project, then add manually each cpp file in my new solution and project. This sound so heavy I'm asking if there is a better and faster procedure. Perhaps I don't need a solution file.
Note: I already did C++ coding but I never used Visual Studio as my main C++ editor. The project I try to integrate to my Visual Studio 2013 is https://github.com/Ryochan7/antimicro
I recommend using CMake to create the solution file. A lot of C++ projects on the web will mention this in their Readme files. Alternatively, you can create a new project (which will create a solution) and copy the code into it.

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: 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.