18

Is there in Visual Studio an equivalent to the Eclipse "Run Configurations"? In Eclipse I can setup hundreds of run configurations with many different command line parameters. In Visual Studio I can setup only one configuration for the active project.

tshepang
  • 12,111
  • 21
  • 91
  • 136
Horcrux7
  • 23,758
  • 21
  • 98
  • 156

2 Answers2

7

You can create multiple configurations just like in eclipse, screens are different but you can do pretty much everything. You can click on Menu -> Build \ Configuration Manager and in every combo box, you will see last two options as New and Edit, which will let you copy existing configuration and create new ones. Just next to Run button, you can also change active configuration and once you have changed your active configuration you can also change individual run and project settings with different command lines and different directives for compilation.

Akash Kava
  • 39,066
  • 20
  • 121
  • 167
  • 3
    Ok, this is a hack that can work. A good idea is it not to create a separate build configuration for a run configuration. – Horcrux7 Jan 30 '11 at 11:11
  • If you edit your proj file xml manually, you can still keep same build configuration and you can only modify run configuration i feel. I havent tried but yes it might work, mostly if you do not change anything regarding build in different config, it does not create seperate config elements for each condition. – Akash Kava Jan 30 '11 at 12:24
  • @AkashKava: Is your solution really still the "state of the art"? – krlmlr Dec 06 '13 at 14:49
  • @krlmlr, well I wrote this 2 years ago, but I feel this is still the same even for Visual Studio 2013. Do you have any specific requirements? – Akash Kava Dec 06 '13 at 15:39
  • @AkashKava: Well... Just being able to save persistently the run configuration**s** for each project, just like Eclipse does, and being able to switch seamlessly. A Visual Studio add-in that provides this would fare well, I guess. – krlmlr Dec 06 '13 at 17:01
  • even the new .runsettings files seems still targeted to run just unit-test http://msdn.microsoft.com/en-us/library/vstudio/jj635153.aspx I agree maybe an add-in is the only viable option, but didn't find one yet. – Fabio Bonfante Dec 07 '13 at 14:31
  • This plugin might be the one you were looking for: http://visualstudiogallery.msdn.microsoft.com/69023d00-a4f9-4a34-a6cd-7e854ba318b5 – th0m4d May 09 '14 at 08:35
  • 1
    This solution does not allow you to set a different Startup File for each configuration, which Eclipse does allow. – rleelr Sep 14 '15 at 13:58
1

Resharper does support run configurations. See https://www.jetbrains.com/help/resharper/Run_Configurations.html

Sadly, you cannot build a run config that starts multiple projects -- something you can do with the (single) run config built in to VS. That would be a useful feature since I'm a constantly switching between a single project run and a multi-project run setup. And although not a huge pain, it is a small PITA.

Since you can easily pick a project to start via the built-in VS run config, I don't see much value in the resharper feature.

Well, you can do some things with a resharper run config that VS run config does not support. You can run an arbitrary exe -- something you can setup via a VS external tool. And, you can run a static method. Sounds cool, but I've never had need to do that.

So, there is a tool that provides the feature you asked for. But as often is the case, the feature may not be all that useful :(

steve
  • 1,021
  • 1
  • 14
  • 29