Using managed assemblies
This application registers a ShellUI module that interacts with the supplied managed assembly, showing a message when the shell frame changes.
This application is only compatible with M-Files Desktop.
More information on using Managed Assemblies is available on the UIX reference site. Specifically, managed assemblies can only be used if:
- They target .NET 4.0 or higher.
- The managed assembly must not reference the M-Files API.
- The managed assembly must be available in the UIX application package and are distributed as part of the UIX installation.
- The application consists of four files:
appdef.xml, which declares the application contents.
main.js, a ShellUI module, which instantiates the CLR objects and calls methods on them.
MyClassLibrary.pdb, containing debugging information), which is the managed assembly that the UIX application will use.
The application broadly takes the following approach:
- When the shell frame is started, the code instantiates an instance of the managed assembly.
- A method on the managed assembly is called, passing in information about the current environment (the outer window handle and the Vault), and a message to show.
Testing and deploying
The simplest method to test an application is to copy the files into a local development folder. This allows you to alter the files and simply log out and into the vault to see the changes.
To deploy the application, you must zip the application files and deploy them using the M-Files Admin tool. This process is detailed on the M-Files Developer Portal.
When a client connects a vault, new User Interface Extensibility Framework applications will be downloaded and the user will be prompted to install them. This can be avoided by pre-approving it using registry keys.