VS Code 快捷键 && 常用插件

常用插件


 
 分类插件名称说明

开发

C#   C#语言
C# Extensions C#扩展功能(添加类,接口,智能提示)
C# XML Documentation Comments 代码添加注释
C# Snippets C#代码补全
vscode-solution-explorer Visual Studio 解决方案文件目录结构
vscode-icons 文件,文件夹加上图标区分        

工具

Settings Sync  配置同步    
LeetCode LeetCode插件
REST Client Http 请求插件

 

常用快捷键


 
快捷键说明
Ctrl + Shift + P,F1 打开命令面板
Ctrl + ~   打开终端
Ctrl K + C 行注释
Ctrl K + U   取消行注释
Alt + Shift + A 切换块注释
F2
变量重命名
F5
开始调试
Ctrl + F5 停止调试
F9 添加断点
F10 调试 -> 下一步
F11 调试  -> 进入方法

 

终端命令


 
插件名称说明
dotnet new + optional(console/classlib/mvc/webapi)  新建项目(控制台/类库/mvc/webapi)
dotnet build 编译项目
dotnet run 运行项目
cd + name   打开文件夹,name=文件夹名称
ls + optional(-Directory -File) 列出文件/文件夹名称

 

第三方工具


 
 工具命令说明

dotnet-ef

dotnet tool install --global dotnet-ef

全局安装Entity Framework Core .NET Command-line Tools
dotnet ef migrations add <name>   添加新的迁移(上次迁移跟当前做对比,生成差异)
dotnet ef migrations remove 移除迁移
dotnet ef migrations script <from> <to> 生成脚本,From默认0,即初始化,To默认最后一次迁移
dotnet ef database update 更新迁移到数据库
dotnet ef dbcontext script 生成指定上下文数据库脚本

dotnet-grpc

 dotnet-grpc add-file [--services] <files> --services=Both|Client|Default|None|Server,files可使用通配符匹配
dotnet-grpc add-url <url> 添加url引用的protobuf文件
dotnet-grpc list 列出所有protobuf文件
dotnet-grpc refresh <references> references 更新Url或指定文件,也可使用通配符
dotnet-grpc remove <references> 移除protobuf文件
posted @ 2019-10-15 09:45  WilsonPan  阅读(443)  评论(0编辑  收藏  举报