Skip to content
This repository was archived by the owner on Oct 10, 2026. It is now read-only.
dotnet9Public archive

About

收集、分享常用工具类

Resources

Contributing

Security policy

Stars

9 stars

Watchers

1 watching

Forks

Repository files navigation

Warning

⚠️ 本仓库已停止维护 / This repository is no longer maintained

本仓库已归档:不再接受 Issue 与 Pull Request,NuGet 旧包保留但不再升级。

This repository is archived: issues and pull requests are closed, and existing NuGet packages will not receive updates.

替代方案 / Replacement:

旧包 / Old packages 新包 / New packages
CodeWF.Tools(.Core/.Files/.Image/.UpdateChecking/.ApplicationData) CodeWF.Toolkit.Core / Files / Image(更新检查与数据目录并入 Core)

新仓库 / New repository: https://github.com/dotnet9/CodeWF.Toolkit

CodeWF.Tools

包名 NuGet 链接 下载量
CodeWF.Tools NuGet NuGet
CodeWF.Tools.Core NuGet NuGet
CodeWF.Tools.Files NuGet NuGet
CodeWF.Tools.Image NuGet NuGet

CodeWF.Tools,让 C# 编码变得更简单。

CodeWF.Tools 是一个面向 C# 开发者的开源工具库,提供字符串、日期时间、文件操作、JSON/YAML 转换、图片处理等常用能力,目标是简化日常开发任务并提升开发效率。

  • CodeWF.Tools.Core: .NET原生功能扩展,无第三方库依赖
  • CodeWF.Tools.Files:文件操作类集合
  • CodeWF.Tools.Image:图片处理集合
  • CodeWF.Tools:集成前面的包,功能最全

仓库规范

  • 当前版本:1.3.14.9,版本号统一维护在根目录 Directory.Build.props 的 <Version> 节点。
  • NuGet 包项目统一支持 net8.0;net10.0;net11.0;Demo、App、测试与内部应用项目统一使用 net11.0 / net11.0-windows。
  • 根目录 logo.svg、logo.png、logo.ico 是唯一图标源,子工程只通过 MSBuild Link 引用,不维护图标副本。
  • 运行时帮助、Markdown 示例、内置备忘录、设计说明等业务文档按功能保留;仓库级入口文档使用根目录 README.md 和 UpdateLog.md。

开发

本仓库使用 NuGet 中央包管理,包版本统一维护在 Directory.Packages.props。

CI/CD:自动发布 NuGet 包

推送 v* 标签(例如 v1.3.14.10)会触发 .github/workflows/publish-nuget.yml,一次发布四个包:CodeWF.Tools、CodeWF.Tools.Core、CodeWF.Tools.Files、CodeWF.Tools.Image(含 snupkg 符号包),完成后自动创建 GitHub Release。

包版本号以 Directory.Build.props 的 <Version> 为准,打标签前先升版本——nuget.org 拒绝重复的版本号;标签与 <Version> 不一致时工作流仅告警不阻断。认证使用 NuGet Trusted Publishing:工作流通过 nuget/login@v1 以 OIDC 令牌换取一次性发布凭据,仓库不保存任何 secret。nuget.org 侧的 API key 需绑定本仓库与工作流文件名 publish-nuget.yml(Scopes 勾选 Push,Glob 建议收窄为 CodeWF.*);这类 key 创建后 7 天内需成功发布一次才会转永久有效。

手工发布步骤:

# 1. 升版本:修改 Directory.Build.props 的 <Version>(或用 UpdateAssemblyVersion.ps1)并提交
# 2. 打标签并推送,触发发布
git tag -a v1.3.14.11 -m "CodeWF.Tools v1.3.14.11"
git push origin v1.3.14.11
# 3. 在 GitHub Actions 观察 publish-nuget 运行,完成后到 nuget.org 核对四个包的新版本

感谢

第三方开源组件审计

检查时间:2026-05-20。检查范围包括 NuGet 元数据、恢复后的 project.assets.json、NuGet.org 信息以及上游源码/许可证链接。优先接受 MIT / Apache-2.0 / BSD。

