Demo Source Code Running Guide
This article introduces how to quickly run the demo source code and experience the basic audio and video call services.
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 FAQ).
- .NET Framework 4.6.1 or above is installed.
- .NET Core 2.0 or above is installed.
- External devices that support audio and video functions such as microphones and cameras are working properly.
Get Demo Source Code
Local Download
Prerequisites
You have created a project in the ZEGOCLOUD Console and applied for a valid AppID and AppSign. For details, please refer to Console - Project Management.
Demo Source Code Directory Structure
The following structure is the file structure of the Example subdirectory. The file paths mentioned below are all relative to this directory.
ZegoExpressCsharp
┣ Example
┃ ┣ packages --------------------- Dependent Nuget packages
┃ ┃ ┗ Newtonsoft.Json.13.0.1
┃ ┣ ZegoCsharpWinformDemo -------- Project folder
┃ ┃ ┣ bin
┃ ┃ ┣ Common
┃ ┃ ┣ Examples
┃ ┃ ┣ HomePage
┃ ┃ ┣ obj
┃ ┃ ┣ Properties
┃ ┃ ┣ Utils
┃ ┃ ┣ app.config
┃ ┃ ┣ KeyCenter.cs ------------------------ appid configuration file
┃ ┃ ┣ packages.config
┃ ┃ ┣ Program.cs
┃ ┃ ┣ ZegoCsharpWinformDemo.csproj -------- Project file
┃ ┣ README.md
┃ ┣ README.ZH.md
┣ libs ------------------------------------ Dependent SDK C++ version .dll library files
┃ ┗ ZegoExpress
┃ ┃ ┗ win
┃ ┃ ┃ ┣ x64
┃ ┃ ┃ ┃ ┣ ZegoExpressEngine.dll
┃ ┃ ┃ ┗ x86
┃ ┃ ┃ ┃ ┣ ZegoExpressEngine.dll
┣ ZegoExpressCsharp
┣ .git
┣ .gitignore
┣ LICENSE --------------------------- Open source license declaration
┣ README.md
┗ ZegoExpressCsharp.sln ------------------- Solution file (contains SDK and demo source code project)Run Demo Source Code
-
Please refer to Download Documentation, download the latest version of SDK and demo source code, and extract it.
-
Modify the "/Example/ZegoCsharpWinformDemo/KeyCenter.cs" file and fill in the AppID and AppSign required for SDK initialization.
Please use the AppID and AppSign obtained in the Prerequisites of this article to fill in correctly, otherwise the demo source code cannot run normally.

- Use Visual Studio to open the project.
Developers can use Visual Studio to open the "ZegoExpressCsharp.sln" solution file in the demo source code directory in the Windows system. The solution contains the SDK and demo source code project.
- Click "Start" to start compiling and running the demo source code.
Experience Real-time Audio and Video Functions
Run the project on a real device. After running successfully, you can see the local video image.
For convenience, ZEGO provides a Web platform for debugging. On this page, enter the same AppID and RoomID, enter different UserIDs, and the corresponding Token, you can join the same room and communicate with the real device. When the audio and video call starts successfully, you can hear the remote audio and see the remote video image.
FAQ
How to download the Newtonsoft NuGet package in Visual Studio?
-
Select "Tools > NuGet Package Manager > Manage NuGet Packages for Solution" in the menu bar.
-
Search for "Newtonsoft.Json", check the demo source code project "ZegoCsharpWinformDemo", and click "Install".

