Integrate SDK
Prepare Environment
Please ensure the development environment meets the following technical requirements:
- Windows system: Windows 7, Windows 8, Windows 10.
- Visual Studio 2019 or above is installed.
- Visual Studio has installed the C# development environment and Newtonsoft NuGet package (for details, please refer to Run Demo Source Code - FAQ).
- .NET Framework 4.5 or above is installed.
- .NET Core 3.1 or above is installed.
- External devices that support audio and video functions such as microphones and cameras are working properly.
Integrate SDK
(Optional) Create New Project
-
Open Visual Studio, select the menu bar, select "File > New > Project" to create a new project.
-
In the new project window, select the language as "C#". To create a project with a UI interface, it is recommended to check the "Windows Forms App (.NET Framework)" project type, then click "Next".

-
In the "Configure your new project" interface that pops up, fill in "Project name", "Location", and "Solution name", select the framework as ".NET Framework 4.5" or above, then click "Create".

-
Right-click the created project, select "Properties > Build", and configure the platform as "x64" or "x86" according to the current Windows system properties.

If there is no such platform option, right-click the solution, select "Configuration Manager", and in the active solution platform, click "New".

In the "New Solution Platform" window, select "x64" and "x86" configuration items, click "OK".

Import SDK
Import SDK in Source Code Form
-
Download the SDK project source code from Download.
-
Copy the "ZegoExpressCsharp" folder and the "libs" folder from the source code directory to the current solution directory (WindowsFormsApp1.sln).

-
Right-click the solution directory in Visual Studio, select "Add > Existing Project", and select the "ZegoExpressCsharp.csproj" project in the "ZegoExpressCsharp" folder copied in step 2.


-
Right-click the created project (WindowsFormsApp1), select "Add > Reference > Projects", and then select the "ZegoExpressCsharp.csproj" project.

After importing the SDK in source code form, you still need to copy the dependency library "ZegoExpressEngine.dll" to the runtime directory. For detailed operations, please refer to 3 Copy dependency libraries to runtime directory.
Copy dependency libraries to runtime directory
-
Method 1 (Recommended): Automatic copy
You can add post-build event command lines in project build events to automatically copy.
xcopy /Y $(SolutionDir)libs\ZegoExpress\win\$(PlatformName)\ZegoExpressEngine.dll $(TargetDir)
-
Method 2: Manual copy
Manually copy the "ZegoExpressEngine.dll" dependency library in the "libs" directory to the output path. For example, if the current system is 64-bit, copy "ZegoExpressEngine.dll" in the "libs\ZegoExpress\win\x64" directory to the output path:
-
Right-click the current project, click "Properties", select "Build", and set the output path.

-
Copy "ZegoExpressEngine.dll" to the output path.

-
Start Debugging
In Visual Studio, click "Start" to start debugging the project.