包 使用范围 协议 源码/项目地址 结论
CsvHelper CodeWF.Tools.Files CSV 辅助 MS-PL OR Apache-2.0 https://github.com/JoshClose/CsvHelper 通过,采用 Apache-2.0 选项
Magick.NET-Q16-AnyCPU CodeWF.Tools.Image 图片辅助 Apache-2.0 https://github.com/dlemstra/Magick.NET 通过,14.13.1
MiniExcel CodeWF.Tools.Files Excel 辅助 Apache-2.0 https://github.com/mini-software/MiniExcel 通过,1.44.1
SharpCompress CodeWF.Tools.Files 压缩包辅助 MIT https://github.com/adamhathcock/sharpcompress 通过,1.0.0
System.Configuration.ConfigurationManager / System.Text.Json 配置和 JSON 辅助 MIT https://github.com/dotnet/dotnet 通过,10.0.8
YamlDotNet CodeWF.Tools.Files YAML 辅助 MIT https://github.com/aaubry/YamlDotNet 通过
ZXing.Net.Bindings.Magick 二维码/条码辅助 Apache-2.0 https://github.com/micjahn/ZXing.Net 通过
Avalonia / Avalonia.Desktop / Avalonia.Fonts.Inter / Avalonia.Themes.Fluent Demo 使用 MIT https://github.com/AvaloniaUI/Avalonia 通过,12.0.3
Bogus 测试数据 MIT https://github.com/bchavez/Bogus 通过
CodeWF.LogViewer.Avalonia Demo 使用 MIT https://github.com/dotnet9/CodeWF.LogViewer 自研开源包
ReactiveUI.Avalonia Demo 使用 MIT https://github.com/reactiveui/reactiveui 通过
VC-LTL Windows Demo 运行时兼容 EPL-2.0 https://github.com/Chuyu-Team/VC-LTL5 源码开放,按“非优先但可追溯”规则通过
Microsoft.NET.Test.Sdk / coverlet.collector 测试 MIT https://github.com/microsoft/vstest / https://github.com/coverlet-coverage/coverlet 通过,Microsoft.NET.Test.Sdk 18.5.1、coverlet.collector 10.0.1
xunit.v3 / xunit.runner.visualstudio 测试 Apache-2.0 https://github.com/xunit/xunit 通过

传递依赖检查:

依赖分组 代表包 协议 源码/项目地址 结论
.NET 运行时/配置栈 System.Diagnostics.EventLog、System.IO.Pipelines、System.Text.Encodings.Web、System.Security.Cryptography.ProtectedData MIT https://github.com/dotnet/dotnet 源码开放
Magick.NET 核心 Magick.NET.Core Apache-2.0 https://github.com/dlemstra/Magick.NET 源码开放
ZXing 核心 ZXing.Net Apache-2.0 https://github.com/micjahn/ZXing.Net 源码开放
Avalonia 栈 Avalonia.*、Avalonia.BuildServices MIT https://github.com/AvaloniaUI/Avalonia 源码开放
ANGLE 原生包 Avalonia.Angle.Windows.Natives BSD 风格许可证文件 https://github.com/AvaloniaUI/angle 源码开放
Skia/HarfBuzz 绑定和原生资源 SkiaSharp*、HarfBuzzSharp* NuGet 包为 MIT;底层原生项目源码开放 https://github.com/mono/SkiaSharp 源码开放
Reactive 栈 ReactiveUI、DynamicData、Splat、System.Reactive MIT https://github.com/reactiveui/reactiveui / https://github.com/reactiveui/DynamicData / https://github.com/reactiveui/splat / https://github.com/dotnet/reactive 源码开放
Linux 桌面互操作 MicroCom.Runtime、Tmds.DBus.Protocol MIT https://github.com/kekekeks/MicroCom / https://github.com/tmds/Tmds.DBus 源码开放
自研日志依赖 CodeWF.Log.Core MIT https://github.com/dotnet9/CodeWF.LogViewer 自研源码开放包
测试工具链 Microsoft.*、Newtonsoft.Json、xunit.* MIT / Apache-2.0 https://github.com/microsoft/vstest / https://github.com/microsoft/testfx / https://github.com/JamesNK/Newtonsoft.Json / https://github.com/xunit/xunit 源码开放

当前未有意保留非开源或黑盒依赖。

包版本维护约定

XML 文件统一使用两个空格缩进。Directory.Packages.props 统一承载 NuGet 中央包管理开关和包版本变量,包括 AvaloniaVersion 等共享版本属性;Directory.Build.props 仅保留项目构建、编译选项和 NuGet 元数据。仓库如引用 VC-LTL、YY-Thunks,这两个兼容旧版操作系统的特殊包必须使用最新预览版。

About

收集、分享常用工具类

Resources

Contributing

Security policy

Stars

9 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages