Register a .NET assembly

 
Microsoft .NET FrameworkIt have been possible to register a traditional unmanaged ActiveX and DLL file for many years now in Visual Installer, but sometimes it can be useful to also register a managed .NET assembly in a way so it can be accessed from unmanaged code (for example from an unmanaged and native C++ application). In Visual Installer 2014 this is possible.
 
We have added a new function to Visual Installer that can be used to register a .NET assembly with a ".DLL" filename extension. When you register the .NET assembly in Visual Installer, a COM object interface (a COM-callable wrapper) is created for the assembly. This gives unmanaged code access to methods etc. in the .NET assembly.
 
The List menu in Visual Installer's editor has been extended with a new menu item with the name: Register .NET assembly. This menu item is also shown in the local popup menu that is opened if you right-click over a file in the filelist.
 


The Register .NET assembly menu item is only shown if the filename extension of the file that is selected in Visual Installer's file list is ".DLL". No other file types can be registered in this way so the menu item is hidden if the file has another filename extension. But remember, the DLL must be compiled using .NET Framework otherwise the registration process will fail.
If you choose the Register .NET assembly menu item, the following dialog box is shown:

The 'Register .NET Assembly' dialog box

In this dialog box you can set some options that will be used when the .NET assembly is registered. You can for example inform Visual Installer which version of .NET Framework that your .NET assembly is compiled for, and which bitness (32 bit or 64 bit) to use when the .NET assembly is registered.
 
The actual registration process will be handled by running the RegAsm tool in .NET Framework. Visual Installer will run this tool when it registers a .NET assembly.
 
We have also added a new script command with the name REGISTER_ASSEMBLY to Visual Installer's scripting language that can be used if you need a more detailed control over the registration process.

 
< Go back
     

 

SamLogic