[懶人包] 一次搞懂 Visual Studio 2013 Update 2 新功能 - 包含 VS 2013 及 TFS 2013

 

註: 內文提及Visual Studio Ultimate已於 2015/3月改名為 Visual Studio Enterprise

各位朋友們,

今天 (2014/4/3) 發佈了 Visual Studio 2013 "Update 2 RC 版" 及 Team Foundation Server 2013 "Update 2 RTM 正式版" ,你安裝了嗎? 來看看 Update 2 新增了哪些好東西!

 

Visual Studio 2013 Update 2 (2014/4 月發佈)

----------------------------------------------------------------------------------------------------------------

這次發佈的 Visual Studio 2013 Update 2 Release Candidate 雖然是發行候選版,尚非 RTM 正式版,但它提供了「可上線」使用的方式 (go-live license) 給早期使用者,這表示後續升級到 VS 2013 Update 2 RTM 正式版本,仍能持續得到正式支援,

做為軟體生命週期 (Application Lifecycle Management, ALM) 的核心平台 - Team Foundation Server 2013 Update 2 RTM 正式版已同步發佈,除了修正問題外,也持續提供新功能讓 TFS 的使用者持續增進價值!

Release Management 發行管理也提供了 Update 2 RC,如下,

Visual Studio 2013 Update 2 RC 發行候選版

------------------------------------------------------------------------------------------------------- 

Web 開發、ASP.NET 及 Azure 雲平台支援更強化

Update 2 改進了許多在 Web 開發上,包括了 ASP.NET 的一系列功能 (improvements in ASP.NET tooling),以及 ASP.NET MVC、Web API、Web Pages等改進 (latest platform releases),還有在 Microsoft Azure 上開發的改進。

重點如下,

  • 程式碼編輯器改進,並新增2個新編輯器 (for SASS & JSON files):
    • 新的 SASS 編輯器 - 許多功能讓開發者更便利 (colorization, variable and Mixins IntelliSense, syntax validation, goto definition, color picker ....)
    • 新的 JSON 編輯器 - 許多功能讓開發者更便利 (syntax validation, colorization, outlining, and support for IntelliSense (through JSON schema) ....)
    • 改進了 LESS 編輯器,例如 Knockout IntelliSense 升級了!New URL Picker in HTML, Razor, CSS, LESS or SASS pages ...
  • Browser Link 瀏覽器連結,這個是好東西,可以讓你一次開啟不同的瀏覽器測試你的 Web 專案,而且修改程式碼馬上在不同瀏覽器看到變化方便跨瀏覽器除錯 - 現在支援 HTTPS 連線,Single Page Applications (SPA) 專案及靜態的 html 檔
  • 更新後的 ASP.NET 內建專案範本,包括最新版本的 ASP.NET MVC, Web API, Web Pages, SignalR ....
  • 針對 Microsoft Azure 開發者:
    • 在 Visual Studio 中,新增專案選項,可以選擇是否直接建立一個 Azure 網站 (websites) 或是 虛擬機器 (Virtual Machine),方便開發者發佈到 Azure 時更方便。
    • 伺服器總管 (Server Explorer) 中,針對 Azure 網站 : 可遠端直接檢視或是編輯上線中的 website 檔案,也能遠端觀看 log 檔。
    • 新的工具,用來支援 Mobile Services 以 .NET開發,包括新的範本、專案類別、以及遠端除錯 (Remote Debugging)

TypeScript 1.0 (RTM 正式版)

TypeScript 是個 open source 語言及專案,由微軟開發,用來開發大型應用的 JavaScript 專案 (TypeScript is an open-source language developed by Microsoft for application-scale JavaScript projects),它是 JavaScript 的 superset,也就是說它編譯出來的就是純正且標準的 JavaScript。TypeScript 加上 Visual Studio,提供你一流的 JavaScript 開發經驗,例如 static checking, symbol-based navigation, code refactoring 等 ... 

TypeScript 1.0 (RTM) in Visual Studio 

Update 2 後,TypeScript 1.0 版也正式發表 (RTM),經過了 18個月來自 JavaScript 開發者社群的許多令人興奮的事!

Windows Phone 8.1 開發 及 通用 Windows Apps (Universal Windows Apps)

Update 2 後,就可針對 Windows Phone 8.1 進行 app 開發,更好的是,接下來會將不同平同統一,包括手機、平板及PC、共用相同的 Windows runtime,對開發者而言,就可以在 Visual Studio 中一次開發 Windows Phone 及 Windows app了! 如下圖,

 

Universal Windows apps for a common Windows runtime  

