14 June 2017

GUID generator in Visual Studio

While writing scripts at times you need to use GUID value as a constant value, etc. There are many options to generate GUID. You could write your own batch script to generate the GUID or you could use other program to generate a GUID.

However if you are using Visual Studio IDE, there is readily an option available to generate the GUID.

Steps to generate GUID in visual Studio

  1. On the tool menu, select CREATE GUID menu item. It opens up CREATE GUID window

  2. In the CREATE GUID window, click on the copy button to copy the generate GUID to clipboard
  3. If you want to generate one more GUID, click on the New GUID button

Sample GUID generation output

 // {7154E924-A0AD-4042-A638-AE022911BEF2}
IMPLEMENT_OLECREATE(<<class>>, <<external_name>>, 
0x7154e924, 0xa0ad, 0x4042, 0xa6, 0x38, 0xae, 0x2, 0x29, 0x11, 0xbe, 0xf2);

GUID window

Generate-GUID-in-visual-Studio-IDE

No comments:

Post a Comment