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 :

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:

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:

You should have something like this:


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

2 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.

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.