Use the git command to obtain a local copy: Open the terminal, switch to the working directory where the SDK should be stored, and enter the gitclone command to clone the remote repository.
The sample programs are stored in the csharp folder in the root directory of the SDK. For detailed descriptions of the sample programs, refer to Sample Program Descriptions: C#.
Unzip the downloaded file and configure the system environment variable.
Right click This PC > Properties > Advanced System Properties > Environment Variables, then add the local SWIG executable file path to the Path variable in the Environment Variables window.
Double click the downloaded .msi installer file and follow the wizard to complete the installation. Important: Select the option “Add CMake to PATH” during the installation process to configure system environment variables automatically.
Open Command Prompt and execute the following command to validate installation success by checking the version information:
cmake--version
Install Visual Studio
Download and install Visual Studio . Important: During installation, select the .NET Desktop Development under the Desktop and Mobile Applications category.
Open the CMakeLists.txt in the “camport_multi_language” directory, set the target language to CSHARP, the installed version of .NET Framework to match the local version, and the local path of SWIG.
Tip
If the compilation is interrupted due to SWIG path or version issues, you can manuallrely select the correct SWIG path or version. Once configured, you can proceed with the compilation without needing to exit.
Create a new folder in the “camport_multi_language” directory and name it csharp_build_x64.
Start cmake-gui, specify the source code directory as “camport_multi_language”, and specify the build output directory as camport_multi_language/csharp_build_x64.
Click on Configure, select the Visual Studio version and X86/X64 version settings.
Click on Generate.
Click on Open Project to open the project, then select Release in the Visual Studio menu bar and click on Build > Build Solution in order.
Note
After modifying the source code, you need to rebuild the executable files by selecting Release in the Visual Studio menu bar and then click on Build > Rebuild Solution.
After compilation, copy the dynamic library tycam.dll in the camport3/lib/win/hostapp/x64 directory to the “camport_multi_language/csharp_build_x64/Bin/Release” directory, open Windows PowerShell, and run the generated executable files.