Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the purpose of Create GUID tool in Visual Studio?

Visual Studio has a Create GUID tool (Tools > Create GUID).

What is it for? Can you remember what was the last time you used it?

I just can't imagine why i should copy into the clipboard a new GUID with that tool.

like image 772
OrElse Avatar asked Aug 28 '09 10:08

OrElse


People also ask

What is the purpose of a GUID?

A GUID (globally unique identifier) is a 128-bit text string that represents an identification (ID). Organizations generate GUIDs when a unique reference number is needed to identify information on a computer or network. A GUID can be used to ID hardware, software, accounts, documents and other items.

What is GUID in Visual Studio?

A globally unique identifier or GUID is an id that is exclusive throughout the globe. They are usually 128 bits long and are shown in hexadecimal groups separated by hyphens. Within Visual Studio there exists a standalone tool (guidgen.exe) that allows developers to create GUIDs in a specific format.

Why do we need GUID in C#?

We use GUID for unique identifier. Now a question arise if we already have primary key than why we use Globally Unique Identifier(GUID). we use GUID because it have very low probability of being duplicated as it is 128-bit integer(16 bytes) which allow to use GUID across all databse and computer without data collision.

What does GUID mean in C#?

NET using C# Guid class. GUID stands for Global Unique Identifier. A GUID is a 128-bit integer (16 bytes) that you can use across all computers and networks wherever a unique identifier is required.


2 Answers

It's a very useful tool for those who develop and maintain COM components. Need to introduce a new registry-exposed class or interface? You need a new GUID. With this tool you click "New GUID", select "Registry format", copy it to the clipborad and then paste into a IDL file.

like image 182
sharptooth Avatar answered Nov 06 '22 22:11

sharptooth


WiX (installer toolkit) projects require a lot of GUIDs. I use it often and often.

like image 21
UserControl Avatar answered Nov 07 '22 00:11

UserControl