Skip to content
Rantanen edited this page Oct 18, 2012 · 1 revision

Basic project

Installing the SDK

M-Files SDK installation files can be downloaded from the downloads page. The zip contains an MSI installer for the build tasks and a VSIX package for the Visual Studio extension.

Currently the Task installer doesn't provide a message on successful install. You can check the "Programs and Features" in the Control Panel for a successful install. The tasks are installed under the name of "MFiles.SDK.Tasks"

Creating a new project

Once the SDK has been installed, a new M-Files Application project can be created through the New Project dialog.

New project dialog.

Building and testing the project

When created, the project contains a minimal Hello_World! example which can be used to test the integrity of the installation. The project can be built using the normal Visual Studio build action (Ctrl+Shift+B). This results in an application package containing the project files, some additional JavaScript support libraries and the appdef.xml manifest file.

Minimal project.

In case M-Files has been installed with the default Sample Vault, the project can also be launched with the Visual Studio Start Debugging command (F5). Currently M-Files doesn't have support for a proper debugger, but this still offers a quick and convenient way to launch the application straight from Visual Studio. If Start_Debugging command results in an error message stating the vault doesn't exist, see the section below.

Configuring the project

The SDK tries to provide sensible default values for each new project but often there are values that require changing. The project properties can be accessed by right clicking the project node in the Solution_Explorer and choosing Properties in the context menu. The properties are divided in two categories.

The Application properties are used to configure the appdef.xml file contained in the final application package. Most of the settings on this page are more or less cosmetical. The most important property that affects the package functionality is the Environment choices. These check boxes specify the environments to which the application scripts are loaded by default.

Application properties.

The Debug page contains the properties which affect the way the package is built and launched. For example if the local M-Files Client doesn't have a Sample Vault available, this page can be used to change the target vault used for testing the package.

Debug properties.