Component VSGuids and VIGuids
If you’ve ever created a component in Component Designer you may have seen in the Advanced properties that there are two identifiers for the component, a VIGUID and a VSGUID. Most people are familiar with the concept of a GUID being a unique identifier for a database entry, or a file or an object. Why then are there two GUIDS for each component?
You can think of the VIGUID as being the “last” name for a component and the VSGUID as being the “first” name. The VIGUID identifies the group or class that the component belongs to and the VSGUID identifies a unique instance of that group. There are two main reasons for this identification, namely upgrading and the dependency chain.
Let’s talk about upgrading first. In order to successfully upgrade a component (for example, Internet Explorer), open the previous version of the component, make the necessary changes and then save it off in a different location. You can think of this as being a “child” of the same family- it is still an Internet Explorer component and has the same VIGUID, but is unique because of the changes that were made and it has its own VSGUID. These multiple instances of the component can all reside in the database together because they each have a unique VSGUID. Open up Database Manager, click on the “Component” tab and scroll down to the Internet Explorer component -you will find multiple Internet Explorer components listed. In Target Designer you only see one the most recent instance of the component, because it locates the component “group” by VIGUID, then the instance with the highest revision number (the revision number automatically gets incremented by one whenever a component is opened for editing in Component Designer). If you import another instance of the component with a higher rev number in to the database and open an slx file that references that component you will see a blue arrow next to that component letting you know there is a newer instance and asking if you want to upgrade. If you’ve ever encountered a situation where you see two instances of a component in Target Designer, and you continuously get prompted to upgrade that component, it is because an error was made and the revision number was not incremented and TD does not know which of the two instances to grab.
Dependency chains work through the VIGUID. A component expresses a dependency on another component by referencing the VIGUID of the component “group”. In our example this means that VIGUID would always resolve to the Internet Explorer component “group”. If this dependency was expressed through the VSGUID it would be broken as soon as a newer version of internet Explorer was imported into the database.
As an aside, it is interesting to note that only components have both VS- and VIGUIDs. Packages, Groups, Repositories etc. all have only a VSGUID as their identifier.
- Lynda
Comments
- Anonymous
February 16, 2006
The comment has been removed