Skip to content
Bitzsoft.Integrationsbitzsoft.integrations

Reference

环境要求

使用 Bitzsoft.Integrations 前需要的 .NET SDK 版本、NuGet 配置和开发工具。

Last updated

.NET SDK

库多目标 net5.0;net8.0;net10.0(AI 相关包除外)。消费方项目至少使用其中一个目标框架。

目标框架角色
net5.0兼容产品线中仍在运行的老项目
net8.0当前 LTS,推荐的生产基线
net10.0最新 LTS,面向新项目

SDK 版本由仓库根 global.json 固定:

{
"sdk": {
"version": "10.0.300",
"rollForward": "latestFeature",
"allowPrerelease": false
}
}

NuGet

包发布到 NuGet.org,公开消费无需额外 feed 配置。

Terminal window
# 确认能搜索到包
dotnet nuget list source
dotnet add package Bitzsoft.Integrations.Payment.All

如果项目使用集中包管理(CPM),在 Directory.Packages.props 中添加版本即可。

开发工具

工具用途
Visual Studio 2022 17.10+ 或 Rider日常开发
dotnet CLI构建、打包、测试
dotnet user-secrets本地密钥管理(Options 中的 AppId/AppSecret)

构建

Terminal window
# 克隆仓库后构建全部包
git clone https://github.com/shbitz/Bitzsoft.Integrations.git
cd Bitzsoft.Integrations
dotnet restore
dotnet build --configuration Release

预期结果:0 warning、0 error(警告被 TreatWarningsAsErrors 提升为错误)。

打包

Terminal window
dotnet pack -c Release -o artifacts/

打包产物在 artifacts/ 下,包含 .nupkg(主包)和 .snupkg(符号包)。

100%

滚轮或按钮缩放 · 放大后拖动画面 · 双击切换 100% / 200%