Since version 3.1, Tarma ExpertInstall supports the installation of .Net assemblies with the following features:
All this functionality is built into the installer; no external tools such as GACUTIL.exe are required.
The easiest way to add .Net assemblies to your Tarma ExpertInstall project is to add them as installation files. Tarma ExpertInstall will detect .Net assemblies and create separate assembly-type components for them with the required settings.
To add .Net assemblies manually, do the following:
By default, assemblies are assumed to be private to your application; if you want register them as global assemblies, you must do the following:
Tarma ExpertInstall will produce a number of diagnostic warnings if you build a project that does not conform to these requirements. DO NOT IGNORE these warnings.
There is no built-in support yet for COM interop registration. The recommended approach to register your .Net assemblies for backward compatibility with COM is as follows:
You can find the regasm.exe tool in the .Net installation folder on your system, typically C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322 or something similar.
The simplest method of checking for .Net runtime support is to specify it as a System Requirement in your ExpertInstall project. However, this simply prevents installation if the correct .Net version is not present on the system, without opportunity to install it.
An alternative method is therefore to NOT list .Net as a system requirement, but to use conditional actions to warn the user of a missing .Net runtime and/or to install it.
There are two variables that you can use in the conditions.
MsiNetAssemblySupport contains the dotted-decimal CLR version number, for example 1.1.4322.2032. You can use this one in conditional expressions like:
<$vercmp(<MsiNetAssemblySupport>, 1.1)> >= 0
This only works for Tarma native installers; MSI doesn't support the $vercmp syntax. (Ironically, although the MsiNetAssemblySupport property originates with MSI, MSI has no means to use its value other than as an null/not-null test.)
VersionCLR contains the CLR version number encoded as 1000 * major + 10 * minor:
This one can be used more easily in both Tarma and MSI projects:
VersionCLR >= 1010
VersionCLR is not a standard MSI property, but Tarma's MSI runtime support DLL will set it in each MSI installer built with Tarma ExpertInstall.