針對開發 Windows Phone 8.1,Update 2 有哪些改進,

  • 可升級 Windows Phone 8.0 apps 到 Windows Phone 8.1,以享受新平台的好處及功能。
  • 可以透過通用專案 (Universal Projects) 建立通用 Windows apps (universal Windows apps),針對 Windows Phone 8.1 及 Windows Store 8.1 平台,他們可以共用程式碼、一些 UI 元素、並且建立在一致的 Windows Runtime 中建立共用平台。
  • 可以使用 C# & .NET, HTML & JavaScript or C++ & DirectX 開發通用 Windows apps (universal Windows apps)

更多資訊請參考 -  Windows Development Center

除錯及程式碼效能剖析 (Debugging, Diagnostic, and Profiling)

在 Visual Studio 2013 Update 2 中,有新工具也有既有功能的改善: 除錯工具改進、.NET Managed Memory Analyzer (.NET 記憶體分析工具,用來檢查是否有導致 memory leak 的程式碼)、IntelliTrace 及 Performance 和 Diagnostics hub ....

主要更新如下,

  • 除錯器 Debugger
    • Visual Studio 除錯器現在支援將 JSON 字串視覺化 (string visualizer for JSON encoded strings),可用樹狀元件方式展開 JSON 方便開發者除錯、尋找或是複製 key/value
    • .NET Managed Memory Analyzer 記憶體分析工具,現在可以從抓出來的 memory dump 中,查找物件及 instance 的值 (inspect values of objects and instances)
    • 支援直接在 Windows Phone 8.1 emulator 模擬器中偵錯 websites
  • 效能及分析工具 Performance Tools & Analyzers
    • A new CPU Usage tool is now available in the Performance and Diagnostics hub that can be used with WPF, Console, Windows Store 8.1, or Windows Phone 8.1 apps. This tool provides data on what functions are using the CPU and to what degree. This empowers the developer to make decisions about where to focus their effort optimizing their app code to achieve the best possible performance
    • A new Memory Usage tool is now available in the Performance and Diagnostics hub for analyzing new universal Windows apps or any app built using the Windows runtime using C#/VB/C++ and XAML
    • It is now possible to run more than one tool at a time in the Performance and Diagnostics hub while maintaining a common timeline so that you can save time, correlate data across tools to get better insight into performance issues, and inform performance tradeoffs
  • IntelliTrace 智慧除錯 (VS Ultimate 版功能)
  • Windows Store Apps
    • Trigger a Prefetch when debugging Windows 8.1 store apps; enabling developers to manually trigger the Prefetch caching to test their program’s behavior or to validate that ContentPrefetcher is properly registered
    • Use Windows Azure Notification Hubs to send test notification messages to Windows Store or Phone apps and check the results in real-time

Team Foundation Server 2013 Update 2 RTM 正式版

--------------------------------------------------------------------------------------------------------------

Team Foundation Server 2013 Update 2 已是 RTM 正式版,建議 TFS 2013 的使用者安裝,主要是針對 TFS 安裝在本地端 (on-premises) 的用戶的改進, Update 2 裏的新功能,許多在 Visual Studio Online 中已實現了 (Visual Studio Online 約每3週改版一次!),以下是新功能,

CodeLens: 多了 "新進的改變" (Incoming Changes) 指標

CodeLens 這個功能很棒,它讓 Visual Studio 開發者在編輯器中 (需為 Visual Studio Ultimate 2013 版本),有一個類似開車用的"抬頭顯示器",你不用離開 Visual Studio 或是切換許多視窗,就可以提供許多程式碼相關的資訊,包括這個 method 參考了哪些、這個method是由誰修改、每次的修改 Changeset 的備註/時間都一目了然,在 Update 2 中,它又多了 “  "新進的改變" (Incoming Changes)  指標”, Incoming Changes Indicator 讓開發者馬上知道,有哪些新進來的修改,是由其它分支 (branch) 由某位開發人員正在修改中,這讓團隊開發時,有多個分支同時進行 (multiple branches),開發人員隨時知道另一個分支改了哪些地方。

可看下方 "Incoming Change" - 新進的改變,游標移過去,就顯示 "分支 (Branch)"、Changeset (變更集)、Author (作者)、Date 等資訊"

Incoming Changes indicator in CodeLens 

工作項目標籤 (Work Item Tags) - 可直接在 Visual Studio & Excel 編輯,也可用於查詢

Work Item Tagging (工作項目標籤)  可由 TFS 的使用者自行定義,用來分類 Work Item 工作項目,讓開發團隊可以很快地查詢、篩選工作項目,而不用再自訂查詢。

