Friday, November 14, 2008

Power Commands for Visual Studio 2008

Hello Guys,

This, being my first post, I want to make a powerful debut. Though the content is not produced by me (Ya its the microsoft guys), I hope it will be useful for using them. Shower your power !!!


What’s New in PowerCommands 1.1

Enable/Disable PowerCommands in Options dialog

This feature allows you to select which commands to enable in the Visual Studio IDE. Point to the Tools menu, then click Options. Expand the PowerCommands options, then click Commands. Check the commands you would like to enable.

Format document on save / Remove and Sort Usings on save

The Format document on save option formats the tabs, spaces, and so on of the document being saved. It is equivalent to pointing to the Edit menu, clicking Advanced, and then clicking Format Document.

The Remove and sort usings option removes unused using statements and sorts the remaining using statements in the document being saved.

Note: The Remove and sort usings option is only available for C# documents.

Note: Format document on save and Remove and sort usings both are initially defaulted OFF.

To select either option, point to the Tools menu, then click Options. Expand the PowerCommands options, and then click General.

Note: If you click Save, the option you select applies to the selected document. If you click Save All, the option applies to all open documents.

Clear All Panes

This command clears all output panes. It can be executed from the button on the toolbar of the Output window.

Copy Path

This command copies the full path of the currently selected item to the clipboard. It can be executed by right-clicking one of these nodes in the Solution Explorer:

· The solution node.

· A project node.

· Any project item node.

· Any folder.

Email CodeSnippet

To email the lines of text you select in the code editor, right-click anywhere in the editor and then click Email CodeSnippet.

Note: If no lines are selected, the entire document will be emailed.

Insert Guid Attribute

This command adds a Guid attribute to a selected class. From the code editor, right-click anywhere within the class definition, then click Insert Guid Attribute.

Note: If the class already has a Guid attribute, the Insert Guid Attribute command will not be visible.

Show All Files

This command shows the hidden files in all projects displayed in the Solution Explorer when the solution node is selected. It enhances the Show All Files button, which normally shows only the hidden files in the selected project node.

Undo Close

This command reopens a closed document , returning the cursor to its last position. To reopen the most recently closed document, point to the Edit menu, then click Undo Close. Alternately, you can use the Ctrl+Shift+Z shortcut.

To reopen any other recently closed document, point to the View menu, click Other Windows, and then click Undo Close Window. The Undo Close window appears, typically next to the Output window.

Double-click any document in the list to reopen it.

What’s New in PowerCommands 1.0

Collapse Projects

This command collapses a hierarchy in the solution explorer starting from the root selected node. It can be executed from three different places: solution, solution folders and project nodes respectively.

Copy Class

This command copies a selected class entire content to the clipboard. It can be executed from a single project item or a project item with dependent sub items.

Paste Class

This command pastes a class entire content from the clipboard. It can be executed from a project or folder node.

Copy References

This command copies a reference or set of references to the clipboard. It can be executed from the references node, a single reference node or set of reference nodes.


Paste References

This command pastes a reference or set of references from the clipboard. It can be executed from different places depending on the type of project. For CSharp projects it can be executed from the references node. For Visual Basic and Website projects it can be executed from the project node.

Copy As Project Reference

This command copies a project as a project reference to the clipboard. It can be executed from a project node.

Edit Project File

This command opens the MSBuild project file for a selected project inside Visual Studio. It can be executed from a project node.

Open Containing Folder

This command opens a Windows Explorer window pointing to the physical path of a selected item. It can be executed from a project item node

Open Command Prompt

This command opens a Visual Studio command prompt pointing to the physical path of a selected item. It can be executed from four different places: solution, project, folder and project item nodes respectively.

Unload Projects

This command unloads all projects in a solution. It can be executed from the solution node.

Reload Projects

This command reloads all unloaded projects in a solution. It can be executed from the solution node.

Remove and Sort Usings

This command removes and sort using statements for all classes given a project. It can be executed from a solution node or a single project node.

Note: The Remove and Sort Usings feature is only available for C# projects since the C# editor implements this feature as a command in the C# editor (which this command calls for each .cs file in the project).

Extract Constant

This command creates a constant definition statement for a selected text. It can be executed from the code window over a selected text.

After specifying the constant visibility and identifier (Figure 24) the following constant declaration is created:

Clear Recent File List

This command clears the Visual Studio recent file list.

Clear Recent Project List

This command clears the Visual Studio recent project list.

Transform Templates

This command executes the associated custom tool with text templates items. It can be executed from a DSL project node or a folder node.

Close All

This command closes all documents. It can be executed from a document tab.


Here's link to the PowerCommands download page

There was an error in this gadget