Fixing erroneous GUID creation in Visual Studio 2010

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

Rene Modery

Having worked with SharePoint since 2007, Rene has been involved in and responsible for two Asia Pacific wide SharePoint implementations. Equipped with a Master’s degree in Information Systems and various relevant certifications, Rene keeps a keen interest in technology and how it can provide solutions to common problems, but also looks at the "business side of IT". He lives in Singapore with his wife and two cats.

Discussion - One Comment

leave a comment

* Copy this password:

* Type or paste password here:

20,315 Spam Comments Blocked so far by Spam Free Wordpress