ThingsGatewayRuntime.Foundation 2.1.17

dotnet add package ThingsGatewayRuntime.Foundation --version 2.1.17
 
NuGet\Install-Package ThingsGatewayRuntime.Foundation -Version 2.1.17
 
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="ThingsGatewayRuntime.Foundation" Version="2.1.17" />
 
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ThingsGatewayRuntime.Foundation" Version="2.1.17" />
 
Directory.Packages.props
<PackageReference Include="ThingsGatewayRuntime.Foundation" />
 
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add ThingsGatewayRuntime.Foundation --version 2.1.17
 
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: ThingsGatewayRuntime.Foundation, 2.1.17"
 
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package ThingsGatewayRuntime.Foundation@2.1.17
 
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=ThingsGatewayRuntime.Foundation&version=2.1.17
 
Install as a Cake Addin
#tool nuget:?package=ThingsGatewayRuntime.Foundation&version=2.1.17
 
Install as a Cake Tool
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

ThingsGatewayRuntime

工业物联网边缘网关平台,提供数据采集、设备管理、报警处理、规则引擎、远程部署等完整解决方案。

项目组成

核心运行时

  • ThingsGatewayRuntime.Application - 网关运行时核心,提供数据采集、业务处理、规则引擎等功能
  • TAdmin - 管理模块,提供用户认证、权限管理、日志记录等功能

开发工具

  • ThingsGatewayStudio - 开发环境后端服务,提供工程管理、脚本编译、代码补全等功能
  • gateway-studio - 开发环境前端,基于 Vue 3 + Element Plus 构建的 Web 管理界面

运维工具

  • ThingsGatewayRuntime.Watchdog - 看门狗程序,用于监控和管理运行时进程

编译工具

  • ThingsGatewayStudio.Expressions - 表达式编译器
  • ThingsGatewayStudio.RoslynCompletion - Roslyn 代码补全服务
  • ThingsGatewayRuntime.ExpressionsGenerator - 表达式源码生成器
  • ThingsGatewayRuntime.PluginsGenerator - 插件源码生成器
  • TAdmin.WebApiGenerator - WebApi 源码生成器

功能特性

数据采集

  • 多协议支持:Modbus、OPC UA、MQTT、HTTP 等
  • 多通道并发采集
  • 设备状态监控和自动重连
  • 变量读写和数据类型转换
  • 离线设备检测与告警

业务处理

  • 高性能数据缓存
  • 实时报警检测和处理
  • 可视化规则引擎(支持运行状态监控)
  • 自定义脚本和表达式扩展

系统管理

  • 主备冗余切换
  • RESTful API 接口
  • WebSocket 实时推送
  • JWT 用户认证
  • OAuth2 Authorization Code Flow(支持 GitHub 等第三方登录)
  • 角色权限管理(API方法级、菜单级、按钮级)
  • 完整日志系统(后台日志、RPC日志、操作日志)

开发运维

  • 工程管理和编译
  • 代码智能补全
  • 远程部署和监控
  • 进程看门狗保护

技术栈

技术 版本 说明
.NET 8.0/10.0 后端运行时
Vue 3.5.x 前端框架
TypeScript 5.7.x 前端类型支持
Element Plus 2.9.x UI 组件库
TouchSocket - 网络通信
FreeSql - ORM 框架
Roslyn - 编译器服务

目录结构

ThingsGatewayRuntime/
├── src/ // 源代码
│ ├── TAdmin/src/TAdmin/ // 管理模块
│ ├── ThingsGatewayRuntime.Application/ // 应用核心
├── studio/ // 开发工具
│ ├── ThingsGatewayStudio/ // 开发环境后端
│ ├── ThingsGatewayRuntime.Watchdog/ // 看门狗程序
│ ├── ThingsGatewayStudio.Expressions/ // 表达式编译
│ ├── ThingsGatewayStudio.RoslynCompletion/ // 代码补全
│ └── ThingsGatewayStudio.Model/ // 模型定义
├── web/ // 前端项目
│ └── gateway-studio/ // Vue 前端
├── auth/ // 认证授权
├── analyzer/ // 源码生成器
│ ├── ThingsGatewayRuntime.ExpressionsGenerator/
│ ├── ThingsGatewayRuntime.PluginsGenerator/
│ └── TAdmin.WebApiGenerator/
├── benchmark/ // 性能测试
│ └── ThingsGatewayRuntime.Benchmark/
├── ThingsGatewayStudio.slnx // 解决方案文件
├── Directory.Build.props // 构建配置
└── NuGet.Config // NuGet 配置

快速开始

编译项目

dotnet build ThingsGatewayStudio.slnx -c Release

运行开发环境

  1. 启动 Studio 后端:
cd studio/ThingsGatewayStudio
dotnet run
  1. 启动前端:
cd web/gateway-studio
npm install
npm run dev

运行网关运行时

cd studio/ThingsGatewayStudio/RuntimeProject
dotnet run

运行看门狗

cd studio/ThingsGatewayRuntime.Watchdog
dotnet run

部署架构

┌─────────────────────────────────────────────────────────────┐
│ 开发环境 (Studio) │
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │
│ │ 前端 UI │───▶│ Studio API │───▶│ 编译服务 │ │
│ │ Vue 3 SPA │ │ ASP.NET │ │ Roslyn │ │
│ └─────────────┘ └─────────────┘ └─────────────┘ │
└─────────────────────────────────────────────────────────────┘
 │
 │ 工程部署
 ▼
┌─────────────────────────────────────────────────────────────┐
│ 生产环境 (边缘网关) │
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │
│ │ Watchdog │───▶│ Runtime │───▶│ 驱动插件 │ │
│ │ 进程监控 │ │ 运行时核心 │ │ 采集/业务 │ │
│ └─────────────┘ └─────────────┘ └─────────────┘ │
│ │ │
│ │ 数据采集/处理 │
│ ▼ │
│ ┌─────────────────────────────────────────────────────┐ │
│ │ 工业设备 / PLC / 传感器 │ │
│ └─────────────────────────────────────────────────────┘ │
└─────────────────────────────────────────────────────────────┘

相关文档

许可证

本项目采用开源许可证,详见 LICENSE 文件。

资源

  • 官方文档:https://thingsgateway.cn/
  • Gitee 仓库:https://gitee.com/diego2098/ThingsGateway
  • GitHub 仓库:https://github.com/kimdiego2098/ThingsGateway
  • QQ 群:605534569
Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed.
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (3)

Showing the top 3 NuGet packages that depend on ThingsGatewayRuntime.Foundation:

Package Downloads
ThingsGatewayRuntime.Application

Package Description

ThingsGatewayRuntime.NOAOTFoundation

Package Description

ThingsGatewayRuntime.NOAOTPROFoundation

Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.1.17 0 7/8/2026
2.1.9 0 7/8/2026
2.1.8 55 7/7/2026
2.1.6 82 7/6/2026
2.1.5 89 7/6/2026
2.1.4 88 7/4/2026
2.1.3 84 7/4/2026
2.1.2 103 7/2/2026
2.1.1 94 7/2/2026
2.0.233 144 6/26/2026
2.0.232 130 6/25/2026
2.0.231 138 6/25/2026
2.0.225 143 6/23/2026
2.0.216 141 6/22/2026
2.0.214 146 6/22/2026
2.0.213 140 6/22/2026
2.0.212 141 6/22/2026
2.0.211 135 6/22/2026
2.0.210 162 6/22/2026
2.0.193 140 6/17/2026
Loading failed