After I got my new laptop, I installed among other things Visual Studio 2010. However, when I wanted to create a new GUID through Tools -> Create GUID, I got the error "Encountered an improper argument." from guidgen.exe :
image

After confirming this dialog, the guidgen.exe window opened, but clicking on copy or New GUID resulted in the same error message:image

As I found out, VS2010 calls the guidgen.exe inside the NETFX 4.0 Tools folder (inside the bin folder of the Windows SDK). Inside the bin folder, there is another guidgen.exe. Comparing these two, I saw that the one in the %PROGRAM FILES%\Microsoft SDKs\Windows\v7.0A\bin folder (left) is an older version for Visual Studio 2008, the other one %PROGRAM FILES%\Microsoft SDKs\Windows\v7.0A\bin\NETFX 4.0 Tools (right) is for Visual Studio 2010:
image

I updated the command in Visual Studio to use the older version, and this did the trick, I was able to create GUIDs again.

If you get the same error, in order to correct it, go to Tools->External Tools, and select Create GUID. Select the NETFX 4.0 Tools in both the command field ("Befehl") and the initial directory field ("Ausgangsverzeichnis") (my VS is German, thus the different looking dialog) and remove it:
image

You should have something like this:
image

 

Running Create GUID again should give you the properly working window:
image

3 thoughts on “Fixing erroneous GUID creation in Visual Studio 2010”

  1. very good instructions and I have got the solutions from your blog, but what I concerned is how to run new version GUID program properly, thanks anyway.

  2. I have solve this bug, because my os is Win7(english), but vs2013 is (Chinese), so, in the path C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools\, there are two sub path, 2052 and 1033, I copied 2052/guidgenui.dll to 1033/, then it worked.
    so, the error is a bug of VisualStudio.
    because of the different language. but guidgenui.dll is not exist in correct path.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.