基本上选用的都是 https://www.nuget.org 分类中最流行的那个库 

1. 日志工具库

NLOG 和 serilog

Stackify.com 简单入门文章  https://stackify.com/nlog-vs-log4net-vs-serilog/

NLog 支持结构化log输出, 下面是两种写法: 

# json format log
logger.Info("{@actionDetails}", new {person="harry", action="buy a book", book="Master C# in 21 days"});

#key=value format log 
logger.Info("{actionDetails}", new {person="harry", action="buy a book", book="Master C# in 21 days"});

 

2. REST 客户端

RestSharp

 

3. JSON 处理

Newtonsoft.Json

 

3.  App.config 文件自定义ConfigSection 的 auto 配置

https://github.com/edpollitt/Nerdle.AutoConfig

 

4. ORM 工具

Dapper   https://dapper-tutorial.net/

 

5. 嵌入数据库

System.Data.SQLite

 

6. 条码/二维码

QRCoder 和 ZXing.Net 

 

7. 串口通讯

https://www.nuget.org/packages/GodSharp.SerialPort/

 

7.1 Modbus 通讯组件

我用的是支持 .Net 6 的 NModbus 包

 

8. 报表

FastReport.OpenSource  https://www.nuget.org/packages/FastReport.OpenSource/

https://github.com/FastReports/FastReport/releases

 

9. 组件包(winform)

  澳洲 ComponentFactory 出品的 Krypton , 2006~2014年是商业组件包, 由于销售不佳, 现在已经转为开源,  可见开发工具厂商即使是在澳洲,  也不太好生存. 

  https://github.com/ComponentFactory/Krypton

 这个仓库有nuget 的下载链接,  https://github.com/Wagnerp/Krypton-NET-Version-Dashboard

nuget 下载 Wagnerp 发布的, 注意版本 naming rule ,比如 Wagnerp Krypton 版本 5.472 对应的是.Net 4.7.2

 

10. Docking 控制组件  (WinForm)

  Krypton 包也包含dock panel, 这个 dockpanelsuite 组件包, 这个是 WeifenLuo.WinFormsUI.Docking 后续版本

  https://github.com/dockpanelsuite/dockpanelsuite

  简单入门: 开源组件 DockPanelSuite使用

 

11. Grid 组件(WinForm)

 曾经用过 AdvancedDataGridView, 问题很多,  现在使用 objectListView 非常好用.

 

12. Winform 下工控组件包

nuget  HZH_Controls

有一些很实用的通用组件, 更有一些工控类控件, 而且开源, 

冰封一夏的作品, 文档 https://gitee.com/kwwwvagaa/net_winform_custom_control

 

12. winform 下的 AGauge

https://www.nuget.org/packages/AGauge_V2/2.0.2

https://github.com/Code-Artist/AGauge

 

16. visual studio 自带的 Chart 组件, 或者 件 oxyplot  组件

示例代码 https://blog.csdn.net/boxuming/article/details/89678159

 

17. Redis 客户端 StackExchange.Redis

    StackExchange.Redis 是 Stackoverflow 公司开源的, 质量有保证.

 

18.  轻量级的Web 框架 Nancy 和 Nancy.Hosting.Self

     引入 Nancy 不是开发 Web 应用,  是开发 RPC 服务器,  Nancy 是一个轻量级的Web 框架, Nacy.Hosting.Self 是一个轻量级的Web 服务器.

 

19. Winform 下的 RichTextBox 增强

    https://www.nuget.org/packages/RichTextBoxEx

 

20. Template engine 选 scriban, 语法和 Jinja2/Liquid 类似

    https://github.com/lunet-io/scriban

 

21. syntax highlight text editor

https://github.com/StefH/ICSharpCode.TextEditorEx

 

22.  diagram 

https://github.com/dalssoft/diagramnet

 

23. litedb, 嵌入型的mongodb

https://www.litedb.org/

 

24.  ObjectListView 免费的ListView, 支持treelist, 分组和Master-Detail 呈现

 

25.  ReoGrid , 免费的 spreedsheet 组件, 强大到令人发指, 甚至可以比拟 Excel

 

26. morelinq 和 ZZZ project 提供的 System.Linq.Dynamic

 

27.Masuit.Tools 工具类包 , 类似于Java 的 Hutool

 

28. String处理类库  NString  https://github.com/thomaslevesque/NString

 

29. ZZZ project 提供的 工具类包

    https://github.com/zzzprojects/Z.ExtensionMethods

 

30. autoMapper, Model类和DTO/ViewModel类转换工具

 

31.  最重要的参考项目,  git extensions  , 可以学到很多东西

 

32. NPOI 包, 用于 导出Excel  

  参考代码:  https://www.thecodebuzz.com/read-and-write-excel-file-in-net-core-using-npoi/

 

相关文章: