Entries:
Comments:
Posts:

Loading User Information from Channel 9

Something went wrong getting user information from Channel 9

Latest Achievement:

Loading User Information from MSDN

Something went wrong getting user information from MSDN

Visual Studio Achievements

Latest Achievement:

Loading Visual Studio Achievements

Something went wrong getting the Visual Studio Achievements

Extending Visual Studio with your new buddy, VsCommandBuddy

Today's Visual Studio Extension comes to us from Paul Huizer. Imagine project or solution scope commands, commands that can be version controlled and easily shared.

Here' I'll let him describe it;

VsCommandBuddy allows you to dynamically add new commands to Visual Studio IDE using configuration files which are part of your solution and/or projects. This means that your custom commands will stay with your work.

If you have multiple external commands per solution, then you'll recognize the 'problem' of switching between projects. How did I organize my tasks in this solution? How about opening a project you haven't touched for a couple of months??

VsCommandBuddy solves this 'command-hell' in a very simple and elegant manner. All commands needed in the context of each solution are simply presented in the form of menu-items and toolbar buttons. Open a Visual Studio solution, and you immediately see which commands are available within that solution. Invoke a command using a shortcut key or by clicking the command menu item/button.

Visual Studio is an awesome IDE, packed with a huge amount of valuable features. Period! But ... outside of Visual Studio, lives a huge amount of other technologies and tools which you often wouldn't want to miss either. Choosing between one development stack or another is no solution. Using VsCommandBuddy you can easily integrate most technologies within Visual Studio. It makes Visual Studio even more powerful than before!

VsCommandBuddy is a typical scratch-your-own-itch project. As it turned out rather useful (understatement), the decision was quickly made to put it online for other VS Developers to use it as well.

The problem

How do you manage all your commands? Memorizing the command line commands? For every project? Everything in Tools -> External commands??? This phenomenon is referred to as the 'command-hell'.

The solution

The VsCommandBuddy solution is as follows:

  • Specify your commands in a VsCommandBuddy configuration file (plain json).
  • Store this configuration file as part of your solution/project.
  • A soon as you open a solution/project, Visual Studio IDE will show you (through menu items and a toolbar) which commands are available for that solution!!

Nice ...

  • You can easily setup and customize you development environment per solution and/or project.
  • You can switch between projects.
  • Open a solution and see the commands available in the context of that solution.

VsCommandBuddy

The perfect buddy for any vs developer who wants to extend Visual Studio with external commands per solution and/or project.

Goodies:

- Configuration of commands per solution and/or per project as needed.

- Macros on filename, arguments, current working directory and confirm dialog message.

- Macros:

  • SolutionDir, SolutionName, SolutionFileName, SolutionFullFileName
  • StartupProjectDir, StartupProjectName, StartupProjectFileName, StartupProjectFullFileName
  • ProjectDir, ProjectName, ProjectFileName, ProjectFullFileName
  • Configuration, FullConfiguration
  • User defined macros
  • (Feel free to request for more)

- Sync commands run in background, output to output window.

- Async commands run in the foreground in parallel with other apps (non-blocking).

- Commands appear in the Tools menu and in the VsCommandBuddy Toolbar.

- Define hotkeys per command (1 or 2 keys with modifiers).

- Support for multiple solutions per folder.

- Launchable commands: exe, batch, extensionless commands.

- Works seamless with all project types, including project type Website. The project type Website is known for not having a project file and therefore plays really nice with github etc.

- Works perfect with batch files, grunt, gulp, bower, yeoman, phantomjs, MSDeploy, MSBuild, ORM mappers LLBLGen and nHibernate and so forth.

- Integrated help function ... will point you in the right direction in case of problems/questions.

- Generate example solution and/or project configuration files.

VsCommandBuddy brings a whole world of tools into your favorite IDE, right where you need them!

PaulHuizer/VsCommandBuddy/docs/gettingstarted.md

Getting started involves installing the package and configure some external commands.

Step 1: Download and install VsCommandBuddy

You'll find VsCommandBudy in the 'Tools -> Extension and updates' section in Visual Studio. Search for VsCommandBuddy and install.

Or...

You can go the VisualStudioGallery using your browser here. Click download and and then doubleclick on the vsix file to install.

