C# Programmer’s Checklist

Developers of EMS C# programs can use this checklist during the four phases of the development cycle.

The EMS .NET client libraries are built to the .NET Standard 2.0 specification. They can be used to build both .NET Framework applications, which can only run on Windows, and .NET Core applications, which can run on both Windows and Linux.

Install

Install the EMS software release, which automatically includes the EMS assembly DLLs in the EMS_HOME\bin subdirectory.

Code

Import the correct EMS assembly (see the following table).

Version DLL
.NET API TIBCO.EMS.dll
.NET Administration API TIBCO.EMS.ADMIN.dll
.NET Unshared State API TIBCO.EMS.UFO.dll

Compile

Both .NET Framework and .NET Core applications can be built using the Microsoft dotnet build tool, C# project files (*.csproj) and, optionally, solution files (*.sln).

For example, to build a .NET Framework EMS application:
> dotnet build my-EMS-net-program.csproj -f net472
This will create a .NET Framework executable application: my-EMS-net-program.exe.
And to build a .NET Core EMS application:
> dotnet build my-EMS-net-core-program.csproj -f netcoreapp2.1
This will create a .NET Core DLL application: my-EMS-net-core-program.dll.

The EMS_HOME/samples/cs and EMS_HOME/samples/cs/admin directories contain sample C# project files (*.csproj) and solution files (*.sln) that are used to build the .NET Framework and .NET Core sample applications.

Run

The .NET Framework application built in the above example can be executed directly in the .NET Framework environment:
> my-EMS-net-program.exe
The .NET Core application built in the above example can be executed in the .NET Core runtime environment:
> dotnet my-EMS-net-core-program.dll
  • In the .NET Framework environment, the EMS assembly must be in the global assembly cache (this location is preferred), or in the system path, or in the same directory as your program executable.
  • In the .NET Framework environment, to automatically upgrade to the latest .NET assemblies, include the appropriate policy file in the global cache. See Automatic Upgrades Between Versions for more information.
  • In the .NET Core environment, the EMS assembly must be in the same directory as your application executable.
  • In both the .NET Framework and .NET Core environments, the application must be able to connect to a EMS server process (tibemsd).