Mais conteúdo relacionado Semelhante a Visual Studio 2017 新功能探索 (Study4.TW) (20) Visual Studio 2017 新功能探索 (Study4.TW)3. Visual Studio 2017 安裝特色
• 更輕量的安裝
– 更小更快的安裝過程
• 完全客製化安裝
– 完全依據您的需要選擇必要的開發元件
• 更低的系統衝擊
– 安裝過程只有極少量的系統檔案與系統機碼被建立
– 各版本之間 (2015, 2017 RC, 2017 RTM, …) 互不影響
3
4. Visual Studio 2017 版本
• Visual Studio Community 2017
– 支援版控、語法高亮、開發偵錯、超過 20 種程式語言
– 可開啟任意資料夾 (無須任何方案檔或專案檔)
• Visual Studio Professional 2017
– 支援 CodeLens (程式碼透視鏡)
• Visual Studio Enterprise 2017
– 支援完整的 DevOps 開發體驗
– 支援 Live Unit Testing
– 支援 Live Architecture Dependency Validation
4
8. 全新的「移至」功能 ( Go To)
• 快速搜尋
– Ctrl + ,
– Ctrl + T
• 跳至指定行號
– Ctrl + G
14. 解決方案總管 - 資料夾檢視
• 限定方案總管顯示範圍 (右圖)
• 在檔案總管中開啟資料夾
• 開啟開發人員命令提示字元
• 輕易切換不同模式 (下圖)
– 資料夾檢視
– 方案總管檢視
20. 全新 EditorConfig 編輯器設定
• EditorConfig 是在開源社群常見的編輯器設定檔
– 預設檔名:.editorconfig
– 檔案路徑:通常位於專案或方案根目錄下
• 使用方式
– 建立 .editorconfig 編輯器設定檔
– 將檔案加入版本控制系統並與團隊共用一致的編輯器設定
– 開發人員在寫 Code 的時候,編輯器會自動提示格式錯誤
• 設定檔範例
– https://github.com/dotnet/roslyn/blob/master/.editorconfig
21. 支援的 EditorConfig 屬性
• 目前 Visual Studio 2017 RC 支援的屬性如下
– root = true
• 宣告此 .editorconfig 是否為最上層設定檔
– indent_style = space
• 設定縮排的風格 ( space 或 tab )
– indent_size = 4
• 設定縮排的空白字元數 ( 僅 indent_style = space 時有用 )
– tab_width = 4
• 設定一個 tab 符號的寬度
– end_of_line = crlf
• 設定斷行符號 ( cr , lf , crlf )
– charset = utf-8
• 設定檔案的文字編碼 ( latin1, utf-8, utf-16be, utf-16le )
– .NET Code Style Settings For Editorconfig
22. 已知的問題 (Known Issues)
• EditorConfig 目前不支援 XML 檔案類型 (VS2017 RC)
• 目前 XAML 編輯器支援 .editorconfig 以下選項:
– indent_style
– indent_size
– tab_width
• 目前 .editorconfig 不支援的選項:
– insert_final_newline
– trim_trailing_whitespace
23. 相關連結
• EditorConfig
– EditorConfig
– EditorConfig Plugins
– EditorConfig (GitHub)
– EditorConfig (@EditorConfig) | Twitter
• 微軟文件
– Code Style Configuration in the VS2017 RC Update
– Create portable, custom editor settings | Microsoft Docs
• 相關文章
– Maintaining Consistent Coding Conventions With EditorConfig
- Trey Hunner
– Use EditorConfig to Maintain Consistent Coding Styles between Different
Editors and IDEs
30. 其他 C# / VB 編輯器功能增強
• 將檔案名稱更名為型別名稱 ( Ctrl+. )
• 將型別名稱更名為檔案名稱 ( Ctrl+. )
• 將 String.Format 轉換成 C# 6 的字串內插語法
• 在字串中間按下 Enter 斷行會自動拆成兩個字串
• 可把現有屬性 (Property) 自動轉成方法 (Method)
• 使用程式碼導覽功能現在支援模糊比對能力
• 程式碼自動引用參考現在也支援模糊比對能力
31. 其他 JavaScript 編輯器功能增強
• 預設已啟用 JavaScript Language Service 能力
– 支援 React 常用的 JSX 語法
– 支援大部分 ES2016 語法
• generators
• modules
• decorators
• …
39. 即時單元測試開發 (Live Unit Testing)
• 主要特性
– 即時呈現單元測試結果與程式碼測試覆蓋率
– 僅支援於 Visual Studio 2017 企業版
– 支援 C# / VB 專案類型
41. 內建支援三種單元測試框架
• 支援的單元測試框架與工具版本
– MSTest (Visual Studio Unit Testing Framework)
• MSTest.TestAdapter 1.1.4-preview
• MSTest.TestFramework 1.0.5-preview (or higher versions)
– xUnit
• xunit.runner.visualstudio version 2.2.0-beta3-build1187
• xunit 2.0 (or higher versions)
– NUnit
• NUnit3TestAdapter version 3.5.1
• NUnit version 3.5.0 (or higher versions)
42. 相關連結
• Live Unit Testing in Visual Studio 2017 RC
• Unit Test Your Code
• MSTest.exe command-line options
52. 相關連結
• Live Dependency Validation in Visual Studio 2017 |
Microsoft Application Lifecycle Management
• Live architecture dependency validation in Visual Studio
"15" Preview 5
• UML Designers have been removed; Layer Designer now
supports live architectural analysis
58. 相關連結
• Shorter Solution Load Time in Visual Studio "15"
• Faster Visual Studio "15" Startup | The Visual Studio Blog
59. 聯絡資訊
• The Will Will Web
記載著 Will 在網路世界的學習心得與技術分享
– http://blog.miniasp.com/
• Will 保哥的技術交流中心 (臉書粉絲專頁)
– http://www.facebook.com/will.fans
• Will 保哥的噗浪
– http://www.plurk.com/willh/invite
• Will 保哥的推特
– https://twitter.com/Will_Huang
Notas do Editor https://blogs.msdn.microsoft.com/visualstudio/2016/10/11/shorter-solution-load-time-in-visual-studio-15/