Multiple "Set StartUp Projects" Configurations - visual-studio

I have a big solution and for debugging purposes I have to start many Projects by using "Set StartUp Projects" Feature of Visual Studio 2012. However often I need to change what projects I need to start (Sometimes is Project A,B,C, sometimes Project B,C,D etc.)
Does someone knows such an Extension?

Take a look at the SwitchStartupProject extension. (I'm the author)
Since version 2.0, it allows you to configure multiple multi-project startup configurations. You can switch between the configurations with a toolbar dropdown box:
To configure two configurations (A, B, C) and (B, C, D):
Install the extension (you might need to restart VS)
A new Startup Project dropdown box appears to the right of the Start button.
Click on it and choose Configure...
Select single-project list mode None (to hide the single project items from the dropdown)
Add two configurations and name them ABC and BCD
Add multiple projects to each of the configurations
Choose the order in which the projects will be started
Note: Unlike the Visual Studio startup projects dialog, the extension does not allow you to choose start without debugging for a project. So all projects that you add to a multi-project startup configuration are started with debugging.

Related

"Set as StartUp Project" not changing deploy configuration in Visual Studio

I'm working at a colleagues PC. When I right click on a .Net Gadgeteer 4.2 project in our solution and select "Set as StartUp Project" I expect Visual Studio to set the build configurations so that the new start-up project is deployed to the device on start, as it does on my PC. But instead I need to open the configuration manager and manually deselect the previous start-up project and select the new one. Why? How can I swap (back) to using Visual Studio to manage deployment without the additional step in the configuration manager?
========== EDIT ==========
#john-saunders comment below makes me think I've misworded my question.
I have a solution containing multiple projects, many of which are .Net Gadgeteer projects.
On most of my machines if I right click on Project A in the Solution Explorer and select Set as StartUp Project then when I debug the solution (i.e. hit F5) Project A and any of its required dependencies are built and deployed to the Gadgeteer device and the debugger gets attached. If I then right click on Project B in the Solution Explorer and select Set as StartUp Project then when I debug the solution Project B and any of its required dependencies are built and deployed to the Gadgeteer device.
But on one machine this is not happening. Instead when I right click on Project B in the Solution Explorer and select Set as StartUp Project when I debug the solution Project A is deployed to the Gadgeteer device. To ensure that Project B is instead deployed I have to manually edit the configuration.
Why? How do I get this one machine to behave like the others?

Exclude projects from solution during build in MSBuild on a CI server

I am working on a solution in Visual Studio that contains a number of projects:
Solution.sln:
-> ProjectInc1.csproj
-> ProjectInc2.csproj
-> ProjectExc1.csproj
-> ProjectExc1.csproj
I work on all projects and when I make a push on my VCS (Github in my case) it triggers a build configuration on a CI server (TeamCity in my case). TeamCity server uses MSBuild, that takes the Solution.sln as parameter and builds it. However I want certain projects (e.g. ProjectExc1.csproj, ProjectExc2.csproj) to be ignored from build. I can do this step if I remove the project references from Solution.sln file, but I think there must be a better way to exclude from build certain project.
Does anyone know how to configure MSBuild or the Solution itself to ignore these projects when building the solution on the CI Server?
In Visual Studio create a new build configuration (from http://msdn.microsoft.com/en-us/library/jj676765.aspx):
To create a solution configuration that excludes a project
On the menu bar, choose Build, Configuration Manager.
In the Active solution configuration list, choose .
In the Name box, enter a name for the solution configuration.
In the Copy settings from list, choose the solution configuration on which you want to base the new configuration (for example, Debug),
and then choose the OK button.
In the Configuration Manager dialog box, clear the check box in the Build column for the project that you want to exclude, and then
choose the Close button.
On the Standard toolbar, verify that the new solution configuration is the active configuration in the Solution
Configurations box.
On the menu bar, choose Build, Rebuild Solution.
Then in TeamCity, instead of building in Debug/Release set the configuration to build with your new build configuration name.
If you are calling from an MsBuild script, the same applies. Just change the configuration you are calling.

In Visual Studio 2010, how do I stop new projects being added & built in every existing build configuration

I have a number of configurations setup in Visual Studio with a carefully crafted list of projects that each one should build.
When I create a new project in the solution it gets selected for building automatically in every existing build configuration.
Is there an option to stop this occurring?
In the solution configuration manager you can unselect build (and deploy) of individual projects for different build configurations.
Right click on solution, select properties, Configuration Properties.
Or Build | Configuration Manager

Run multiple instances with one click in Visual Studio

I wonder if I can run multiple instances (right now two instances) of my application in debug mode by doing a simple click or set a key for that...
Not many people seem to know this, but this is perfectly possible, though I admit it's not very obvious.
Here's what you do:
suppose your current project is A, and it's output is c:\bin\my.exe
add an empty project to the solution for A, call it 'Dummy'
under Dummy's Project Properties->Debugging set the Command to point c:\bin\my.exe
under Solution Properties->Configuration Manager, uncheck all builds of the Dummy project so VS won't try to build it (building an empty project fails)
under Solution Properties->Startup Project, select Multiple Startup Projects and set the Action for both A and Dummy to Start
now hit F5 and your exe will be launched twice, each under a seperate debugging instance. (as you will be able to see in the Debug->View->Processes window)
You can use "Multiple Startup Projects" feature, but avoid creating dummy projects by hand: just add your debuggee executable into the solution directly:
Solution > Add existing project > Path to .exe
If you neeed several instances, Visual Studio won't allow you to add the same executable twice, but adding a symlink to it with another name works as expected.
MSDN: How to: Debug an Executable Not Part of a Visual Studio Solution
Is Visual Studio 2013 this is even easier!
Project-> Properties -> Debug -> check "Start external program" and click the ... button, navigate to your .exe of the other program.
Then Make sure in your Solution -> Properties -> MultipleStartup Projects that it's checked.
You can run two instances of your application from where it is built; example: d:\test\bin\debug\app.exe and attach both instances to the Visual Studio 2010 debugger.

Running two projects at once in Visual Studio

I created a solution in Visual C# 2010 Express that contains two projects: one is the client, the other is the server. I would like to debug both at the same time, but I can only seem to run one of the projects during debugging.
Is there a way to run both at once?
Go to Solution properties → Common Properties → Startup Project and select Multiple startup projects.
Max has the best solution for when you always want to start both projects, but you can also right click a project and choose menu Debug → Start New Instance.
This is an option when you only occasionally need to start the second project or when you need to delay the start of the second project (maybe the server needs to get up and running before the client tries to connect, or something).

Resources