SlideShare a Scribd company logo
Visual Studio
開發密技大補帖
By Alan Tsai
@Alan Tsai 的學習筆記
簡單自 我介紹
• Alan Tsai • 後端工程師
• .NET 技術爲主
• 喜歡學習不同東西
• Azure
• Data Science、Chatbot
• DevOps、Container
• 架構、加强開發的 Tools
• 翻譯文章/軟體
• 看小說
@Alan Tsai 的學習筆記
教就是最好的 學 習 方式 - 喜歡考證驗 證 所 學
@Alan Tsai 的學習筆記
喜歡技術分 享
▰ 2020 .NET Conf
▰ 不會 Javascript 沒關係,用 Blazor 來解決前端需求
成為 Full Stack .NET 開發者吧
▰ 2020 Global Azure
▻ Azure API Management
協助邁向Open API及Micro Service架構的好用服務
▰ 2020 Microsoft Online Tech Forum
▻ Keep Azure cost down
▰ 2019 Microsoft Insider DevTour Taipei
▻ Future proof your desktop apps with .NET core
@Alan Tsai 的學習筆記
喜歡技術分 享
▰ Trainocate
▻ AZ-104、AZ-204、AZ-400、DP-200、DP-201、PL-900、DA-100
▰ 台灣智慧自動化與機器人協會
▻ 運用Python進行大數據分析
▻ 機器學習基礎理論課程及人工智慧 – ML.NET
▰ 中華電信學院
▻ 使用Azure AI打造有人工智能的Line聊天機器人
▻ DevOps與CI/CD實務研習班
▰ 聖森内部教育訓練
▻ Azure DevOps CI/CD 應用
@Alan Tsai 的學習筆記
歡迎訂閲、 按 贊 + 分享
contact@alantsai.net
• Alan Tsai 的學習筆記
• https://blog.alantsai.net
• FB粉絲頁
• http://fb.alantsai.net
• Youtube
• http://yt.alantsai.net
@Alan Tsai 的學習筆記
Age nd a
7
▰ 介紹篇
▰ 設定篇
▰ 移動篇
▰ 開發篇
▰ 協作篇
介紹篇
8
@Alan Tsai 的學習筆記
到 底應該安裝那 個 Edition ?
9
▰ Community 和 Professional 是一樣的
▻Community 商用情況下不能夠企業使用 + 5人以下
Enterprise organizations are defined as
>250 PCs or > $1 Million US Dollars in
annual revenue.
Compare Visual Studio 2019 Editions
@Alan Tsai 的學習筆記
不同的 Channel
10
▰ 兩個 Channel
▻Stable
▻Preview
▰ 不同版本可以並存
▰ Preview 進入 stable 可以自動更新
▰ 可以使用 Visual Studio Installer 維護
Download Visual Studio
設定篇
字形
11
@Alan Tsai 的學習筆記
先進行備份
12
▰ Import and Export Setting
▰ 先進行備份以防改壞
▰ 可以 reset 到預設環境
▻建議選擇 Visual C#
@Alan Tsai 的學習筆記
設定畫面
13
▰ Tools -> Options
▰ 設定很多,有時候不好找
▰ 善用 Visual Studio Search
▻Ctrl + q
@Alan Tsai 的學習筆記
字體
14
▰ 請選擇等寬字體(Monospace Font )
▰ l(小寫 L)、I(大寫 i) 以及 1(數字) 容易分辨
▻l、I、1
▰ 0(數字)、o(英文字母)以及 O (英文字母大寫) 容易分辨
▻0、o、O
▰ 不知道選什麼可以從 Consolas 開始
@Alan Tsai 的學習筆記
字體大小
15
@Alan Tsai 的學習筆記
IntelliSe n s e 字體大小
16
@Alan Tsai 的學習筆記
目前選取到 的 顏 色
17
設定篇
快捷鍵
18
@Alan Tsai 的學習筆記
設定快 捷鍵
19
▰ 注意修改有
▻Scope
▻要選Assign才會設定進去
@Alan Tsai 的學習筆記
建議修改的快 捷鍵
20
▰ View.QuickActions
@Alan Tsai 的學習筆記
建議修改的快 捷鍵
21
▰ Edit.GoToImplementation
▰ 找到interface的實作
@Alan Tsai 的學習筆記
建議修改的快 捷鍵
22
▰ Edit.CompleteWord
▰ 觸發IntelliSens
@Alan Tsai 的學習筆記
建議修改的快 捷鍵
23
▰ Edit.GoToAll
▰ 觸發Go To功能
移動篇
24
@Alan Tsai 的學習筆記
Go T o 過濾 資料
25
1.Go To Line (Ctrl+G) 字符:: -
點下這個選項之後,可以輸入要跳過去的行數
2.Go To File (Ctrl+1, Ctrl+F) 字符: f -
這個選項是搜索檔名
3.Go To Types (Ctrl+1, Ctrl+T) 字符: t -
這個選項是搜索class、Struct、Enums、Interface和Delegate
4.Go To Member (Ctrl+1, Ctrl+M) 字符: m -
這個選項是搜索v ariabl e 、p rop ert y、met hod、 c onst ant 、enum item 和event
5.Go To Symbol (Ctrl+1, Ctrl+S) 字符: # -
這個選項是搜索 Types + Member
@Alan Tsai 的學習筆記
Visual Studio Search
26
▰ 類似於 Go To All 的效果
▰ 不過因為混雜其他部分,不建議
@Alan Tsai 的學習筆記
其他幾種 Go T o
27
▰ Go To Definition
▻F12
▰ Go To Implementation
▻Ctrl + F12
▰ Go To Base
▻Alt + Home
▰ Find All Reference
▻Shift + F12
@Alan Tsai 的學習筆記
Code Lense
28
@Alan Tsai 的學習筆記
往前和往後
29
▰ Navigate Backward
▻Ctrl + -
▰ Navigate Forward
▻Ctrl + Shift + -
開發篇
日常
30
@Alan Tsai 的學習筆記
常用快 捷鍵
31
▰ Format Document
▻Ctrl + E, D
▰ Format Selection
▻Ctrl + E, F
▰ Comment Selection
▻Ctrl + E, C
▰ Umcomment Selection
▻Ctrl + E, U
@Alan Tsai 的學習筆記
只有 Format 還不夠
32
https://www.codemaid.net/documentation/
@Alan Tsai 的學習筆記
CLI執行
33
▰ Dotnet-format
▰ https://github.com/dotnet/format
dotnet tool install -g dotnet-format
dotnet format
@Alan Tsai 的學習筆記
使用 Quick Act io n
34
▰ 建立參數加入 null 檢查
▰ 長參數自動 format
▰ 建立出 interface
▰ 自動加入 using
▰ Linq 語法優化
Refactor code
@Alan Tsai 的學習筆記
IntelliCod e
35
▰ 不是只是單純的排序
▻可以允許依照自己的程式碼訓練模型
@Alan Tsai 的學習筆記
Snippet
36
▰ 快速建立常見程式碼
▻prop –建立 property
▻ctor – 建立 建構子
▻for
▻if
C# code snippets
開發篇
Debug
37
@Alan Tsai 的學習筆記
Debug – Edit and Continue
38
How to: Enable and disable Edit and Continue (C#, VB, C++)
@Alan Tsai 的學習筆記
Debug – 搜索變數
39
Enhanced in Visual Studio
2019: Search for Objects
and Properties in the
Watch, Autos, and Locals
Windows
@Alan Tsai 的學習筆記
D e b u g – C a l l S t a c k C o d e M a p ( E n t e r p r i s e )
40
Map methods on the call stack while debugging in
Visual Studio
@Alan Tsai 的學習筆記
Remote Debug 和 Snapshot Debug
41
Remote Debugging
Debug snapshots on exceptions in .NET apps
@Alan Tsai 的學習筆記
Re Att a ch
42
▰ https://marketplace.visualstudio.com/ite
ms?itemName=ErlandR.ReAttach
開發篇
Code Style
43
@Alan Tsai 的學習筆記
Code Style / Ana l yz er 來源
44
▰ Visual Studio 內建
▻能夠透過 VS GUI 設定規則
▻只有安裝的那台才有
▻可以透過產生 editorconfi g 讓所有人設定 一 樣
▰ 安裝套件
▻透過 VS Extension 安裝
▻專門規則設定畫面,但是要安裝才有效果
▰ 安裝 Nuget 套件
▻跟著程式碼
▻抓 source code 就包含
▻能夠用 ruleset 來設定
規則
▻建議的方式
Overview of source code analysis
@Alan Tsai 的學習筆記
Visual Studio 內建
45
@Alan Tsai 的學習筆記
安裝套件
46
▰ Roslynator 2019
@Alan Tsai 的學習筆記
安裝 Nuget 套件
47
@Alan Tsai 的學習筆記
設定規則
48
▰ 有 3 種不同方式可以設定那些規則要啟用
▻Suppression file
▻Rule Set file
▻editorconfig file
▰ 不同的分析器會吃不同的設定
▻慢慢全部轉移到 editorconfig
@Alan Tsai 的學習筆記
設定規則方式
49
Visual Studio 官方套件 第三方套件
Suppression File
Rule Set File
Editorconfig File
協作篇
50
@Alan Tsai 的學習筆記
Visual Studio 做 Pull Request
51
Create, view, and manage pull requests
@Alan Tsai 的學習筆記
Visual Studio liv e share
52
▰ 可以讓其他人一起看同一份程式碼
▻Pair programming
▻Code Review
▰ 可以共享 Terminal
▰ 可以共享 Server
What is Visual Studio Live Share?
結語
53
@Alan Tsai 的學習筆記
Visual Studio 功能很多
54
▰ 看了把功能依照不同使用情境進行了分類
▻介紹篇
▻設定篇
▻移動篇
▻開發篇
▻協作篇
▰ 更新功能持續關注官方
@Alan Tsai 的學習筆記
其他參考資料
55
▰ Download Release note
▻每次更新增加了什麼
▰ ProductivityFeatures
▻用程式碼的方式發佈更新了什麼
▰ Build 2021 介紹新功能
▻Increase your .NET Productivity with Visual Studio | OD527
@Alan Tsai 的學習筆記
歡迎訂閲、 按 贊 + 分享
contact@alantsai.net
• Alan Tsai 的學習筆記
• https://blog.alantsai.net
• FB粉絲頁
• http://fb.alantsai.net
• Youtube
• http://yt.alantsai.net
CREDITS
Special thanks to all the people who made
and released these awesome resources for
free:
▰ Presentation template by SlidesCarnival
▰ Photographs by Startup Stock Photos
57

More Related Content

PDF
別傻了 你就是不寫測試才會沒時間!CL ft. Hamastar.pdf
PDF
twMVC#43 Visual Studio 2022 新功能拆解
PPTX
Visual Studio 2017 新功能探索 (Study4.TW)
PDF
Android向けUnity製ゲーム最適化のためのCI/CDと連携した自動プロファイリングシステム
PDF
がんばらなくても C# で Single Page Web アプリケーションが書けてしまう「Blazor」とは
PDF
【BS4】時は来たれり。今こそ .NET 6 へ移行する時。
PDF
トリコの動かし方
PDF
UE4 LODs for Optimization -Beginner-
別傻了 你就是不寫測試才會沒時間!CL ft. Hamastar.pdf
twMVC#43 Visual Studio 2022 新功能拆解
Visual Studio 2017 新功能探索 (Study4.TW)
Android向けUnity製ゲーム最適化のためのCI/CDと連携した自動プロファイリングシステム
がんばらなくても C# で Single Page Web アプリケーションが書けてしまう「Blazor」とは
【BS4】時は来たれり。今こそ .NET 6 へ移行する時。
トリコの動かし方
UE4 LODs for Optimization -Beginner-

What's hot (20)

PDF
UE4のローカライズ機能紹介 (UE4 Localization Deep Dive)
PDF
5分で分かるアジャイルムーブメントの歴史 拡大版
PDF
「龍が如く7 光と闇の行方」の自動テスト活用事例とテスト自動化チーム(仮)による若手育成の取り組みについて
PDF
Epic Online Services でできること
PPTX
NuGetの社内利用のススメ
PDF
CEDEC2016: Unreal Engine 4 のレンダリングフロー総おさらい
PDF
「ウチの事業部の商品をWebサイト・アプリで目立たせて!」私だけじゃなかった! 社内政治と落としどころの見つけ方
PDF
【Unity道場】VectorGraphicsで作る エモい表現
PDF
AngularとSpring Bootで作るSPA + RESTful Web Serviceアプリケーション
PPTX
「関心の分離」と「疎結合」 ソフトウェアアーキテクチャのひとかけら
PPTX
DevOps勉強会
PDF
Modeling in the Agile Age and casual astah models
PDF
Java開発の強力な相棒として今すぐ使えるGroovy
PDF
サイボウズの CI/CD 事情 〜Jenkins おじさんは CircleCI おじさんにしんかした!〜
PPTX
このPHP QAツールがすごい!2019
PDF
サービスブループリントによるシステム設計手法の紹介 - XP祭り2022
PDF
【BS13】チーム開発がこんなにも快適に!コーディングもデバッグも GitHub 上で。 GitHub Codespaces で叶えられるシームレスな開発
PDF
【Unity道場】AssetGraph入門 〜ノードを駆使しててUnityの面倒な手作業を自動化する方法〜
PPTX
アジャイルメトリクス実践ガイド
PDF
「龍が如くスタジオ」のQAエンジニアリング技術を結集した全自動バグ取りシステム
UE4のローカライズ機能紹介 (UE4 Localization Deep Dive)
5分で分かるアジャイルムーブメントの歴史 拡大版
「龍が如く7 光と闇の行方」の自動テスト活用事例とテスト自動化チーム(仮)による若手育成の取り組みについて
Epic Online Services でできること
NuGetの社内利用のススメ
CEDEC2016: Unreal Engine 4 のレンダリングフロー総おさらい
「ウチの事業部の商品をWebサイト・アプリで目立たせて!」私だけじゃなかった! 社内政治と落としどころの見つけ方
【Unity道場】VectorGraphicsで作る エモい表現
AngularとSpring Bootで作るSPA + RESTful Web Serviceアプリケーション
「関心の分離」と「疎結合」 ソフトウェアアーキテクチャのひとかけら
DevOps勉強会
Modeling in the Agile Age and casual astah models
Java開発の強力な相棒として今すぐ使えるGroovy
サイボウズの CI/CD 事情 〜Jenkins おじさんは CircleCI おじさんにしんかした!〜
このPHP QAツールがすごい!2019
サービスブループリントによるシステム設計手法の紹介 - XP祭り2022
【BS13】チーム開発がこんなにも快適に!コーディングもデバッグも GitHub 上で。 GitHub Codespaces で叶えられるシームレスな開発
【Unity道場】AssetGraph入門 〜ノードを駆使しててUnityの面倒な手作業を自動化する方法〜
アジャイルメトリクス実践ガイド
「龍が如くスタジオ」のQAエンジニアリング技術を結集した全自動バグ取りシステム
Ad

Similar to Visual Studio 開發密技大補帖 | Study4.TW 2021 小聚#2 (12)

PDF
twMVC#11 | Visual Studio 2013 全新功能介紹
PDF
Vs2013新功能介紹 twMVC#11
PPT
教學投影片01_Vb2005
PPTX
Visual studio 2010 塑模化應用程式講座v4
PDF
twMVC#28 | visual studio 2017 新功能介紹
PDF
twMVC#21 | 你所不知道的 Visual Studio
PPTX
Visual studio 2012 與 asp.net 4.5 (新功能與開發介紹) 第一天
PDF
.NET 7 升級教戰手冊_V1.0.pdf
PDF
Windows 8 apps dev.整理及分享
PDF
玩轉 .NET Interactive Notebooks 一次就上手
PPTX
Dev307
PPTX
ASP.NET MVC 6 新功能探索
twMVC#11 | Visual Studio 2013 全新功能介紹
Vs2013新功能介紹 twMVC#11
教學投影片01_Vb2005
Visual studio 2010 塑模化應用程式講座v4
twMVC#28 | visual studio 2017 新功能介紹
twMVC#21 | 你所不知道的 Visual Studio
Visual studio 2012 與 asp.net 4.5 (新功能與開發介紹) 第一天
.NET 7 升級教戰手冊_V1.0.pdf
Windows 8 apps dev.整理及分享
玩轉 .NET Interactive Notebooks 一次就上手
Dev307
ASP.NET MVC 6 新功能探索
Ad

More from Alan Tsai (20)

PDF
初探 Prompt Flow 開發生成式 AI 應用的利器 | R-Ladies Taipei
PDF
從 GitHub Copilot 到 Enterprise Copilot:打造符合企業需求的智能開發助手之路 | .NET Conf 2023 Taiwan
PDF
探索 API 開發的挑戰與解決之道 | .NET Conf 2023 Taiwan
PDF
初探 Data API Builder:在幾分鐘內將資料庫轉換成 REST 和 GraphQL 不再是夢想
PDF
Microsoft Learn AI 挑戰賽-實戰三 MLOps | Alan Tsai
PPTX
2021 Net Conf Taiwan-初探 Azure Communication Service 讓 App 也有視訊、通話、即時聊天、簡訊和電話功能
PPTX
我和阿九(Azure)有約 17 Azure Sql Database 基本介紹
PPTX
不會 Javascript 沒關係,用 Blazor 來解決前端需求 - 成為 Full Stack .NET 開發者吧 - .NET Conf 2020...
PDF
架構這件事 - Azure 可以幫助什麼 - 如何選擇使用什麼 Azure 服務
PPTX
我和阿九Azure有約 39 Azure Blob Storage 如何省錢? 設定 Access Tier 以及透過 Lifecycle Managem...
PPTX
我和阿九Azure有約 38 Azure Blob Storage 如何省錢? 搞懂Access Tier (Alan Tsai 的學習筆記)
PPTX
我和阿九Azure有約 37 Azure Blob Storage 如何檔案異動自動記錄建立檔案版本?Version Preview (Alan Tsai...
PPTX
我和阿九Azure有約 36 Azure Blob Storage 如何開啟snapshot保留目前狀態 (Alan Tsai的學習筆記)
PPTX
我和阿九Azure有約 35 Azure Blob Storage 如何開啟 Soft Delete?避免誤刪檔案 (Alan Tsai的學習筆記)
PPTX
我和阿九Azure有約 34 Azure File Storage 什麼時候適合用Azure File? File vs Disk Storage (Al...
PPTX
我和阿九Azure有約 33 Azure File Storage 什麼時候適合用Azure File? File vs Blob (Alan Tsai的...
PPTX
我和阿九Azure有約 32 Azure File Storage 介紹 (Alan Tsai的學習筆記)
PPTX
Azure Taiwan - Keep azure cost down (Azure 成本管控)
PPTX
我和阿九(Azure)有約 31 Azure Blob Storage 使用azcopy進行自動化作業 (Alan Tsai 的學習筆記)
PPTX
20200425 GlobalAzure-Azure API Management-協助邁向Open API及Micro Service架構的好用服務
初探 Prompt Flow 開發生成式 AI 應用的利器 | R-Ladies Taipei
從 GitHub Copilot 到 Enterprise Copilot:打造符合企業需求的智能開發助手之路 | .NET Conf 2023 Taiwan
探索 API 開發的挑戰與解決之道 | .NET Conf 2023 Taiwan
初探 Data API Builder:在幾分鐘內將資料庫轉換成 REST 和 GraphQL 不再是夢想
Microsoft Learn AI 挑戰賽-實戰三 MLOps | Alan Tsai
2021 Net Conf Taiwan-初探 Azure Communication Service 讓 App 也有視訊、通話、即時聊天、簡訊和電話功能
我和阿九(Azure)有約 17 Azure Sql Database 基本介紹
不會 Javascript 沒關係,用 Blazor 來解決前端需求 - 成為 Full Stack .NET 開發者吧 - .NET Conf 2020...
架構這件事 - Azure 可以幫助什麼 - 如何選擇使用什麼 Azure 服務
我和阿九Azure有約 39 Azure Blob Storage 如何省錢? 設定 Access Tier 以及透過 Lifecycle Managem...
我和阿九Azure有約 38 Azure Blob Storage 如何省錢? 搞懂Access Tier (Alan Tsai 的學習筆記)
我和阿九Azure有約 37 Azure Blob Storage 如何檔案異動自動記錄建立檔案版本?Version Preview (Alan Tsai...
我和阿九Azure有約 36 Azure Blob Storage 如何開啟snapshot保留目前狀態 (Alan Tsai的學習筆記)
我和阿九Azure有約 35 Azure Blob Storage 如何開啟 Soft Delete?避免誤刪檔案 (Alan Tsai的學習筆記)
我和阿九Azure有約 34 Azure File Storage 什麼時候適合用Azure File? File vs Disk Storage (Al...
我和阿九Azure有約 33 Azure File Storage 什麼時候適合用Azure File? File vs Blob (Alan Tsai的...
我和阿九Azure有約 32 Azure File Storage 介紹 (Alan Tsai的學習筆記)
Azure Taiwan - Keep azure cost down (Azure 成本管控)
我和阿九(Azure)有約 31 Azure Blob Storage 使用azcopy進行自動化作業 (Alan Tsai 的學習筆記)
20200425 GlobalAzure-Azure API Management-協助邁向Open API及Micro Service架構的好用服務

Visual Studio 開發密技大補帖 | Study4.TW 2021 小聚#2