When installing the template into Visual Studio 2017, a popup will be shown stating that the template does not use the 2017 format. This is expected, as the template is backwards compatible with Visual Studio 2015 as well. Simply accept the popup and continue installation.
Downloading the Template
The UIX templates are part of the
M-Files 2018 Visual Studio template package, which can be downloaded from the M-Files Partner Portal. If you are a partner and do not have access to the M-Files Partner Portal, then please contact your Channel Account Manager. To install the template, simply double-click on the “.vsix” file, which will then guide you through installing the templates into the version of Visual Studio that you have installed.
Creating a ShellUI client application from the template
Creating a new ShellUI client application can be done from within Visual Studio by clicking
Project, then selecting
The template only supports creation of ShellUI-based UIX applications at this time. The resultant template can be manually altered to contain other modules, or to convert the ShellUI module to VaultUI or VaultCore, as appropriate.
An overview of the project contents
The default project contains a number of items:
app\my-dashboard\console-dashboard.jsEnables interaction from the dashboard into Jive.
app\my-dashboard\my-dashboard.htmlA sample dashboard.
app\my-dashboard\my-dashboard.jsContains the logic for the sample dashboard.
appdef.xmlThe application manifest file, containing information such as the publisher details and the current version number.
console-shellui.jsEnables interaction from the ShellUI module into Jive.
shellui.jsA sample ShellUI module.
Building and deploying
To build and deploy the project, either select the
Build menu item within Visual Studio and select
Build Solution, or press F6, or press
Ctrl-Shift-B. Any errors during build will be shown within the Visual Studio “Output” or “Error List” windows.
.mfappx file in the build output (
/out), and use the M-Files Admin software to install it into the
Applications list (right-click on the vault name and select
Applications). The vault will require a restart once the application is installed.
During the development process it may instead be worth deploying the application to the local development folder. Use of this is beyond the scope of this document.
To test the application, open the M-Files Desktop client and navigate to a document within the vault. When the document is selected, a tab named “My Dashboard” is selected on the right-hand section, and content from the sample dashboard is displayed.
Tips and tricks
Whenever an application is created from the Visual Studio template, the
<guid></guid> element in
appdef.xml is automatically set to be a new Globally Unique IDentifier. This GUID is used to uniquely identify each application, as each M-Files vault can only have one application with each GUID installed.
If you manually create an
appdef.xml file, or copy it from another location, you must ensure that the guid is altered to be unique. There are a number of online tools that can be used to generate GUIDs. Note that the GUID should be entered into the
<guid></guid> element without braces, but with hyphens (e.g.