Creatio development guide
PDF
This documentation is valid for Creatio version 7.10.0. We recommend using the newest version of Creatio documentation.

Visual Studio settings for development in the file system

Glossary Item Box

Introduction

Using an Integrated Development Environment (IDE), Microsoft Visual Studio maximizes development speed. Microsoft Visual Studio IDE usually enables you to create, modify and compile the source code, debug it, run team development, use version control systems, etc.

Development in Microsoft Visual Studio became possible after the implementation of the configuration packages in the file system mechanism in bpm'online. With this mechanism, you can export the packages from the database to a set of files, edit the package source code using an IDE and upload the updated packages back to the database.

NOTE

For development in the file system, you can use Microsoft Visual Studio Community, Professional and Enterprise version 2015 (with latest updates) and higher.

The WorkspaceConsole utility integrated into Visual Studio is used to compile applications. The WorkspaceConsole has the following benefits:

  • Significantly speeds up the compilation process, because the whole configuration assembly is split into independently compiled modules. Only the modules that contain modified packages are compiled.
  • Compilation does not require exiting the debugging mode or disconnecting from the IIS process.

Attention!

You can also compile the configuration project using the Visual Studio compiler. However, it may not take into account the dependencies and the position of packages.

Visual Studio settings for development in the file system:

  1. Enable compilation mode in the IDE.
  2. Configure the WorkspaceConsole to compile the application.
  3. Configure Microsoft Visual Studio.

Visual Studio configuration steps

1. Enable compilation mode in the IDE

To enable compilation mode in the IDE, edit the Web.config file (located in the root folder with the installed application) and set the enabled and UseIDEForCompilation attributes of the fileDesignMode element to true.

<fileDesignMode enabled="true" UseIDEForCompilation="true" />

Attention!

Enable the development mode in the file system to compile in the Visual Studio.

The UseIDEForCompilation attribute specifies the location of the compiled Terrasoft.Configuration.dll class library. If this attribute set to false, the IIS will use the library from the database. If it is set to true, the IIS will use the library from the file system.

NOTE

Starting with version 7.10.1 this attribute has been deleted from the Web.Config. If the development mode in the file system is enabled, IIS will use the Terrasoft.Configuration.dll library only from the file system.

2. Configure the WorkspaceConsole to compile the application.

Configuration projects are compiled via the WorkspaceConsole utility, which is included in the application setup files. The utility should be configured before using. In addition to the settings covered in the "WorkspaceConsole settings” article, you must also enable the development mode in the file system in the Terrasoft.Tools.WorkspaceConsole.exe.config configuration file.

<fileDesignMode enabled="true" UseIDEForCompilation="true" />

To speed up the compilation by splitting the configuration assembly into independent compiled modules, set the CompileByManagerDependencies setting to “true” in the “internal” Web.Config (located in the Terrasoft.WebApp directory) and in the Terrasoft.Tools.WorkspaceConsole.exe.config file of the WorkspaceConsole utility.

<appSettings>
    ...
    <add key="CompileByManagerDependencies" value="true" />
    ...
 </appSettings>

3. Configure Microsoft Visual Studio

To use the WorkspaceConsole utility for compilation in Visual Studio, set up External Tools. To do this, execute the Tools > External Tools... command in the Visual Studio (Fig. 1).

Fig. 1 Adding external tools in the Visual Studio

In the opened dialog window (Fig 2), add and set up three commands for calling the WorkspaceConsole utility. The Build Workspace and Rebuild Workspace commands initiate compilation of changes and full compilation of configuration projects. The Update Workspace Solution command updates the Visual Studio solution of the configuration package from the application database. It applies all changes made by the users within the application. The properties and arguments of commands are available in tables 1, 2 and 3. Select the Use Output window checkbox (Fig. 2) for all three commands.

Fig. 2 Setting properties and arguments for an external Visual Studio command

Table 1. Update Workspace Solution command properties

Title Update Workspace Solution
Command

[Path to the catalog with installed application]\Terrasoft.WebApp\DesktopBin\WorkspaceConsole\Terrasoft.Tools.WorkspaceConsole.exe

Example:

C:\bpmonline710\Terrasoft.WebApp\DesktopBin\WorkspaceConsole\Terrasoft.Tools.WorkspaceConsole.exe

Arguments

--operation=UpdateWorkspaceSolution --workspaceName=Default --webApplicationPath="[Path to the catalog with installed application]\Terrasoft.WebApp\"

Example:

--operation=UpdateWorkspaceSolution --workspaceName=Default --webApplicationPath="C:\bpmonline710\Terrasoft.WebApp\"

Table 2. Build Workspace command properties

Title Build Workspace
Command

[Path to the catalog with installed application]\Terrasoft.WebApp\DesktopBin\WorkspaceConsole\Terrasoft.Tools.WorkspaceConsole.exe

Example:

C:\bpmonline710\Terrasoft.WebApp\DesktopBin\WorkspaceConsole\Terrasoft.Tools.WorkspaceConsole.exe

Arguments

--operation=BuildWorkspace --workspaceName=Default --webApplicationPath="[Path to the catalog with installed application]\Terrasoft.WebApp\"

Example:

--operation=BuildWorkspace --workspaceName=Default --webApplicationPath="C:\bpmonline710\Terrasoft.WebApp\"

Table 3. Rebuild Workspace command properties

Title Rebuild Workspace
Command

[Path to the catalog with installed application]\Terrasoft.WebApp\DesktopBin\WorkspaceConsole\Terrasoft.Tools.WorkspaceConsole.exe

Example:

C:\bpmonline710\Terrasoft.WebApp\DesktopBin\WorkspaceConsole\Terrasoft.Tools.WorkspaceConsole.exe

Arguments

--operation=RebuildWorkspace --workspaceName=Default --webApplicationPath="[Path to the catalog with installed application]\Terrasoft.WebApp\"

Example:

--operation=RebuildWorkspace --workspaceName=Default --webApplicationPath="C:\bpmonline710\Terrasoft.WebApp\"

To prevent the debugger from accessing the source code that is disabled in the project, execute the Debug > Options... menu command and enable the Enable Just My Code option in the opened dialog (Fig. 3). For more information about the Enable Just My Code, please refer to this page.

Fig. 3 Enable Just My Code option

After the configuration is compiled, the application is automatically restarted. The Enable Edit and Continue option is not supported and should be disabled (Fig. 4).

Fig. 4 Edit and Continue option

For the debugger to stop correctly on breakpoints, make sure that the Suppress JIT optimization on module load option is enabled (Fig. 5).

Fig. 5 Suppress JIT optimization on module load

 

© bpm'online 2002-2017.

Did you find this information useful?

How can we improve it?