惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

D
Docker
博客园 - 三生石上(FineUI控件)
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
博客园_首页
Microsoft Azure Blog
Microsoft Azure Blog
GbyAI
GbyAI
腾讯CDC
酷 壳 – CoolShell
酷 壳 – CoolShell
M
MIT News - Artificial intelligence
Stack Overflow Blog
Stack Overflow Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Jina AI
Jina AI
爱范儿
爱范儿
博客园 - 【当耐特】
雷峰网
雷峰网
S
SegmentFault 最新的问题
美团技术团队
Blog — PlanetScale
Blog — PlanetScale
The GitHub Blog
The GitHub Blog
有赞技术团队
有赞技术团队
G
Google Developers Blog
大猫的无限游戏
大猫的无限游戏
Google DeepMind News
Google DeepMind News
J
Java Code Geeks

Nemo

20260819 - Nemo 再见,2025 Complete ORB-SLAM3 Setup Guide for Jetson Xavier NX with RealSense D455 20250723 再见,2024 Using CertBot for Automatic Secure EMQX Broker Create Your Own GPS Data Publisher Support SSL AGV Dispatching System Technical Documentation Finding Nemo No title 香港賽馬會呈獻系列:黑白——攝影敘事 再见,2023 团团是只猫 Design an FSM for Robot State Machines – Basics of Computer Science Data-driven robot lifespan: Collection 数据驱动的机器人寿命:收集、诊断、预测 Exploring the design space of binary search trees 特首来了 Large language models, explained with a minimum of math and jargon 设计有缓存异步逻辑的监控脚本并测试其资源占用 使用loguru记录串口数据并使用Docker搭建ARM开发环境 State or Status? A*算法两种时间复杂度 /A* Algorithm: Two Types of Time Complexity 使用KD-Tree快速收敛到最近坐标点/Fast convergence to the nearest coordinate point using KD-Tree 翻译 || 总结 - Go语言中的空结构体(The empty struct) 再见,2022 从PE工作报告中能读出什么 Give me miles, give me truth AMR调度系统性能优化/AMR Dispatch System Performance Optimization
在vscode的Dev Container中构建.NET开发环境及使用doxygen和g...
Nemo · 2023-05-24 · via Nemo

背景

这篇是入职新公司的第一篇博客,为了熟悉公司现有技术方便进行后续的开发,接触的第一份代码就是机器人的控制器,技术栈是.net C#,我突然明白公司官网上那句並聯同Microsoft 合作夥伴協助建立技術發展平台的含义是什么了。

最早听说.net framework还是很久之前看到《编程的奥秘》中提到过,并没有深入的探索,这次就得好好学习下了。

环境搭建

项目文档中建议使用MS Visual Studio 2022以及.NET SDK 6.0,由于一直不太适应VS系列的界面和为了使用Github Copilot,决定使用VSCode+Docker搭建开发环境。

添加Dev Container的配置文件

选择C#和.NET SDK 6.0就可以了

设置Nuget源

容器启动后配置Nuget源,从仓库下载相应的包后,运行dotnet nuget add source {path} -n "XX"修改下源的顺序,运行:dotnet build XXX.sln看能否正常编译。

Copilot

因为在香港,可以很流畅的使用Github,但在深圳的时候,使用了clash科学上网,这样使用Copilot Lab时会报proxy错误,详见

解决这个问题也很简单,只要在settting.json中设置:

    "remote.extensionKind": {
        "GitHub.copilot-labs": ["ui"],
    }

就可以了~

不得不说,Copilot在阅读代码时的帮助很大,快速解释代码、生成注释,测试….. 基本不用再去频繁的请教同事了~

绘制函数调用图

这样可以很快速的了解项目结构和调用关系,通用的方式是使用doxygen和graphviz绘制函数调用图,下面是步骤:

安装

$ sudo apt-get install doxygen
$ sudo apt-get install graphviz

生成Doxygen配置文件

$ doxygen -g XXX.doxygen

然就就可以修改生成配置了,官网有详细的说明,这里不多赘述,常用的几个配置如下:

# document all entities in the project.
EXTRACT_ALL            = YES

# document all static members of a file.
EXTRACT_STATIC         = YES

# specify the root directory that contains the project's source files.
INPUT                  = /home/XXX/source

# search sub-directories for all source files.
RECURSIVE              = YES

# include the body of functions and classes in the documentation.
INLINE_SOURCES         = YES

# generate visualization graph by using dot program (part of graphviz package).
HAVE_DOT               = YES

DOT_PATH      = $(YOUR_DOT_PATH)

最后直接运行:

$ doxygen XXX.doxygen

就好了,可以很清晰的看到对象之间的关系。