• Advertisement
Sign in to follow this  

Visual Studio Custom Commands

This topic is 436 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hey folks,

 

Just wondering if anyone knows how to go about creating a custom toolbar command for Visual Studio (2012).

 

The solution I'm working in is huge - a large number of projects and a plethora of build configurations.

I typically use a small subset of these projects and build configurations, so I want to create a toolbar command that displays a droplist of projects I can set as the 'Startup Project', and build it if it's out of date.

 

Anyone have a link to guidelines for setting something like this up? I had a google around but couldn't really find what I was looking for.

 

Thanks!

Share this post


Link to post
Share on other sites
Advertisement
I don't recall but I think you have to download some Visual Studio Extensibility support packages via the Tools/Extensions menu.

Once you have VS Extensibility support installed, it should just be a matter of creating the right type of project. I don't have a 2012 install handy but IIRC the setup is similar to 2013 and 2015, i.e. there's a handful of premade project templates you can play around with.

With a command created you should be able to follow the documentation and templates to get at the current solution, and thereby its active Startup Project.




I'm confident this is possible because I used to have an extension that did exactly that; it broke in the migration to VS2013 (and later 15) and I didn't miss it enough to fix it. But it's definitely doable.

Share this post


Link to post
Share on other sites

Visual Studio Extensibility

Yeah thanks for that - I think it's just what I'm after.

 

I found this plugin for visual studio:

 

 SwitchStartupProject 

 

Which does almost everything I want it to (including setup of command line parameters to your startup projects, and multiple startup projects). They've got the code on BitBucket as well so it should be relatively easy to extend to solution configurations.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement