一个基于
.NET 6开发的在线音视频聊天项目,客户端使用WPF开发,后端使用.NET Core Web API。
I. project introduction
一个基于.NET 6开发的在线音视频聊天项目,客户端使用WPF开发,后端使用.NET Core Web API。
仓库地址:https://github.com/qian-o/Dimension
Warehouse screenshot:

Project code structure:

II. Using third-party reliance introductions
** Public dependence **
- log4 net logging.
- SignalR is used for communication between servers and clients. This project is used for a series of notifications such as friend applications, message reminders, announcements, chats, and audio and video calls.
- EntityFrameworkCore operates the ORM tool for the database. The server uses SqlServer and the client uses Sqlite.
- Newtonsoft.Json serializes and deserializes JSON.
** Server **
- The Tencent CloudSDK operates the Tencent Cloud service API, and this project is used to manage call rooms.
- aliyun-net-sdk-core operates the Alibaba Cloud service API, and this project is used for SMS services.
- CHSPinYinConv obtains Chinese pinyin.
- Portable.BouncyCastle TRTC cryptographic use.
- SixLabors.ImageSharp operates pictures. Because operating pictures in c#requires Microsoft's GDI drawing, operating on linux requires mono's libgdiplus library, and the processing effect is not ideal.
**WPF end **
- TXLiteAV operates Tencent Cloud's TRTC service to push audio and video streams from local devices and obtain audio and video data from other users in the room.
- XamlAnimatedGif played GIF. Due to equipment efficiency issues, the author's source code was changed and repackaged.
- 源库:https://github.com/XamlAnimatedGif/XamlAnimatedGif
- 问题:https://github.com/XamlAnimatedGif/XamlAnimatedGif/issues/160
III. project configuration
If you need to run this project properly, please understand the relevant configuration.
3.1 Back-end configuration:
The backend is developed using the. NET Core Web API, and the configuration is as follows:
- Third-party service configuration
修改DimensionService.Common命名空间下 ClassHelper类

请填写红框内付费服务内容,本程序使用阿里的短信服务和腾讯的TRTC服务,填写内容请见官方说明。
- database
该服务采用SQL Server 2019数据库,并使用EF CORE作为主要的ORM框架,首次使用需要迁移数据库。
Open the package management console and enter
Update-Database InitialCreate

该项目提供线上测试服务地址,http://47.96.133.119:5000 (站长注:目前无法访问此地址)
3.2 client configuration
The client is developed using WPF, as shown in the following figure:

The content of the red box must be consistent with the server
Functions implemented
- login| registered
- add friends
- Audio and video online calls
- Chat (pictures, text, rich text)
- Screenshots (multiple monitors with different dpi support)
Part of the client screenshot:
The webmaster has no conditions and records a login animation (haha):

Here are pictures of the author readmd and the blog park:








IV. function demonstration
The author is too lazy, write later!
I will still provide the test account number and program address.
不过需要安装 NET6 桌面运行时,这是下载地址:.NET 6 桌面运行时
test user
1571221{1 ~ 9}177,
The password is unified to 12345678.
I put all user login information in the program package and add me as a friend.😄

v. package
链接:https://pan.baidu.com/s/1aTh_710GpKIIHOHpvVCpBw?pwd=cp4o
Extraction code: cp4o
-Sharing from Baidu Netdisk Super Member V4
vi. demo video
链接:https://pan.baidu.com/s/1n-sQZFgO9GEhS80jHLVouA?pwd=85x3
Extraction code: 85x3
-Sharing from Baidu Netdisk Super Member V4
VII. Project warehouse address
GitHub 地址:https://github.com/qian-o/Dimension