How to work with Assemblies in InstallShield Developer 7.0


InstallShield Developer 7.0 is the best solution for providing the very easy GUI interface to author installations having both .NET and Side-by-Side components.

InstallShield Introduction:

InstallShield Developer 7.0 is the most powerful and flexible solution for authoring Windows Installer setups, enabling new features such as application auto-repair and install-on-demand. The InstallShield Developer IDE exposes all the capabilities of the Windows Installer architecture via abstracted views. It also offers a Windows Installer Direct Editor that allows you to fine-tune an installation by modifying tables.

.NET Assembly:

A .NET assembly is a core part of the runtime. An assembly is the collection of all information required by the runtime to execute your application. This information is referred to as the Metadata. An assembly can be a DLL file or a Portable Executable (PE) file. An assembly that has been compiled into a portable executable (PE) file has an extension of AppName.exe.
A .NET assembly is something similar to a Windows Installer component, as .NET assemblies are always installed and removed as a singular unit. This is the reason what makes the Windows Installer the perfect engine to install .NET assemblies because the architectures are so similar.

Creating an Installation for a .NET Assembly

A .NET assembly can come in many forms. For example we will discuss a simple .NET assembly containing only one file with the metadata embedded in the header of the file and assume that this assembly was created in Visual Studio.NET. .NET Assemblies can be installed local to the application or to the Global Assembly Cache (if appropriately signed).

These are the steps required to create a component for a simple .NET Assembly:

Step 1:

Create a new project or open your currently existing project in InstallShield Developer 7.0.
Note: In order for your .NET assembly to install properly, the target system must contain the appropriate version of the .NET runtime components. Visual Studio.NET includes a Merge Module for the .NET runtime components. Be sure to include this Merge  Module in your project if you are targeting platforms other than Windows XP.

Step 2:

In the Setup Design view, create a component which holds your .NET assembly.

Step 3:

Add all the files belonging to the assembly to the component's file list.

Step 4:

In the Advance Settings of the component right-click on the Assembly node and select "New .NET Assembly"

Step 5:

After selecting the .NET Assembly node examine the properties. You'll see that your .DLL or .EXE has automatically been selected as the Manifest file.

Step 6:

Select whether you want the Assembly to be installed to the Global Assembly Cache or not by setting the "Global Cache" property.
Note: Your Assembly must be properly signed in order to be correctly installed into the
Global Assembly Cache. See the .NET documentation for more information.

Step 7:

Set the Name, Version, and PublicKeyToken properties. If your assembly contains other properties, you may add them by clicking on the last row of the property list for your assembly.
Note: If your assembly does not have PublicKeyToken, you'll want to go into the Direct Editor and remove the PublicKeyToken value from the MsiAssemblyName table for your assembly.

The above steps were used to create a single component for a .NET Assembly. Repeat the above process for each .NET Assembly you are working with.

Creating an Installation for a Side-by-Side (Win32) Assembly

A Side-by-Side (Win32) Assembly usually consists of a single Side-by-Side Portable Executable (.EXE, .DLL, .OCX, etc.) and its accompanying .MANIFEST file. Side-by-Side components only operate Side-by-Side on Windows XP, so you must take special care to author your installation to work on down-level platforms if you intend to support them. Side-by-Side components can be configured to be installed isolated to the application or to the Global Assembly Cache.

These are the steps required to create a component for a Side-by-Side Assembly:

Step 1:

Create a new project or open your currently existing project in InstallShield Developer 7.0
Note: Be sure to create an Install Condition in your Product Properties if your Side-by-Side components don't support down-level platforms.

Step 2:

In the Setup Design view, create a component to hold your side-by-side assembly.

Step 3:

Add all the files belonging to the assembly to the component's file list.
Note: If you don't set a key file, InstallShield will automatically set the .MANIFEST file as the key file in the next step.

Step 4:

In the Advance Settings of the component right-click on the Assembly node and select "New .Win32 Assembly"

Step 5:

After selecting the Win32 Assembly node examine the properties. You'll see that your .MANIFEST file has automatically been selected as the Manifest file.
Note: If you plan to target down-level platforms, be sure to include all the COM data that is part of your assembly in the COM Registration section of the component's Advanced Settings view. You can also use InstallShield's "extract COM information at build" or "component wizard" functionality to automatically extract the required COM data for down-level platforms. Note that on Windows XP this information will be ignored and the manifest data will be used instead.

Step 6:

Select whether you want the Assembly to be installed to the Global Assembly Cache or not by setting the "Global Cache" property.
Note: Your Assembly must be properly signed in order to be correctly installed into the Global Assembly Cache. See the Windows Platform SDK for more information.

Step 7:

Set the Name, Type, and Version properties. These values must be copied exactly as they appear in the assembly manifest. If your assembly contains other properties, you may add them by clicking on the last row of the property list for your assembly.

The above steps were used to create a single component for a Side-by-Side Assembly. Repeat the above process for each Side-by-Side Assembly you are working with


Similar Articles