http://blogs.clariusconsulting.net/kzu

Daniel Cazzulino's Blog

Go Back to
kzu′s Latest post

Fastest way to get a new GUID from within Visual Studio

There’s the VS2005 Create Guid tool:

CreateGuid

CreateGuidTool

But you have to click New GUID, then Copy, the Exit. That’s not very fast (even if you learn the keyboard accelerators, which I always do). Also, in VS2008 it didn’t come configured out of the box. So I tried the following alternative which turned out to be better:

Go to the External Tools menu shown above, and add the following:

NewGuid 

The uuidgen.exe tool lives in the VS installation folder, under Common7\Tools, and is a command-line utility that just creates a new guid. Note the “Use Output window” option, which basically leaves the generated Guid in your VS output window.

NewGuidTool

I used to go to my powershell window and just type [System.Guid]::NewGuid().ToString(), then copy the output, but anything that helps me stay in VS makes me more productive.

Comments