Hide menu
Loading...
Searching...
No Matches
Building C# Examples

C# examples are located in the subfolder examples/csharp.

Note
Save the development license file as ${install_dir}/examples/csharp/mtk_license.cs. For running the examples, place the matching runtime license file either next to this development license file or next to the example executable. This layout is intended for examples only. In production applications, place the runtime license file next to the application executable.

Building with Microsoft Visual Studio

There are two ways to configure C# examples:

  1. Visual Studio project files.
    • Open a selected example's project file (*.csproj).
    • By default, the example project files are configured to target 64-bit platforms and to use 64-bit assemblies located in csharp/win64 directory. If you need to enforce using 32-bit configuration then update assembly references (e.g. CadExCoreNet, CadExParaNet, etc) by browsing the subdirectory corresponding to 32-bit configuration (csharp/win32 directory) and add a respective directory with 32-bit native C++ libraries (e.g. win32/vc14/bin).
    • Build and run the example.
  2. Cmake-based. Generation of C# projects is exactly the same as generation of C++ projects for Visual Studio (see Building with Microsoft Visual Studio on Windows).
    Note
    Cmake 3.13.0 or higher is required to generate C# projects for Visual Studio.