Thursday, July 16, 2009

Visual Studio 2008 | Generate GUIDs

Tools -> Macros -> Macros IDE
New Module, and inside the module, paste:

Sub Create_GUID()
DTE.ActiveDocument.Selection.Text = System.Guid.NewGuid().ToString("D").ToUpper()
End Sub

To assign a keyboard shortcut to enable instant GUID pasting:
Tools, Options, "Show All Settings", Keyboard
Write "guid" underneath "show commands containing" and search the previously created macro. Press some keyboard keys in "Press shortcut keys" at "Assign" item.

http://www.wirwar.com/blog/2007/11/03/generating-guids-in-the-visual-studio-ide

No comments:

Post a Comment