原本定義工作標籤只能在 Team Foundation Server 的 Web 介面中建立及編輯,Update 2後,你可以在 Visual Studio 中直接編輯,也可以用來快速查詢工作項目,例如你有定義一個叫 "App 模組"的標籤,與 App 模組相關的工作項目、包括需求單、Bug 單等都可貼上這個標籤,接下來團隊成員,包括 PM、SA/SD、Programmer、QA人員,只要有權限,都可以在 TFS 的 Web 介面及 Visual Studio 介面中查詢到與 ""App 模組" 標籤相關的工作項目。

如下圖,在 Visual Studio 中,可設定查詢的條件,

Querying work items using tags 

另外,許多團隊會使用 Excel 來管理 TFS 的工作項目,同樣地在 Excel 中可以有 Tags 標籤這個欄位。使用 Excel 管理可以一次編輯多個工作項目 (such as bulk editing of items), 如下圖,

Querying work items using tags in Excel 

工作項目圖表 (Work Item Charting) - 可在 TFS 首頁釘選你關心的圖表,以及許多客製化功能

工作項目圖表 (work item charting) ,在 TFS 中可以用圖表的方式查詢、檢視任何的工作項目,以視覺化的方式快速了解專案狀況、各種圖表型式,包括圓餅圖、長條圖等 。Update 2後,多了以下功能,

可在 TFS 首頁釘選你關心的圖表,如下圖,

Pin work item charts to the home page 

除此之外,還可以自訂工作項目圖表,如從顏色挑選器(color picker) 挑你要的顯示色。

Customize colors in work item charts 

Web 版的測試案例管理 - 支援匯出

若要建立、管理測試案例、執行手動測試,在瀏覽器中就可做到 (executing manual tests from the browser)。 Update 2 後,你還可以匯出測試計畫、包括整個測試套件 (test suites)、測試案例以及相關的值及參數,到一個 HTML 檔,以方便離線瀏覽、列印、或是寄 email 給他人。如下圖,

Export test plans, test suites, or test cases to HTML 

除此之外,新功能 - “Shared Parameters” (共用參數),有些時候在不同的測試案例,會帶入共用的值,例如測試案例 A,是測試購物車結帳,而我們事前定義了加入三種產品到購物車,這三種產品的相關參數,例如產品ID、購買數量,我們可以儲存下來。在另一個測試案例 B,是測試訂單列印,也可帶入同樣的三個產品,就可共用一樣的參數值,如此在進行測試時更省功夫!

 

Shared Parameters in Web-based test case management 

燃盡圖 (Burndown Charts) - 現在可以設定工作天數 (Working Days)

燃盡圖 (Burndown Charts) 常會用在敏捷開發團隊中 (agile teams),用來檢示每個 interation/sprint 的工作進度。 Update 2後,可以讓你設定每週的工作天,例如,你可以只選取星期一到星期五,如下圖:這是一個常被 TFS 使用者要求的功能,現在已可以使用了! (Visual Studio Online 也可以) -  (a highly requested feature on the Visual Studio UserVoice)

Setting working days in burndown charts 

與 Kanban 看板相關 - 在累加工作流圖表 (Cumulative Flow Diagram) ,現在可以設定起始日 (Start Date)

關於敏捷開發會用到的 Kanban 看板 (working with Kanban boards),Team Foundation Server 提供了視覺化的圖表,而且自動產生,讓開發團隊很快了解專案狀況。

Update 2 之後,可以自行設定起始日,並自動計算並產生累加工作流圖表 (Cumulative Flow Diagram)。

Git 版本管控 (Source Control) 的一些改進

在 Team Foundation Server 2013 中,你可以選擇兩種版控的方式,Team Foundation Version Control - TFVC 集中式版控或是 Git 分散式版控。

在 Update 2 中,改進了 Git 版控包含了:

  • Use the Annotate feature (aka blame) with Git
  • Amend recent local commits using Visual Studio (similar to the command line: “git amend”), as long as the commits have not yet been pushed to the TFS repository
  • Push to or pull from a selected remote repository in Team Explorer without having to use the command line
  • Roll back a commit to undo a check-in more easily
  • Monitor or cancel long-running Git operations
  • 可使用 Ant 或是 Maven 進行 Java code 的 Build - on the build controller to build Java code managed in a Git repository (requires Team Explorer Everywhere (TEE) Update 1)

其它改變及錯誤修正

完整的 Visual Studio 2013 Update 2 RC 的修正及改變清單,請看 Visual Studio Update KB Article.

文章來源 - https://www.visualstudio.com/2014-apr-2-vs