Distributing Your Applications
Using a Setup Toolkit
The following files are required by an application using the IC Imaging Control 4 .NET Class Library:
ic4dotnet.dll
runtimes\<platform-identifier>\native\ic4core.dll
runtimes\<platform-identifier>\native\ic4_dutils_avx2.dll
If the application uses the video writer, the video writer plugin is required:
runtimes\<platform-identifier>\native\ic4plugin_video_win32_h26x.dll
If the application uses Windows Forms, the following files are required:
ic4dotnet.System.Windows.Forms.dll
runtimes\<platform-identifier>\native\ic4gui.dll
runtimes\<platform-identifier>\native\ic4plugin_display_win32_opengl.dll
If the application uses the System.Drawing support library, include the assembly:
ic4dotnet.System.Drawing.dll
If the application uses the System.Windows.Media support library, include the assembly:
ic4dotnet.System.Windows.Media.dll
If the application uses the OpenCvSharp support library, in addition to the OpenCvSharp assemblies and native libraries, include the assembly:
ic4dotnet.OpenCvSharp.dll
The directory structure described above has to be replicated for the target platform(s) relative to the application's executable. For Windows x64, platform-identifier is win-x64.
If only one platform is to be supported, it is allowed to put all native libraries next to ic4dotnet.dll
.
It is recommended to use the .NET publishing mechanic to automatically create the selection of required files for distribution.
Using the .NET Publishing Wizard
From Within Visual Studio
Right-click your project, click Publish..., and follow the instructions of the publishing wizard.
IC Imaging Control 4 .NET Class Library and all its native dependencies will be automatically included in the resulting distribution.
From the Command Line (.NET 6 or Later Projects Only)
The dotnet publish
command can be used to copy an application and its dependencies into a directory for deployment:
$ dotnet publish
The console output of the command will contain the directory that was created. Please note that the directory created this way still requires the matching .NET library to be installed on the target system.
To create a deployment that can run without .NET installed, pass the --self-contained
argument:
$ dotnet publish --self-contained
This will create a directory that in addition to your application and its immediate dependencies contains all of .NET required to run the application.