guidgen.exe is a small utility that comes with Visual Studio and generates GUIDs in a variety of formats. The problem with the tool is that it does not format GUIDs in plain text, which I happen to need many times (in source code, database tables, etc.) and I suppose is a feature needed by many developers. There are a couple of variants of the tool on Codeproject (GUIDGen Developer Studio AddIn and GUIDGen AddIn for Visual Studio.NET) but they lack some of the new formats supported by guidgen.
I have decided to create another modified version of GUIDGEN in order to support additional formats, including plain text, and also case options.
guidgen used to be available as an MFC sample, but that doesn’t seem to be the case any more. However, the sample from Visual Studio 2005 is still available on MSDN and I used that as a starting point. The result is a tool very similar to guidgen.exe from Visual Studio (2013 or 2015) but with additional features:
- two more formats: __declspec(uuid("xxxxxxxx-xxxx...xxxx")) and plain text
- case option: upper case (default) or lower case
The existing guidgen executable is available in the Common7\Tools folder of Visual Studio (i.e. c:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools\ for Visual Studio 2013). You can replace that version with this build or put it somewhere else and keep it side by side by adding a new command from Tools > External tools. This might be more practical if you have several versions of Visual Studio installed.
Here are the downloads:
Guidgen-src (1108 downloads) – Source code as Visual Studio 2013 solution
Guidgen-binaries (999 downloads) – Executables built with MFC as a shared library
Guidgen-mfcstaticlib-binary (1085 downloads) – Executables built with MFC an a static library