What is GUID used for

Hello,

I know you're supposed to set the GUID of the AutomaticUpdater control to an unique identifier, but when or how is that GUID used? Is this value really necessary and if so under which conditions?

Also, does the value has to be a genuine GUID or is any kind of text string sufficient?

I wonder because I don't need to set this value anywhere in the wyBuild Client file and as I am forking my code regularly, it's something I always have to change manually in my WPF/XAML...If it is necessary, is there a way that it can automatically use the GUID of the Assembly?

Kind regards,Robbie De Sutter

I know you're supposed to set the GUID of the AutomaticUpdater control to an unique identifier, but when or how is that GUID used? Is this value really necessary and if so under which conditions?

It's used for the AutomaticUpdater "state file". A file that lets the AutomaticUpdater know when it last checked, the state of pending updates, etc. So every separate app must have its own GUID. But you don't need to (and shouldn't) change the GUID between versions of a single app.

Also, does the value has to be a genuine GUID or is any kind of text string sufficient?

It has to be a unique string and it has be "filename valid". That is, it can't contain characters that Windows wouldn't allow to be in a filename (colon, slash, etc., etc.). So "yourcompany-yourproduct" would work. We recommend using a regular old GUID (which you can generate from the AutomaticUpdater or from within Visual Studio's menus) because then you don't risk making an invalid GUID.

If it is necessary, is there a way that it can automatically use the GUID of the Assembly?

Why would you want to do that?

Thanks for the clarification.

> > If it is necessary, is there a way that it can automatically use the GUID> > of the Assembly?> > Why would you want to do that?

Because the GUID of an Assembly is also something that normally shouldn't change between versions of a single app and it is a GUID that uniquely identifies the Assembly (hence the app). A such, I wouldn't need to set the GUID in the AutomaticUpdate control (which saves me a little bit of time and avoid potential problem if I do forget to modify it between different forks of my app).

Can we use Guid.NewGuid() all the time?

Just use it once. If you keep changing the GUID for the AutomaticUpdater, then the AutomaticUpdater won't work. This is actually covered in the step-by-step walkthrough.