Mario
Mario

Reputation: 358

Command to switch between debug and release in Visual studio

Is there a command that allows me to change the build configuration easily (e.g., Debug or Release) in Visual Studio?

I see the function in the toolbar, but I try to work only with commands if possible. For commands I can easily define aliases and use parameters for direct switching to a known build configuration.

Upvotes: 0

Views: 409

Answers (2)

Sergey Vlasov
Sergey Vlasov

Reputation: 27940

In English the command name is Build.SolutionConfigurations.

And with my Visual Commander extension you can create a direct command to switch a configuration like this:

DTE.ExecuteCommand("Build.SolutionConfigurations", "Debug");

Upvotes: 1

Mario
Mario

Reputation: 358

The link Keyboard shortcut to switch between Debug and Release modes in Visual Studio from user3399 provided the right direction: If I enter in the command window the first characters from a menu, in my case Erstellen, I get code completion, and I tried some commands. In my case

Erstellen.Projektmappenkonfigurationen Release

works like expected. I add an additional alias, and now it's simpler to use:

alias pc Erstellen.Projektmappenkonfigurationen
pc Debug

If somebody can write the English command, I will edit/update my answer for better finding for other users.

Upvotes: 0

Related Questions