How to generate GUID using guidgen.exe?

Posted: February 3, 2011 in .Net4.0
Tags: , , , , ,

In one of my stored pocedure’s an input parameter accepts Guid value & every time I wanted to test it,I used to run class from C# with Guid.NewGuid().ToString() to copy value & add it to stored procedure.Quite weird right 🙂 Because I never knew how else I can generate a guid value.

Visual Studio External Tools come with a tool guidgen.exe that can help you create Guid in a specified format.

Path – C:\Program Files\Microsoft SDKs\Windows\v7.0A\bin\NETFX 4.0 Tools\guidgen.exe

How to Use guidgen.exe?

  1. Run exe
  2. Select the format you want for the GUID.
  3. Click New GUID & then Copy.

The GUID is copied to the Clipboard so that you can paste it whereever you want.

If you want to generate another GUID, click New GUID

Advertisements
Comments
  1. roh_8_it_3 says:

    I find sql server helpfull 🙂 , select NEWID()

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s