(In case you decide afterwards not to continue using VsCommandBuddy, you can simply uninstall VsCommandBuddy from your pc using Visual Studio 'Extensions and updates'.)

After installing, a restart of Visual Studio is required.

Tip:

  • You should now see some VsCommandBuddy items in the Tools menu.
  • Enable the VsCommandBuddy toolbar by right-clicking on the toolbar area, and select the VsCommandBuddy toolbar.
  • VsCommandBuddy communicates primarily with the user through the output window of Visual Studio. If you click something, make sure you look at the output window to see the result!
Step 2: Open an existing Visual Studio solution

Since VsCommandBuddy is about customizing commands per solution/project, a loaded solution is required. Make sure to open an existing Visual Studio solution file from disk.

Step 3: Configure commands

Now configure some external commands which you use with your projects. External commands are configured in so called vscb files, which are just plain json. VsCommandBuddy looks for one vscb file per solution file and optionally one per project in your solution.

How to get your vscb files? You have the following options:

  • Click 'Generate vscb' from the tools menu in Visual Studio and click 'continue'. Then look for vscb files alongside the solution file and the projectfiles you selected. The generated vscb files contain the proper file format and some pre-configured example commands.
  • Look at some of the Example solutions.
  • Simply get your editor and make some. Check 'vscb files' for more info.

Requirements and configuration

In order to function, VsCommandBuddy requires:

  • DotNet Framework 4.5
  • Visual Studio 2013 Pro and more.
  • Installed VsCommandBuddy extension
  • An existing Visual Studio Solution file (.sln), since VsCommandBuddy reads this sln file for configuration purposes.
  • (Optional) One VsCommandBuddy configuration file for that solution.
  • (Optional) A VsCommandBuddy configuration file for each project in the solution.

Use-cases

To give an idea on who could benefit from VsCommandBuddy, here some use cases:

A single front-end developer

A typical front-end developer needs to perform tasks such as:

  • compile SASS files to css
  • generating custom font files from svg icons
  • generating sprites from png files
  • compiling coffeescript, typescript
  • running testcases
  • bundling javascript files
  • creating crx files for chrome extensions
  • deploying porjects using msdeploy
  • the list goes on and on ....

You might do everything using built in technologies. You might also solve these tasks using a task runner such as grunt.

For a typical project you have setup numerous commands in order to optimize your workflow.

Then .. a front-end developer tends to be blessed with more than one project. This means switching between projects is common. Opening up a project you finished a couple of months ago is also common.

...

A backend-developer

Backend developers have their own types of 'tasks'. Image you're working on a API project. Typical tasks that need to be done:

  • Generate ORM DAL dlls
  • Run testunits
  • Deploy api project to various environments (test or production environments)
  • Deploy background tasks as win-nt services (stop service, update service and start service)
  • Bump versioning
  • Etc...

Like frontenders, backenders are equally blessed to work on multiple projects.

The problem

How to deal with all these commands? The configuration keys, the proper urls and so on?

The solution

The VsCommandBuddy solution is as follows:

  • Specify your commands in a VsCommandBuddy configuration file (plain json).
  • Store this configuration file as part of your solution/project.
  • A soon as you open a solution/project, Visual Studio IDE will show you (through menu items and a toolbar) which commands are available for that solution!!

...

Working in teams

As soon as you start working in teams, the above problems only grow. All team members need to share the knowledge of which command to use for what purpose. They also need to share same settings and so on.

The problem becomes even worse, if .NET developers need to work together with designers who are playing their tunes on mac books. Ay ...

The problem

How to deal with all these commands?

The solution

The VsCommandBuddy solution is as follows:

  • Specify your commands in a VsCommandBuddy configuration file (plain json).
  • Store this configuration file as part of your solution/project.
  • A soon as you open a solution/project, Visual Studio IDE will show you (through menu items and a toolbar) which commands are available for that solution!!

Nice ...

  • You can easily setup and customize you development environment per solution and/or project.
  • You can switch between projects.
  • Open a solution and see the commands available in the context of that solution.

While the source for the actual extension is not available :( there are example Solutions that will help you get started using it...



Tags:

Follow the Discussion

Remove this comment

Remove this thread

close

Comments Closed

Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation, please create a new thread in our Forums,
or Contact Us and let us know.