Start Two Instances of Same Project in Visual Studio 2010 - visual-studio-2010

I'm trying to develop a multiplayer game in C++ with MSVC 2010, and I want to have it open two debuggable instances of my exe when I hit Start Debugging.

You can right click a project in your solution and select Debug > Start new instance to load multiple instances at once.

Related

Visual studio 2022 is not auto-completing certain methods

I have recently downloaded visual studio 2022 for use in Unity and it was working correctly for a while, but today it has stopped auto-completing certain method names such as OnMouseButtonDown() and OnTriggerEnter2D(). Other methods such as Start() and Update() do work, but a majority of Unity specific methods are no longer auto completed. I've tried restarting visual studio code, restarting my computer and uninstalling and reinstalling visual studio code, but the error still persists. Any help would be greatly appreciated. Thanks.
This problem can cause various of reasons, even some IDE bug (which Visual Studio 2022 has a large number) but there is pretty common solution for this one
Firstly you'll have to make sure, that your Game development with Unity workload is checked
So
Open Visual Studio Installer and click Modify button across your version of Visual Studio.
Click on a Workloads panel and make sure that Game development with Unity workload is checked as shown on the image
Click Modify button at the bottom right corner.
Then you need to ensure, that desired version of Visual Studio is set as a External Script Editor inside Unity engine
Open Unity
Edit -> Preferences -> External Tools
And make sure that External Script Editor set as a current version of like so
Click on Regenerate project files button and try to always open your scripts directly from Unity
Restart Unity after those steps

Debug more items at same time with a Visual Studio CMake project

I've a CMake project that I'm developing with Visual Studio 2019.
I've two executables, a server and a client. I want to debug both of them at the same time. How can I start more that one process with debugger with Visual Studio at the same time, using a CMake project?
EDIT:
My specific use case is: I've a CMake project with two executables, defined with add_executable(exec1) and add_executable(exec2). I want to start them at the same time. Actually I can select only one in the "Select Startup Item" button, and when I start one it's grayed and I cannot start the other one.
I want to start them at the same time. Actually I can select only one
in the "Select Startup Item" button, and when I start one it's grayed
and I cannot start the other one.
As far as l know, although you've imported two execute files into the same project,you cannot debug them at the same time in Visual Studio by Debug UI.
An instance of vs can only launch one executable unless one of the execute files is nested in another execute file.
Suggestion:
1.You can try to open two instances of VS and then you can debug the client side and the server side, respectively. Or debug separately with one VS instance.
In addition, please check if this link can help you.
If I misunderstand your issue, please feel free to let us know.

Iterations always default to first project & can't select current project

I'm using the Team Foundation Service (TFS in the cloud) for source control. Within my account I have multiple projects. Via the website I can see that the first project has the default Release & Sprint hierarchy set. I have another project that I've created some releases & sprints. In the web admin I've also setup different areas for my project.
Within Visual Studio 2012, when I go to create a task (TEAM > NEW TASK), it always shows the AREA=[FirstProject] and the ITERATION options as only the [FirstProject]. I can't change the area to a different area or the iteration. It acts like Visual Studio is "stuck" within the [FirstProject] and won't let me get to any of my other projects when working with tasks & backlog items. However I can create tasks in the web client. Within Visual Studio I can also run queries and find tasks.
So, I'm trying to figure out how to make sure I can use Visual Studio 2012 to create & manage tasks and not have to go to the website each time. It acts stuck on one project. Ideas?
Note I'm not having issues with any of the other source control issues... it's just an issue with working with tasks.
In the "Team Explorer" in Visual Studio 2012 you can select the Team Project you need by clicking on:
"Home | [FirstProject]", "Projects", and selecting a different one.
Also, in Visual Studio 2012.2 (Update 2) there is also a "Plug" looking icon at the top of Team Explorer, this allows access to many Servers, Collections and Team Projects from a panel in Team Explorer instead of a menu.

Connect to Team Server on launch of VS?

I deal with multiple Team Foundation Servers and collections. Is there a command line I can send to VS so I don't have to manually switch between the TFS servers every time I launch VS?
The way I do it is use the start page from Visual Studio. It lists my recent projects and you can even pin them so they do not scroll out of view when you do not use them for a while.
Activating a project from the start page will automatically connect your Visual Studio environment to the correct TFS collection, because the solution you open is bound to one of them.
Works like a charm!

Suddenly Visual Studio now builds and deploys EVERYTHING

I've been using Visual Studio for years. When I press F5 or Ctrl+F5, or press the green arrow button, I expect it to build and run the Startup Project and its dependencies. However, suddenly today it builds (and deploys to the mobile device, if it's a mobile device solution) every single project instead.
I tried several different sln files, same thing happens for each one.
Also, while the debugger works in desktop projects, in mobile projects it simply states "unable to start debugging".
Anybody else had this problem?
I found one workaround, to right-click a single project and choose Debug | Start New Instance. (However, there is no option to start without debugging.)
You don't say which version of Visual Studio you are using.
In Visual Studio 2010 take a look at Tools | Options | Projects and Solutions | Build and Run | "Only build Startup projects and dependencies on Run". Is that item checked?

Resources