Summary
This article discusses .NET Assembly runtime issues and possible solutionsSynopsis
This article provides information on troubleshooting some common assembly installation issues when installing setups using Windows Installer.Discussion
Problem: The application does not work after an assembly is installed or upgraded-
Verify that the application policy, publisher policy,machine policy, or security configuration file references the correct dependencies and that the dependencies are located in the appropriate probing paths. Publisher policy overrides application policy, machine policy overrides publisher policy, and enterprise policy overrides machine policy.
-
Verify that the assemblies are being installed correctly. See problem: The assembly will not install to the Global Assembly Cache (GAC).
-
Verify that COM Interop data is being registered correctly. See problem: Registry entries are not created after installing the assembly.
-
Verify that any Installer_Class methods that need to be called during installation are being called. See problem: Installer_Class methods within the assembly are not being executed.
-
When the application runs, assemblies in the GAC are verified for tampering prior to loading and executing the assembly. If an assembly has been tampered with, it will not be loaded successfully.
Problem: The assembly will not install to the Global Assembly Cache
- Verify the following information for the assembly:
- The assembly must be strong named. Scroll down to the General Information on .NET Assemblies section under Additional Information for more information on what defines a strong-named assembly.
- The user running the installation must have administrative privileges to install and uninstall.
- After verifying this information, use Gobal Assembly Cache Tool to install the assembly and verify that this works. Use gacutil /i MyAssembly.dll to install the assembly. Verify that the assembly was installed with the Assembly Cache Viewer.
- If gacutil installs the file successfully, attempt the following:
- Open a new Basic MSI project.
- Add one feature and one component to that feature.
- In the component's File view, add your assembly.
- Right-click the assembly and select Set Key File.
- Select the component and set its Destination property to [Global Assembly Cache].
- Verify that the component's .NET Application File property is set to [GlobalAssemblyCache]\MyAssembly.dll.
- Set the component's .NET Scan at Build property to Properties Only or Dependencies and Properties.
- Build and run the release.
- If the assembly does not install successfully with the sample project, use the same sample project created in the previous troubleshooting step and make the following modifications.
- Set the component's .NET Scan at Build property to None.
- Navigate to the Advanced Settings > Assembly view.
- Right-click the Assembly view and select New .Net Assembly.
- In the File Application field, select Global Assembly Cache.
- Enter the Value data for the assembly, e.g., Name, Version, Public Token Key.
- Rebuild and run the release.
Problem: The assembly fails to uninstall from the Global Assembly Cache (GAC)
- Verify that the component is not marked as permanent.
- Open the InstallShield project.
- Navigate to the component that installs the assembly in the Components view.
- Select the Permanent property and set it to No.
- Build and run the release.
- Verify that there is no assembly reference count.
- Use gacutil /lr, which will list the assemblies and their corresponding reference counts.
- Use gacutil /ur to remove the reference to a specific assembly.
After verifying this information, use the Global Assembly Cache Tool to uninstall the assembly and verify that this works. Use gacutil /u MyAssembly.dll to uninstall the assembly. Once the uninstall works with gacutil, try it again in the InstallShield project.
Problem: The assembly is not being updated correctly when installing a patch or upgrade
- Verify that the guidelines have been followed in Updating Assemblies.
- The assembly may have been installed to the GAC by a per-machine installation. These assemblies are protected by Windows File Protection. Note that assemblies installed to the GAC by a per-user installation are not protected by Windows File Protection.
- When an assembly is installed to the GAC, the installer does not use the same file version rules it uses when installing regular Windows Installer components. Assemblies can exist only once in the assembly cache, and the files comprising an assembly are always installed or removed together. However, more than one version of the same file can exist side by side.
Problem: Registry entries are not created after installing the assembly
- .NET Assemblies do not use the registry so assemblies themselves are not registered. However, there are some registry keys used by Windows Installer. See Assembly Registry Key Written by the Windows Installer.
- If the application needs to interoperate with COM, set the COM Interop property.
- Open the InstallShield project.
- Navigate to the component that installs the assembly in the Components view.
- Select the .NET COM Interop component property and set it to Yes.
- Build and run the release.
- The application may need to interoperate with COM, and it is possible that there is a type library (.tlb) that needs to be imported into the assembly. Use Tlbimp.exe to add COM type data to the assembly. Always use Primary Interop Assemblies (PIA) when available. A PIA is a assembly signed by the same company that produced that original type library. This ensures type compatibility between applications that share the types in the PIA. Types are imported for you and are ready to activate and call from managed code. If the assembly is signed by another company, then it's an alternate interop assembly.
- If COM Interop registry entries still are not being created, use Regasm.exe. Once they are created successfully with Regasm.exe, try the InstallShield project again.
Problem: Installer Class methods within the assembly are not being executed
- Set the .NET Installer Class property.
- Open the InstallShield project.
- Navigate to the component that installs the assembly in the Components view.
- Select the .NET Installer Class component property and set it to Yes.
- Build and run the release.
- If the Installer Class methods are still not invoked, verify that the RunInstallerAttribute.RunInstaller Property is set to True within the Installer code of the assembly.
- Use InstallUtil.exe to verify that the Installer class methods work when invoked. Once it works with this tool, try the InstallShield project again.
Note: The ".Net Installer Class" component property should not be set to "Yes" if the Assembly is a Service. Instead, use the "Services" view found under the component "Advanced Settings".
Additional Information
General Information on .NET AssembliesPrivate Assemblies
- Are Installed within the same directory structure as the application (.exe).
- Private assemblies cannot be installed to the GAC.
- Are referenced by the simple name to find the assembly.
Can be assigned a strong name with Sn.exe.
Are referenced by the following data to find the assembly:
- Simple text name
- Version number
- Culture information
- Public key
- Digital signature
General Information on the .NET Component Properties in InstallShield
.NET Scan at Build property
Set this property to Properties Only or Dependencies and Properties when an assembly has been included in the component. Setting this to Properties Only scans the assembly in the component (which must be marked as a key file) and the information is then added to the MsiAssembly and MsiAssemblyName tables. The Static Scanning Wizard also uses this field to determine if it should add properties or dependencies if run. Alternatively, you can add this information manually under the Advanced Settings > Assembly node.
.NET Application File property
Set this property to the installation path of the application (.exe) if it is a private assembly. This property populates the File Application column in the MsiAssembly table. The column is used to determine where to install the assembly because private assemblies must be located in the same directory structure as the application. If the component destination is set to the GAC, then this field is ignored, and the File Application property is left blank.
.NET Installer Class and .Net Installer Class Arguments Properties
This property is normally used for .NET Assemblies. This can be set to Yes if there are Installer methods within the assembly that need to be called during installation or uninstallation of the assembly. The RunInstallerAttribute must be set to Yes within the Installer method code for the method to be invoked.
You can also pass arguments as well. If properties need to be passed, see Reading Properties Passed to the .Net Installer Class.
.NET COM Interop property
Set this property to Yes if your assembly is designed to call COM objects or vice versa. COM type definitions usually reside in type libraries (.tlb). They can be stand alone (.tlb) or embedded in the resource section of the .dll or .exe. However, assemblies contain metadata instead of type libraries. The type library of the COM object can be added to the metadata of the assembly. This can be generate in various ways but is usually done with tlbimp.exe. The generated assembly is normally called an interop assembly. It contains metadata, but no code for the COM type. If the assembly is being installed to the GAC, then the /CODEBASE parameter is not used.
.Net Precompile Assembly
This creates a native image and installs it to the native image cache. See Native Image Generator.
For more information, see the MSDN Help topics Microsoft .NET Framework FAQ and .NET Framework.
To generate a strong name for an assembly and to install a .dll file in the Global Assembly Cache, see How to install an assembly in the Global Assembly Cache in Visual Basic .NET or in Visual Basic 2005?.
Was this helpful?
Related Articles
Installation Fails for COM+ Application That Has a Shared .NET Assembly or a Dependency of a Shared .NET Assembly Being In… 4Number of Views Autofill .NET Assembly Properties 5Number of Views In-Place Update of a .Net Assembly 3Number of Views Troubleshoot problems with CLR and SqlProceduresClr assembly configuration in FlexNet Manager Suite databases 34Number of Views Specify the Version of .NET Framework for .NET Precompile Assembly 7Number of Views
Revenera Assistant
Online
Hi, I am Reva - Ask me anything.
Updates
No new updates
Chat
Home
Updates
/**/
Thanks for the feedback!
Your feedback has been saved.Rate this response:
1
2
3
4
5
Add Additional feedback ( Optional )
0/240
English
English
Language changed successfully
Something went wrong
Email sent successfully
Something went wrong
Case create successfully
Are you sure you want to cancel
the case creation?
Please select a product to submit the case.
Please select a product version to submit the case.
0/255
Upload Attachment
File Upload
Maximum file
size allowed is 3 MB.
File type
not supported.
Supported file types:
Documents (.txt, .doc, .docx, .pdf), Images (.jpg, .png), Comma Separated Files
(.csv) Speadsheets (.xlsx, .xls)
Are you sure you want to cancel the case creation?
Case closed successfully
File Upload
Maximum file size allowed is 3 MB.
File type not supported.
Supported file types:
Documents (.txt, .doc, .docx, .pdf), Images (.jpg, .png), Comma Separated Files
(.csv) Speadsheets (.xlsx, .xls)
Are you sure you want to close this case
| Products | Region | Phone Numbers |
|---|---|---|
| FlexNet Operations FlexNet Embedded FlexNet Publisher FlexNet Connect FlexNet Code Insight InstallAnywhere InstallShield |
North America * |
+1 630-332-2513 (toll) +1 877-279-2853 (toll-free in North America) |
| Europe * |
+44 1925 944367 (toll) +44 800 047 8642 (toll-free in Europe) |
|
| Japan * | +81 3-4540-5335 (select option 2) | |
| Australia * |
+61 3 9895 2177 +61 1800 560 603 (toll-free in Australia) |
|
|
Usage Intelligence (formerly
Revulytics) Compliance Intelligence |
Please use the Case Portal to submit your support ticket or reach out to your Revenera contact. | |
File Upload
Maximum file
size allowed is 3 MB.
File type
not supported.
Supported file types:
Documents (.txt, .doc, .docx, .pdf), Images (.jpg, .png), Comma Separated Files
(.csv) Speadsheets (.xlsx, .xls)
Revenera Assistant
© 2026 Flexera Software. All Rights Reserved.
Case id: 00001065
Activity: Status change: 2 hours ago