...
To create a plugin compatible with multiple CSI products, use the cross-product API library, CSiAPIv1.DLL . This library contains interfaces for all methods supported by all CSi CSI products. Please note, however, that no CSI product implements every interface. Attempting to call an unsupported API method will return an error code. Developers should refer to the API documentation in the installed program directory to determine which methods are supported.
This example will use CSiAPIv1.DLL. If you are making a plugin only for one CSI product, you can use the program-specific API library instead of the cross-product library. The program-specific API libraries are:
...
- Change the <TargetFramework> from net8.0 to net8.0-windows . This is needed to allow the plugin to instantiate Windows forms (Note: this plugin has only been tested to work on the Windows platform)
- Add the <UseWindowsForms>true</UseWindowsForms> attribute child element to the <PropertyGroup> parent element. This will allow us you to add a Windows Form to our your class library.
- Add the <EnableDynamicLoading>true</EnableDynamicLoading> attribute child element to the <PropertyGroup> parent element. This will allow the CSI product to load our your project as a plugin.
- Locate the CSiAPIv1 library reference element. It should look like <Reference Include="CSiAPIv1"> and be inside an <ItemGroup> parent element. Within the CSiAPIv1 reference element:
- Add the <Private>false</Private> child element. This will prevent the CSiAPIv1.DLL file from being copied to the project output directory. Why this is important will be explained later in this tutorial.
- Add the <ExcludeAssets>runtime</ExcludeAssets> child element. This is needed to prevent certain dependencies from being copied to the output directory for some project types. Why this is important will be explained later in this tutorial.
After the above changes, your project file should look approximately as shown below on the right. It's ok if doesn't match exactly.
...