Archive for December, 2008
Create GUID in Visual Studio 2005
Dec 21st
From time to time you need to create a GUID (Global Unique IDentifier) in order to mark your dlls. Looking in my Visual Studio 2005 I saw that this command wasn’t available in any tools menu, nor in the Customize toolbars one as a shortcut to a command.
After a quick digging on MSDN site I found this. It is written in Microsoft style – a lot of information, but no solution. It just mentioned something like ”hey, we have something that you want, but guess what – we don’t have it any more”:
-
On the Tools menu, click Create GUID. The Create GUID tool appears with a GUID in the Result box.
So I started creating my own Create GUID command.
Happily, the Microsoft team provided the tool in the <visual studio install>\Common7\Tools\ directory. Usually, the <visual studio install> dir is C:\Program Files\Microsoft Visual Studio 8.
Actually, there are 2 tools for creation of GUIDs:
- GUI interface: <visual studio install>\Common7\Tools\guidgen.exe
- Console line tool: <visual studio install>\Common7\Tools\uuidgen.exe
At first look, uuidgen seemed the winner. Running uuidgen in command line revealed the needed parameters:
I proceeded to setup the Create GUID command. From Visual Studio 2005 menu > Tools > External tools you can add and setup a new command to an external tool. The setup window is straight forward for experts, but new guys can be impressed by it.
Clicking on Add button will create a new element in the list, called [New tool 1]. This name will be overridden by whatever you write in the Title text box. Next, the command text box will be filled with exact path to the tool. Clicking the ellipsis button, you’ll be sent straight to Tools dir, where you can easily find the tool required. As arguments I put the ‘c’ value which means that the output will be upper case UUID (as you can see in the previous image).
And when clicking OK, the corresponding name, as in my case Create GUID appears in the Tools menu, just above the External Tools menu.
But surprise, when I clicked the menu button, the command prompt flashed and nothing happened.
After a brief investigation, I figured out that the tool worked, but it’s output was retained in the command prompt window. This closes immediately after the tool runes successfully, outputting the GUID.
What to do ? I switched to the next tool, Guidgen. This was simply accomplished by changing the command to the corresponding tool name and removing the argument.
So after clicking on Visual Studio 2005 menu > Tools > Create GUID I got this window, in which I checked, as you can see, Registry format and then click on Copy button. Then clicking on Exit you dismiss the tool. By pasting the Clipboard content into a class, you will get this :
{949213E9-0658-4546-B3D1-F41C0475E805}
Good luck with the implementation!
PDC 2008 – Project "Velocity": A First Look
Dec 3rd
This presentation was held by Murali Krishnaprasad, who is a prestigious Microsoft professional. He is Principal Architect of Velocity – the distributed caching platform”. His presentation revolved around new methods and services for better caching web application, but also on scaling this methods for a computer farm or a cluster.
Let’s take a look on the system architecture:
PDC 2008 – Developing Applications Using Data Services
Dec 1st
This presentation, is done by Mike Flasko, Program Manager at Microsoft Corporation. Smart, well prepared and having good oratorical skills, he is one of the best presenters that I have listen to. He has several other blogs, interesting to see is also this one. He leads the Astoria team which has an interesting blog here.
For all of us who didn’t had the pleasure to go to the actual event, the link is on Channel 9 PDC area. Maybe next year we’ll shake hands with Mr. Mike Flasko.
Here are some of the things presented (this listing is just a teaser, you should discover the rest) :
- New models for communication