logo

ELMA Plugin for Visual Studio 2010/2013/2017

Starting from ELMA 3 you can improve the system on your own. This makes the system even more flexible. Now, every company can add the properties and objects it needs. Thus, you customize your system, which meets all the requirements of your company and solves all the tasks. To develop extensions for ELMA 3, you have to use Visual Studio and ELMA Plugin.

ELMA Plugin is an extension for Visual Studio.

This plugin makes developing of ELMA extension easier and allows working with the system's object model in the entities editor. The plugin also includes ready-to-use templates for the system's web module, server end, and portlet. These components are described later on in this article.

 

Articles that are mandatory for reading

The plugin is an installation package, which contains ELMA VS2010/2013/2017 Plugin and the ASP.NET MVC 3 component, required for its operation.

Installing Plugin

Before installing the plugin, you have to:

  • Install ELMA of the same version, as the plugin version (and the same build version)
  • Install Visual Studio 2010 Professional or higher (SP1 also works) or Visual Studio Community 2013

If your system meets these requirements, start the plugin installation and follow the instructions. By default, the plugin will be installed in *ELMA directory*/Dev. We recommend that you do not change the installation directory.

Creating a Project. Project Templates

The plugin contains ready-to-use templates of projects for ELMA modules:

  • ELMA Web Module;
  • ELMA Module.

After you have created a project, using the "ELMA Module" template, the Solution Explorer should look like that:

The first project - MyElmaModule1 - is the server end of the module, where you can create data models, describe managers for working with the models and create server components.

The second project - MyElmaModule1.Web - is the web end of the module, where you describe the web interface the users work with.

After that, you can start adding logic to your module. You can look through some examples in ELMA Knowledge Base.

Package assembly tool

ELMA Plugin for Visual Studio 2010/2013/2017 includes a tool for compiling packages for projects, which are currently open in the Visual Studio environment.

To do so, select "ELMA-> ELMA Packages Assembling Manager ".

 

 The assembly is divided into several steps:

  1. At the first step, you have to select the projects, for which packages will be assembled.

2. At the second step, specify:

  • The folder, to which the created packages will be saved.
  • The package version number. It is used, if the value of $version$ is set in the version tag in the package specification file.
  • The “On the projects in the current solution” box. If this box is checked, all the projects of the Visual Studio solution, referenced by this project, will be written to the list of the package dependencies. Version range is from the current major version to the next major version, e.g. [3.8, 3.9).
  • The “On the file “packages.config” box. If this box is checked, then all the packages, referenced by the current project (this list is stored in the packages.config file), will be written to the list of the package dependencies. Version range is from the current package to the next minor version, e.g. [1.2.500, 1.2.501).
  • Add source files to the package.

  1. When you switch to the third step, the package assembling starts. The window displays the current status of this process.

Adding references to assemblies and ELMA configuration

The plugin includes a tool for adding references to local assemblies and configuration assemblies. Let us take a closer look at both cases.

Adding a reference to ELMA Configuration

In case you need to develop a module for an active configuration, you have to add a link to the ELMA configuration to your project.

In the Solution Explorer, right-click on References and select Add ELMA Packages.

In the opened window, enter your ELMA server connection parameters:

  • Server Address (e.g. localhost:7033, if the server address starts with https, then https://localhost:7033)
  • Login
  • Password (optional parameter)

Adding a reference to ELMA package

Apart from adding a reference to a configuration, you can also add a reference to an ELMA package.

In the Solution Explorer, right-click on References and select Add ELMA Packages. In the opened window, go to the ELMA Packages tab.

In this window, you can select the packages you need to add to your project.

Installing/updating a system package

After you have compiled your package, you have to install it or update it to a newer version.

Modules are stored in the folder: “~\ELMA3-“Edition”\Packages”. You have to save the module files to this folder (these files have the .nupkg extension). Saving module files is the first step of successful installation/update.

Attention
After saving files to the above-mentioned folder, the server may restart! If it does not restart automatically, do it manually.

After the server has been restarted, find the added modules in the system. Go to Administration – System – Components – click on the gear icon near the profile menu – expand the advanced search – select All Packages in Package Types – search the required package.

The search will find several modules, amongst them, you will see the modules that can be installed or updated. It looks like that:

Check the box next to the required module and click “Execute Actions” in the top menu.

After that, a notification will appear:

If you are ready to install/update the module, click OK, otherwise, click Cancel and return to this step later.

After clicking OK, all the required operations will be executed and the server will be available again.

If your module is not yet installed in the system, you have to select and install it and restart the server. 

Unzipping a package/Opening a project in Visual Studio 2010/2013

If you need to improve an existing module, download it from the folder “~\ELMA3-“Edition”\Packages”. Next, open it with an archiver. You will find source files of the projects inside the archive. For the server end, it is the src folder; for the web module, it is the ELMA/WebModule folder. Open the files in Visual Studio 2010/2013 and add the required projects to the solution. After making the changes, you can compile the module back into a package (see instructions above).

References to ELMA assemblies

For the source codes to open correctly, your plugin version, version of the system, installed on your computer, and the version of the operating system must be compatible.

The process of exporting an ELMA Store component to MS Visual Studio consists of several steps. To switch between steps, use the Back and Next buttons. To cancel export, click Cancel. 

To start exporting a component, click ELMA – ELMA Store Component Assembling Manager, in the toolbar of MS Visual Studio.

Step 1. Create a manifest

In the opened dialog box, select the repository mode:

  • Local – specify the folder with components and packages;
  • Remote – specify the address of the ELMA server.

After initialization, click OK. Now you have to enter general information and click Next. The fields with an asterisk are required.

 

Step 2. Selecting projects and dependencies

In this dialog box, select the required projects and dependencies and click Next. Note, that it is not recommended that you export projects without dependencies, since it may cause the system to work incorrectly.

Step 3. Configuring parameters

In this dialog box, you can select the folder, to which the component will be saved. The folder will store the ELMA Store component file, with the .elma3 extension.

Add to the package – add the source files to the package of the created component. This box is checked by default, it is recommended not to uncheck it.

To continue exporting, click Next.

Step 4. ELMA Store component building

At this step, the configuration is being exported – data, selected at the previous steps is being written to the export file. This dialog box displays information on the data export progress.

To complete the export process, click Finish. After that, the .elma3 component file will appear in the folder, selected at the third step.

Only ELMA partners can upload components to ELMA Store. You can learn more about adding a component to ELMA Store in the partners section.