Visual Studio Icon Visual Studio 2017 15.6 版資訊Visual Studio 2017 version 15.6 Release Notes


| 開發人員社群 | 系統需求 | 相容性 | 可散發程式碼 | 授權條款 | 部落格 | 已知問題 || Developer Community | System Requirements | Compatibility | Distributable Code | License Terms | Blogs | Known Issues |


注意

如果您是從非英文語言版本的頁面存取此頁面,並想查看最新的內容,請瀏覽此版本資訊頁面的英文版本。If you are accessing this page from a non-English language version, and want to see the most up-to-date content, please visit this Release Notes page in English. 若要變更此頁面的語言,請按一下You can change the language of this page by clicking the 頁尾中的 圖示並選取所要使用的語言。 icon in the page footer and selecting your desired language.


按一下按鈕以下載最新版的 Visual Studio 2017。Click a button to download the latest version of Visual Studio 2017. 如需安裝和更新 Visual Studio 2017 的指示,請參閱將 Visual Studio 2017 更新至最新版本文件。For instructions on installing and updating Visual Studio 2017, see Update Visual Studio 2017 to the most recent release documentation.


15.6 新功能的摘要Summary of What's New in 15.6

15.6 的發行版本Releases of 15.6

15.6 的新功能New Features in 15.6


15.6 中修正的最常出現問題Top Issues Fixed in 15.6

這些是 15.6 中已解決的客戶回報問題:These are the customer-reported issues addressed in 15.6:

查看 Visual Studio 2017 15.6 版中已修正的所有客戶回報問題。See all customer-reported issues fixed in Visual Studio 2017 version 15.6.

The Developer Community Portal


15.6 新功能的詳細資料Details of What's New in 15.6

Release Notes Icon Visual Studio 2017 15.6.0 版Visual Studio 2017 version 15.6.0

於 2018 年 3 月 5 日發行released on March 5, 2018

15.6 的新功能New Features in 15.6

效能Performance

在 15.6 中,我們持續改善方案載入效能,特別是針對會將設計階段建置結果快取的案例。In 15.6, we continued improving solution load performance, specifically for scenarios when design time build results are cached. 當電腦已開啟方案時,大型 C# 和 Visual Basic 方案的載入速度會比之前快兩倍。Large C# and Visual Basic solutions will load twice as fast as before when a solution has already been opened on a machine.

.NET Core 方案載入.NET Core Solution Load

我們將焦點放在 .NET Core;根據實驗室的測量資料,客戶應可獲得平均速度加快 20% 的方案載入時間。We focused on .NET Core and according to our lab measurements, customers can expect 20% faster solution load times on average.

UI 回應性通知UI Responsiveness Notifications

為了讓您一目了然延伸模組對效能和可靠性的影響,Visual Studio 會執行即時分析,以判斷延伸模組是否可能是造成無法回應的原因。In order to provide more transparency around extensions' impact on performance and reliability, Visual Studio performs real-time analysis to determine whether an extension is likely to have caused unresponsiveness. 如果 Visual Studio 判定某個延伸模組是停止回應的原因,即會顯示通知以讓使用者停用可疑的延伸模組或隱藏該延伸模組的後續通知 (圖 1)。If an extension is determined to have caused the hang, Visual Studio will display a notification which allows the user to disable the suspect extension or suppress future notifications for that extension (Figure 1).

UI Responsiveness notification with option to disable
(圖 1) UI 回應性通知選項,可用來停用延伸模組或隱藏後續通知(Figure 1) UI Responsiveness notification option to disable extension or suppress future notifications

安裝和設定Installation and Setup

  • 在此版本中,不具系統管理權限的使用者可以建立 VS 配置;如此一來,非系統管理員即可建立離線的網路安裝。With this release, users without administration rights will be able to create a VS layout, which will allow non-administrators to create an offline network install.
  • 第一次安裝 Visual Studio 或透過網站進行更新時,您會發現 Visual Studio 安裝程式提供了全新且更一目了然的安裝體驗。When you install Visual Studio for the first time or update it from the web, you will see a new, more transparent setup experience for the Visual Studio Installer. 深入來看,其實沒有任何變更,但全新的體驗會逐步示範所有狀況 (圖 2)Under the hood, nothing has changed – but the new experience shows you step-by-step what's happening (Figure 2).
Improved transparency setup for Visual Studio Installer
(圖 2) Visual Studio 安裝程式改善的透明安裝(Figure 2) Improved transparency setup for Visual Studio Installer
我們已新增支援暫停 (圖 3) 安裝及稍後繼續安裝 (圖 4) 的功能。 We've added support to pause (Figure 3) your installation and resume (Figure 4) it at a later time.
Pause your installation
(圖 3) 暫停安裝(Figure 3) Pause your installation
Resume your installation
(圖 4) 繼續安裝(Figure 4) Resume your installation

安裝詳細資料Installation Details

新的安裝詳細資料 (圖 5) 可讓您查看下載大小、下載完成百分比和下載的速率。With new installation details (Figure 5), you can see the download size, download percentage completed and the rate of the download. 您也可以查看正在安裝的套件總數以及剩餘的數目。You can also see total number of packages being installed and how many are remaining.

注意

如果您暫停安裝並於稍後繼續,進度會以剩餘的下載項目與安裝項目為基準,而不會從上一個計數開始。If you pause the installation and later resume, the progress applies to what’s left to be downloaded and installed, and does not start from the previous count.

Installation details
(圖 5) 安裝詳細資料(Figure 5) Installation details

IDE 設定IDE Setup

  • 我們已簡化更新程序;您可以透過 Visual Studio 中的更新通知直接執行安裝程式,而不需透過 [延伸模組和更新]。We've streamlined the update process by having the update notification in Visual Studio take you directly to the installer, instead of Extensions and Updates.

  • 已更新「ASP.NET 與網頁程式開發」和「.NET Core 跨平台開發」的工作負載,以包括「網頁程式開發的雲端工具」。The workloads "ASP.NET and web development" and ".NET Core cross-platform development" have been updated to include "Cloud tools for web development". 此元件包含從 Visual Studio 內取用 Azure Functions 的一切所需。This component contains everything needed to consume Azure Functions from within Visual Studio.

    注意

    從 15.6 Preview 3 更新至 Preview 4 或更高版本時,電腦可能會自動重新啟動,而不通知使用者或與其進行確認。When updating from 15.6 Preview 3 to Preview 4 or greater, the computer may restart automatically without notifying or confirming with the user.

編輯器增強功能Editor Improvements

  • 我們在預設的鍵盤對應中,新增 Ctrl+D 作為 Edit.Duplicate 的快速鍵。We added Ctrl+D as the shortcut for Edit.Duplicate in the default keyboard mapping. 先前的同步選取 (Ctrl+EV) 仍可運作,且所有鍵盤對應配置均適用。The previous chord (Ctrl+E, V) still works, and is available in all keyboard mapping schemes.
  • 我們已新增「展開選取範圍」的命令,其可將選取範圍一口氣展開到下一個邏輯區塊。We've added the Expand Selection command, which allows you to successively expand your selection to the next logical block. 您可以使用快速鍵 Shift+Alt+= 展開目前的選取範圍,並用 Shift+Alt+- 收合。You can use the shortcuts Shift+Alt+= to expand and Shift+Alt+- to contract the current selection.

F# 語言和工具的改善F# Language and Tooling Improvements

這一版的 F# 和工具引進了許多改善。A lot of improvements went into F# and its tools for this release. 其中最重要的是 .NET Core SDK 專案的相關功能。The most significant of them are related to .NET Core SDK projects. 當然,其中也包括社群提供的許多貢獻。As always, significant contributions from the community came together here, as well.

F# 編譯器和核心程式庫的改善F# Compiler and Core library Improvements

F# 工具的改善F# Tooling Improvements

  • 已實作 .NET Core SDK 專案的檔案排序功能,包括新增於其上/其下、資料夾支援,以及重新整理 Visual Studio UI 而不需要重新載入專案。File ordering for .NET Core SDK-based projects has been implemented, including Add Above/Below, folder support, and Visual Studio UI refreshing without the need to reload the project.
  • 已實作針對多目標 .NET Core SDK 專案的支援。Support for multi-targeting of .NET Core SDK-based projects has been implemented.
  • .NET Core SDK 專案現在可支援共用檔案。Shared files are now supported in .NET Core SDK-based projects.
  • F#/.NET Framework 專案可以參考 .NET Standard 專案。.NET Standard projects can be referenced by F#/.NET Framework projects.
  • 錯誤報告改善 (來源:Vasily KirichenkoEugene AuduchinokError reporting improvements, by Vasily Kirichenko and Eugene Auduchinok.
  • 效能改善 (來源:Vasily KirichenkoEugene AuduchinokDaniel Wedelich 和 Microsoft)。Performance improvements, by Vasily Kirichenko, Eugene Auduchinok, Daniel Wedelich, and Microsoft.
  • 更精確的自動完成和許多 Bug 修正 (來源:Vasily Kirichenko 和 Microsoft)。More precise autocompletion with numerous bugs fixes, by Vasily Kirichenko and Microsoft.
  • 在完成項目中,可以使用未開啟之命名空間中的靜態成員 (來源:Vasily Kirichenko)。Static members in unopened namespaces are available in completion, by Vasily Kirichenko.
  • [Document Highlight] (文件醒目標示) 和 [Find All References] (尋找所有參考) 中可顯示命名空間符號 (來源:Vasily Kirichenko)。Namespace symbols appear in Document Highlight and Find All References, by Vasily Kirichenko.
  • 其他編輯器 (VSCode、VS for Mac、Rider) 都可以使用結構指導方針的程式碼 (來源:Eugene Auduchinok)。Structured Guidelines code has been made available for other editors (VSCode, VS for Mac, Rider), by Eugene Auduchinok.
  • 適用於 F# 建構函式的更佳摺疊和結構指導方針 (來源:Eugene Auduchinok)。Better collapsing and structured guidelines for F# constructors, by Eugene Auduchinok.
  • 簡化名稱分析器不會再簡化 open 陳述式 (來源:Vasily Kirichenko)。Open statements are no longer simplified in the Simplify Names analyzer, by Vasily Kirichenko.
  • 現在支援 QuickInfo 中的 sbytebyte IL 欄位顯示 (來源:Vasily Kirichenko)。Display of sbyte and byte IL fields in QuickInfo is now supported, by Vasily Kirichenko.
  • 未呼叫的 F# 函式或方法上不會再觸發未使用的宣告程式碼修正 (來源:Vasily Kirichenko)。Unused declaration code fix is no longer triggered on uncalled F# functions or methods, by Vasily Kirichenko.
  • 現在支援在 .NET Framework 專案中跨資料夾拖放 (來源:Paulo Nobre)。Drag and Drop across folders in .NET Framework projects is now supported, by Paulo Nobre.
  • 現在可以切換未使用的宣告分析器和程式碼修正。The unused declarations analyzer and code fix can now be toggled.
  • Bug 修正和效能改善 (來源:Eugene Auduchinok 和 Microsoft)。Bug fixes and performance improvements, by Eugene Auduchinok and Microsoft.
  • 現在,以 #if INTERACTIVE 包圍的程式碼不需要類型檢查即可支援 IDE 功能 (來源:Eugene Auduchinok)。Code surrounded by #if INTERACTIVE defines now support IDE features which do not require type checking, by Eugene Auduchinok.
  • 已修正舊版 F#/ASP.NET (.NET Framework) 專案上針對空白 [新增檔案] 視窗修正的意外還原 (來源:Loïc Denuzière)。An inadvertent reversion of a fix for empty "New file" window on older F#/ASP.NET (.NET Framework) projects has been fixed, by Loïc Denuzière.

F# 基礎結構和開放原始碼的改善F# Infrastructure and Open Source Improvements

  • 已實作版本控制更新 RFCVersioning update RFC has been implemented.
  • GitHub 可提供用於編譯器與工具中的所有當地語系化檔案,亦接受社群投稿。All localization files used in the compiler and tools are available on GitHub, and are able to accept community contributions.
  • 每晚建置版本可以在一小時內產生;以往需要 4 小時以上。Nightly builds can be produced in an hour; down from 4+ hours.
  • 針對開放原始碼投稿人,我們已移除對 Windows 10 SDK 的相依性。We removed our dependency on the Windows 10 SDK for open source contributors.
  • F# 編譯器 SDK 現在內含附屬組件和 FSharp.Core.resources.dllSatellite assemblies and FSharp.Core.resources.dll are now included in the F# compiler SDK.
  • 如果組件資訊沒有變更,編譯器就不會再於 Visual F# 程式碼基底中自我重建。The compiler no longer rebuilds itself in the Visual F# codebase if assembly info has not changed.
  • 針對 FSharpSymbolUse,實作了 ToString() 以便在偵錯編輯器工具時更輕鬆查看所有符號使用結果 (來源:Eugene Auduchinok)。ToString() is implemented for FSharpSymbolUse to make it easier to look at all symbol use results when debugging editor tooling, by Eugene Auduchinok.

若要查看 15.6 版的完整認可變更記錄,請參閱我們的標記To see the full commit changelog for the 15.6 release, see our tag.

注意

查看 Visual Studio 2017 15.6 版中所有現有的已知問題和可用的因應措施。See all existing known issues and available workarounds in Visual Studio 2017 version 15.6.

Visual C++ 的改善 Visual C++ Improvements

  • 此發行版本包含了 CVE-2018-1037 中所述 PDB 安全性問題的修正。This release contains a fix for the PDB security issue described in CVE-2018-1037.
  • 從 [新增專案] 對話方塊建立 CMake 專案。Create CMake projects from the Add New Project dialog.
  • 您現在可以選擇是否要在開啟新的 CMake 專案時自動產生 CMake 快取。You can now choose whether or not to automatically generate the CMake cache when you open new CMake projects in Visual Studio.
  • 測試總管可自動探索並列出 CMake 專案中的 CTest、Google Test 和 Boost.Test 測試。CTest, Google Test, and Boost.Test tests in CMake projects are automatically discovered and listed in Test Explorer.
  • 使用 Boost.Test 項目範本,輕鬆地將 Boost 單元測試新增至專案。Easily add Boost unit tests to your project with Boost.Test item templates. Boost 單元測試現在使用 Boost 動態程式庫。Your Boost unit tests now use the Boost dynamic library.
  • 支援 C++17 保證的複製省略Support for C++17 guaranteed copy elision.
  • 適用於 Android 開發的 Android NDK r15c 內建支援 (英文)。Built-in support for Android NDK r15c for Android development.
  • Visual Studio Android 工具中針對使用 SDK 層級 25 和以下版本建置的 Android 應用程式在 Oreo 裝置上部署及執行的支援。Support in Visual Studio Android tools for Android apps that are built with SDK level 25 and lower to deploy and run on Oreo devices.
  • 進一步實作 C++17 標準程式庫,包括每個 C++17 標準的 stable_sort、分割、平行內嵌 vector::emplace_back 和 <memory_resource> 等 API。Further progress toward implementing the C++17 Standard Library, including APIs such as stable_sort, partition, inline vector::emplace_back in parallel, and <memory_resource>, per C++17 standards.
  • 如果 Include 檔案存在於工作區根目錄之下,即使其未明確新增至 Include 路徑,系統仍會針對 C++ 的 [開啟資料夾] 自動探索遺漏的 Include 檔案。Missing include files are automatically discovered for C++ Open Folder if they exist under the workspace root, even if they are not explicitly added to the include path.
  • 內嵌 ARM GCC 支援也提供偵錯選項。Debug options are available for Embedded ARM GCC support. 以滑鼠右鍵按一下您的二進位檔,選擇 [偵錯並啟動設定],並選取 C/C++ 偵錯微控制器。Right-click your binary, choose Debug and Launch Settings, and then select C/C++ Debug microcontroller.
  • ARM64 已啟用並完全支援 Profile-Guided Optimization (特性指引最佳化)。Profile-Guided Optimization is enabled and fully supported on ARM64.
  • 新增更多規則 (英文) 到 C++ Core Guidelines Check 擴充,可協助您讓您的程式碼更簡潔、更安全且容易維護。Added more rules to the C++ Core Guidelines Check extension that help you make your code cleaner, more secure, and maintainable.
    • C++ Core Checker 延伸模組,可偵測是否使用超出範圍存留期的間接取值。A C++ Core Checker extension to detect use of indirections with a lifetime that is out of scope.
    • 5 項關於整數溢位的全新檢查強制執行規則,以及來自 C++ Core Guidelines 的其他規則。5 new checks enforcing rules around integer overflow, and additional rules from the C++ Core Guidelines.
    • C++ Core Check 現在包含一組程式碼分析規則,可用於偵測算術溢位。C++ Core Check now includes a set of code analysis rules for detecting arithmetic overflows.
  • 支援執行單一檔案的程式碼分析 (或是您透過方案總管選擇的檔案);已清除 [建置] 功能表和 [分析] 功能表。Support for running single file Code Analysis (or on your selection of files from the Solution Explorer); cleaned up the Build and Analyze menus. 「執行程式碼分析」不會再執行產生程式碼的作業,因此可以加快分析執行速度。"Run Code Analysis" no longer runs code generation, which speeds up analysis runs.
  • 編輯器會將非作用中組態的 IntelliSense 錯誤顯示為紫色波浪線。IntelliSense errors for inactive configurations will be shown as purple squiggles in the editor. 您可以在 [工具] > [選項] 中設定要處理的組態數目。The number of configurations to process is configurable in Tools > Options.
  • 編譯時間大幅改善 (英文):Significant compile-time improvements:
    • 編譯器可透過預先遞增迴圈已改善的最佳化,以及 LTCG 中常數全域資料已改善的識別和傳播,讓您的程式碼執行速度更快。The compiler optimizes your code to run faster through improved optimizations of pre-incremented loops and improved identification and propagation of constant global data in LTCG.
    • 相較於 15.5,編譯時間更短。Compile times are shorter compared to 15.5. 編譯器前端大部分的輸入速度都提升 3% 到 5% 之間。The compiler front-end is between 3-5% faster on most inputs. 由於核心最佳化演算法的額外負荷已降低,編譯器最佳化工具速度可提升 3%。The compiler optimizer is 3% faster due to reduced overhead of core optimization algorithms. 此外,資料結構已重新架構,因此大型 LTCG 編譯速度會加快 10%。Additionally, large LTCG compilations are 10% faster due to re-architected data structures.
  • 在完整連結案例中產生對應檔的額外負荷已降低。Mapfile generation overhead is reduced in full linking scenarios. 不過,我們仍建議使用 PDB 檔案,而非對應檔。We still recommend using PDB files instead of mapfiles.
  • 在所有架構 (包含 x86、x64、ARM 和 ARM64) 上,MSVC 編譯器都支援 /Qspectre 參數The MSVC compiler supports the /Qspectre switch on all architectures, including x86, x64, ARM, and ARM64.

C# 編譯器C# Compiler

C# 編譯器現在支援:The C# compiler now supports:

  • CoreCLR 的編譯器伺服器,以確保組建輸送量效能。Compiler server on CoreCLR, for build throughput performance.
  • CoreCLR 的強式名稱簽署 (/keyfile 選項,適用於所有作業系統)。Strong name signing on CoreCLR (/keyfile option, all OSes).

除了許多 Bug 修正和一項重大變更 (請參閱重大變更的執行清單) 之外,7.2 語言功能也有兩個微幅的語言變更:In addition to numerous bug fixes and one breaking change (see running list of breaking changes), two minor language changes were made to the 7.2 language features:

Visual Studio Tools for XamarinVisual Studio Tools for Xamarin

這個版本包含 Xamarin.iOS 11.8 和 Xamarin.Android 8.2。This release includes Xamarin.iOS 11.8 and Xamarin.Android 8.2.

使用 iOS 模擬器的即時 XAML 預覽Live XAML Previewing with the iOS Simulator

Xamarin Live Player 讓開發人員可以直接在 iOS 和 Android 裝置上使用 Visual Studio,以持續部署、測試應用程式及對其偵錯。The Xamarin Live Player enables developers to continuously deploy, test, and debug their apps using just Visual Studio and an iOS or Android device. Visual Studio 2017 15.5 版已新增支援,可讓開發人員直接在 Android 模擬器中預覽即時的 XAML 變更,而不需要重新編譯或重新部署。Visual Studio 2017 version 15.5 added support to enable developers to preview real-time XAML changes directly in the Android emulator without requiring a recompile or redeploy. 此版本將這項功能引進適用於 Windows 的遠端 iOS 模擬器。This release brings this functionality to the Remoted iOS Simulator for Windows.

PythonPython

針對此版本,我們已將需具備完成資料庫才能在已安裝套件上使用 IntelliSense 的限制移除 (圖 6)。For this release, we have removed the need for a completion database in order to get IntelliSense on installed packages (Figure 6). 這表示,現在您只要幾秒鐘就可以取得 numpypandas 等熱門套件的完成項,而不需在安裝好套件後苦等四小時。This means that instead of waiting up to four hours after installing a package, you will now get completions in just a few seconds for popular packages such as numpy and pandas.

Python completions for the pandas package
(圖 6) Panda 套件的 Python 完成項(Figure 6) Python completions for the panda's package

我們針對下列項目新增了自訂功能:用於文件字串的色彩 (在類別或函式中使用時),以及偵測為 re 程式庫呼叫之一部分的規則運算式模式 (圖 7)。We have added the ability to customize the color used for doc-strings, when they are used in a class or function, and also regular expression patterns detected as part of a call into the re library (Figure 7). 您可以在 [工具] > [字型] > [色彩]、[Python 文件] 和 [Python 規則運算式] 下進行這些變更 。These may be changed under Tools > Fonts > Colors, "Python Documentation" and "Python Regular Expression".

Example of highlighted doc-string and regular expression
(圖 7) 醒目標示的文件字串和規則運算式範例(Figure 7) Example of highlighted doc-string and regular expression

最後,針對 Anaconda 使用者,我們正在實驗 Conda 的偵測和整合。Finally, for Anaconda users, we are experimenting with detection and integration of conda. 啟用時,您的 Conda 環境會自動出現在 Visual Studio 中;我們也會使用 Conda 而非 pip 來管理套件。When enabled, your conda environments will appear within Visual Studio automatically, and we will use conda rather than pip to manage packages. 如需詳細資訊,請參閱 What's new for Python in Visual Studio 15.6 (Visual Studio 15.6 的 Python 新功能) 部落格文章。See the what's new for Python in Visual Studio 15.6 blog post for more information.

偵錯和診斷Debugging and Diagnostics

CPU 使用量工具CPU Usage Tool

CPU 使用量工具可以顯示非同步程式碼的邏輯呼叫堆疊 (亦即「非同步呼叫堆疊拼接」) (圖 8)。The CPU Usage tool can display logical call stacks for asynchronous code (aka 'Async Call Stack Stitching') (Figure 8).

  • 若要查看邏輯呼叫堆疊 (亦即「拼接的呼叫堆疊」),請開啟 CPU 使用量工具 [篩選] 下拉式功能表的 [Stitch Async Code] (拼接非同步程式碼) 設定。To see logical call stacks (i.e. 'stitched call stacks'), turn on the "Stitch Async Code" setting in the Filter drop-down menu of the CPU Usage tool.

  • 系統會將代表父函式或工作執行的非同步程式碼顯示為 [呼叫樹狀圖] 檢視和 [呼叫端/被呼叫端] 檢視中的子系。Asynchronous code running on behalf of a parent function or Task will appear as a child in the Call Tree and Caller/Callee views.

  • 這項變更可讓您更輕鬆巡覽非同步程式碼,並了解其效能特性。This change makes it easier to navigate asynchronous code and understand its performance characteristics.

    注意

    這項功能可能需要很長的時間來產生某些非同步程式碼模式的邏輯呼叫堆疊。This feature can take a long time to produce the logical call stacks for some async code patterns. 您可以視需要取消分析,並關閉設定。You can cancel the analysis and turn off the setting if necessary. 上述行為只有在使用 ALT-F2 效能分析工具啟動頁面進行事後剖析分析期間,才可以使用。This behavior is only available during post-mortem style profiling using the ALT-F2 Performance Profiler launch page. 在偵錯期間使用 CPU 使用量工具時,不會顯示邏輯呼叫堆疊。When the CPU Usage tool is used during debugging, it does not shows logical call stacks.

Logical Call Stack Tree with Call Stack Stitching in effect
(圖 8) 邏輯呼叫堆疊樹狀圖與作用中的呼叫堆疊拼接(Figure 8) Logical Call Stack Tree with Call Stack Stitching in effect

CPU 使用量工具 (可在 [診斷工具] 視窗中的 F5 偵錯期間及透過 ALT-F2 效能分析工具取得) 現在可根據特定程式碼行的 CPU 消耗量來醒目顯示原始程式碼 (圖 9)。

The CPU Usage tool (available during F5 Debugging in the Diagnostic Tools window and in the ALT-F2 Performance Profiler) now displays source line highlighting based on the CPU consumption of specific lines of code (Figure 9).

  • 當您檢視 CPU 使用量工具的 [呼叫樹狀圖] 檢視或 [呼叫端/被呼叫端] 檢視時,會顯示所選取函式的來源以及該函式上每個原始程式碼所指出的 CPU 耗用量。When you view the Call Tree or Caller/Callee views of the CPU Usage tool, the source for the selected function is displayed with CPU consumption indicated on each source line of the function.

  • 如果函式的 CPU 效能是個考量,您就可以趁這時具體判斷函式的哪些原始程式碼要為函式執行時的 CPU 耗用量負責。If CPU performance of a function is a concern, now you can determine specifically what source lines of the function are responsible for the CPU consumption when the function was executing.

    注意

    此功能需要在產生的 PDB 中包含來源資訊 (由專案設定來控制)。This feature requires that source information be included in the generated PDB which is controlled by the project settings. 如果專案的 PDB 不含來源資訊,就無法顯示程式碼屬性或原始程式檔。Projects for which PDBs do not have source information will be unable to display either the line attribution or the source file.

CPU Usage tool with source line highlighting
(圖 9) CPU 使用量工具與醒目標示的原始程式碼行(Figure 9) CPU Usage tool with source line highlighting

支援執行緒名稱Thread Name Support

為回應使用者意見反應,偵錯工具現可顯示在傾印偵錯中透過 SetThreadDescription API 所設定的執行緒名稱。Per user feedback, the debugger is now able to display thread names that are set via SetThreadDescription APIs in dump debugging. 這項功能需要在 Windows 10 Fall Creators Update 或更新版本組建上收集傾印。This feature requires dumps to be collected on Windows 10 Fall Creators Update or later builds.

快照偵錯工具Snapshot Debugger

如果您使用的是執行於 Azure App Service 中的 ASP.NET 應用程式,並想要試用貼齊點或記錄點,則可以選取 [偵錯目標] 下拉式功能表的 [快照偵錯工具 (Azure App Service)],進行這項作業 (圖 10)。If you are working on an ASP.NET application running in Azure App Service, and would like to try out Snappoints or Logpoints, you can do so by selecting "Snapshot Debugger (Azure App Service)" in the Debug Target dropdown (Figure 10).

Start Snapshot Debugger for ASP.NET application
(圖 10) 啟動 ASP.NET 應用程式的快照偵錯工具(Figure 10) Start Snapshot Debugger for ASP.NET application

.NET 生產力.NET Productivity

在 15.6 Preview 2 中,我們已新增巡覽至反向組譯原始碼的功能。In 15.6 Preview 2, we’ve added the ability to navigate to decompiled sources. 啟用時,在任何參考的類型或成員上叫用「移至定義」或「查看定義」時,會顯示其定義與透過 ILSpy 反向組譯來重新建構的方法主體。When enabled, invoking Go To Definition or Peek Definition on any referenced type or member will show its definition with reconstructed method bodies via ILSpy decompilation. 若要開啟這項功能,請移至 [工具] > [選項] > [文字編輯器] > [C#] > [進階] > [Enable navigation to decompiled sources] (啟用巡覽至反向組譯的原始碼) (圖 11)。To turn on this feature, go to Tools > Options > Text Editor > C# > Advanced > Enable navigation to decompiled sources (Figure 11).

Navigate to decompiled sources
(圖 11) 巡覽至反向組譯的原始碼(Figure 11) Navigate to decompiled sources

我們也新增了下列幾個 .NET EditorConfig 選項:We also added a couple more .NET EditorConfig options:

  • dotnet_prefer_inferred_tuple_namesdotnet_prefer_inferred_tuple_names
  • dotnet_prefer_inferred_anonymous_type_member_namesdotnet_prefer_inferred_anonymous_type_member_names

注意

若要查看所有 .NET 程式碼慣例選項,請參閱 EditorConfig 的 .NET 編碼慣例設定To see all .NET coding convention options, check out .NET coding convention settings for EditorConfig.

Visual Studio Web 工具Visual Studio Web Tools

  • 針對 .NET Core 專案,方案總管有一項稱為「檔案巢狀」的新功能,其可讓使用者控制相關檔案在方案總管中的呈現方式。Solution Explorer has a new capability for .NET Core projects called "file nesting", which allows users to control how related files appear in Solution Explorer.
  • 已更新專案的發行體驗。The project publishing experience has been updated.
  • 在 [新增專案] 對話方塊中:In the New Project dialog:
    • 已將可供選取 .NET Framework 版本的下拉式功能表移至對話方塊底部,而不再作為範本的篩選條件。the drop-down that lets you pick a version of .NET Framework has been moved to the bottom of the dialog and no longer acts as a filter for the template.
    • 已將 "Web" 節點的「網站」子節點更名為「舊版本」。for the node "Web", the sub-node "Web Site" has been renamed to "Previous Versions".
  • WebForms 和 MVC 5 專案的偵錯下拉式功能表:The debug drop-down for WebForms and MVC 5 projects:
    • 可讓使用者選取適用於 Azure App Service 部署應用程式的快照偵錯工具。allows users to select the Snapshot Debugger for Azure App Service deployed apps.
    • 已更新為具有與 ASP.NET Core 專案相同的瀏覽器選取手勢。has been updated to have the same browser selection gesture as ASP.NET Core projects.

持續傳遞工具Continuous Delivery Tools

針對存在於原始檔控制中的方案,您可以按一下 Team Explorer 中的 [持續傳遞] 磚,以設定應用程式的自動化建置與部署。For solutions under source control, you can click on the Continuous Delivery tile in Team Explorer to configure automated build and deployments for your application.

設定持續傳遞工具Configure Continuous Delivery Tools

  • 我們已新增支援 TFVC 作為原始檔控制提供者。We added support for TFVC as a source control provider. 在 VSTS TFVC Team 專案中,您可以針對存在於原始檔控制中的方案設定持續傳遞 (圖 12)。You can configure continuous delivery for solutions under source control in a VSTS TFVC team project (Figure 12).
Configure Continuous Delivery for projects in a VSTS TFVC project
(圖 12) 為 VSTS TFVC 專案中的專案設定持續傳遞(Figure 12) Configure Continuous Delivery for projects in a VSTS TFVC project
  • 我們已新增支援透過 SSH 的 Git 驗證。We added support for Git authentication over SSH. 在 VSTS 或已啟用 SSH 驗證的 GitHub Git 存放庫中,您可以針對存在於原始檔控制中的方案設定持續傳遞。You can configure continuous delivery for solutions under source control in a VSTS or GitHub Git repo with SSH AUTH enabled.

  • 我們引進了對容器化專案的支援。We introduced support for containerized projects. 您可以針對具 ASP.NET Core 專案及 docker 支援 (目標為 Linux 上的 Azure App Service (用於容器的 Web App)) 的方案設定持續傳遞 (圖 13)。You can configure continuous delivery for solutions with ASP.NET Core projects and docker support targeting Azure App Service on Linux (Web App for Containers) (Figure 13). [設定持續傳遞] 對話方塊預設會在 Linux 上建立新的 Azure App Service (用於容器的 Web App) 與 Azure Container Registry (如果您的 Azure 訂用帳戶尚未具備的話)。The Configure Continuous Delivery dialog will default to create a new Azure App Service on Linux (Web App for Containers), and an Azure Container Registry if one doesn’t already exist under your Azure Subscription.

Configure Continuous Delivery to Azure dialog for App Service on Linux
(圖 13) Linux 上的 Azure App Service [設定持續傳遞] 對話方塊(Figure 13) Configure Continuous Delivery to Azure dialog for App Service on Linux

Team ExplorerTeam Explorer

支援 Git 標籤Git Tag Support

我們已新增更多對 Git 標記的支援。We have added more support for Git tags. 您現在可以建立、刪除和推送標記。You can now create, delete, and push tags. 在 [標記] 頁面上,您可以檢視存放庫中的所有標記,並透過標記建立新分支。On the Tags page, you can view all of the tags in your repo, and create a new branch from a tag. 這是 UserVoice 中最常要求的功能之一。This was one of our most requested features from UserVoice.

若是 Visual Studio Team Services 使用者,您可以簽出提取要求分支。For Visual Studio Team Services users, you can check out pull request branches. 這項功能可讓您更輕鬆檢閱提取要求、測試變更,並建置程式碼。This feature makes it easier to review pull requests, test changes, and build your code.

通用 Windows 平台開發人員工具Tools for Universal Windows Platform Developers

您可以將 Windows 10 Insider Preview SDK (組建版本 17095) 安裝為含有通用 Windows 平台開發工作負載的選擇性元件。The Windows 10 Insider Preview SDK (Build 17095) can be installed as an optional component with the Universal Windows Platform development workload.

擴充性Extensibility

部分 Visual Studio 可執行檔 (devenv.exe、blend.exe、wdexpress.exe 和 vsga.exe) 的檔案版本現可看出次要版本 (例如 15.6.*)。File versions for a number of Visual Studio executables – devenv.exe, blend.exe, wdexpress.exe, and vsga.exe – reflect the minor release (for example 15.6.*).

注意

這不會影響任何功能,但如果外部程式碼會依賴可執行檔版本號碼,則可能要更新該程式碼。This does not affect any functionalities, but external code relying on executable file version numbers may need to be updated.

測試總管Test Explorer

全新階層架構檢視New Hierarchy View

Visual Studio 的測試總管現在提供階層檢視 (圖 14),其可依據專案、命名空間和類別組織您的測試。Test Explorer in Visual Studio now has a hierarchy view (Figure 14) that organizes your tests by Project, Namespace, and then Class. 您可以使用 [階層] 按鈕 (位於 [群組依據] 按鈕旁邊的測試總管視窗上方),開啟和關閉這個檢視。This view can be toggled on and off using the hierarchy button located at the top of the Test Explorer window next to the Group By button.

Test Explorer Hierarchy View
(圖 14) 測試總管的階層檢視(Figure 14) Test Explorer Hierarchy View

這項功能不僅讓您可以更容易巡覽測試,還可以輕鬆針對測試提供回饋意見。This feature not only makes navigating your tests much easier, but also gives better feedback on tests at a glance.

  • 如果階層中的「父節點」(專案、命名空間和類別) 至少有一個失敗的測試,則會顯示測試失敗的圖示。The “parent nodes” in the hierarchy (Project, Namespace, and Class) display a failing test icon if they contain at least one failing test.
  • 父節點後面也會接著一個數字,以摘要這個群組包含多少個測試。Parent nodes are also followed by a number summarizing how many tests the grouping contains. 父節點右側顯示的持續時間 (以毫秒為單位) 為該群組內執行測試所花費的總時間。The duration in milliseconds shown to the right of a parent node is the total time that tests within that group took to execute.

即時測試探索Real Time Test Discovery

使用即時測試探索時,系統會自動探索測試 (圖 15),而不會要求您建置受控專案。Tests will be discovered automatically with Real time test discovery (Figure 15) without requiring you to build your managed project. 這可讓測試總管與程式碼變更 (例如新增、移除或編輯測試) 保持同步。This allows Test Explorer to stay in sync with code changes such as adding, removing, or editing tests. 請注意,上述階層檢視功能適用於所有類型的專案,但自動測試探索功能只適用於 C# 和 Visual Basic 專案。Note that unlike Hierarchy View feature described above which is available for all types of projects, the automatic test discovery feature is only available for C# and Visual Basic projects.

Xamarin Live Player
(圖 15) Xamarin Live Player 配對、部署和即時編輯模式的動畫(Figure 15) Animation of the Xamarin Live Player pair, deployment, and live edit modes

支援測試 Win10 IoT CoreWin10 IoT Core Testing Support

我們已引進對 Win10 IoT Core 應用程式進行測試的支援。We have introduced support for testing Win10 IoT Core applications. 現在,這類 UWP 應用程式的測試可以在裝置上部署、偵錯與執行。Tests for such UWP applications can now be deployed to, debugged, and executed, on device. 測試總管也可以完全整合測試。The tests are also fully integrated into Test Explorer. 即使透過 VSTS CI,也可以獲得部署和執行的支援。Deployment and execution support is availalbe through VSTS CI as well. 因此,在 Visual Studio 中,Win10 IoT Core 應用程式可獲得完整的編輯、編譯、偵錯、測試週期支援,亦可獲得 Visual Studio Team Services 中的持續整合工作流程支援。Thus, Win10 IoT Core applications have full support in the edit, compile, debug, test cycle within Visual Studio, and in the Continuous Integration workflow in Visual Studio Team Services.

Win10 IoT Core Testing
(圖 16) Win10 IoT Core 測試(Figure 16) Win10 IoT Core Testing

Visual Studio Build ToolsVisual Studio Build Tools

Visual Studio Build Tools 可讓您建立組建伺服器,而不需要安裝所有 Visual Studio。The Visual Studio Build Tools allow you to create build servers without installing all of Visual Studio. 對於傳統型專案,安裝程式已經可以支援 C++、ASP.NET 和 .NET Core。The installer already supports C++, ASP.NET, and .NET Core for Desktop projects. 為了回應客戶的要求,我們會持續強化 Visual Studio Build Tools 以支援其他專案類型。In response to customer requests, we are enhancing the Visual Studio Build Tools to support additional project types. 在此版本中,我們新增對 TypeScript 和 Node.js 專案的支援。In this release we have added support for TypeScript and Node.js projects. 我們預計會在未來版本中新增對更多專案類型的支援。We expect to add support for more project types in future releases. 如需這個版本的 Visual Studio Build Tools,此為下載位置This is the download location for the Visual Studio Build Tools for this release.

Visual Studio ClickOnce ToolsVisual Studio ClickOnce Tools

ClickOnce 是一種部署技術,可讓您建立自行更新的 Windows 應用程式,並以最少的使用者互動來安裝和執行這些應用程式。ClickOnce is a deployment technology that enables you to create self-updating Windows-based applications that can be installed and run with minimal user interaction. 它會使用憑證以驗證應用程式發行者的真偽,並會簽署應用程式和部署資訊清單,以證明檔案未遭竄改。It uses certificates to verify the authenticity of the application's publisher, and to sign the application and deployment manifests to prove that the files have not been tampered with. 在這個版本中,我們已新增支援使用 Cryptography Next Generation (CNG) 憑證,簽署應用程式和部署資訊清單。In this release we have added support for signing the application and deployment manifests with Cryptography Next Generation (CNG) certificate.

Key VaultKey Vault

我們已在 Visual Studio 15.6 中隨附 Azure 服務驗證延伸模組We've added the Azure Services Authentication Extension in-box for Visual Studio 15.6. 針對使用 Microsoft.Azure.Services.AppAuthentication 程式庫的專案,其可讓它們使用 Visual Studio 帳戶來存取 Azure 資源 (例如 Key Vault)。This will allow projects that use the Microsoft.Azure.Services.AppAuthentication library to access Azure resources such as Key Vault using their Visual Studio accounts.

自動 macOS 佈建Automatic macOS Provisioning

在 Windows 上使用 Visual Studio 建置 iOS 應用程式變得更容易了!Building iOS apps with Visual Studio on Windows just got easier. 此版本新增了自動 macOS 佈建這項全新功能。This release adds a brand new feature called automatic macOS provisioning. 您不需要手動維護 Mac 組建電腦,只需要連接到 Mac,我們即會處理繁重的工作 (使用正確的 Xamarin.iOS 和 Mono 位元安裝和設定組建電腦),且所有作業都透過 Visual Studio 進行。Rather than needing to manually maintain a Mac build machine, all you need to do is connect to the Mac, and we will handle the heavy lifting of installing and configuring your build machine with the correct Xamarin.iOS and Mono bits, all from Visual Studio.

iOS Wi-Fi 部署iOS Wi-Fi Deployment

遠端 iOS 模擬器可讓開發人員完全在 Windows 上使用 Visual Studio 測試和偵錯 iOS 應用程式,其適用於所有版本的 Visual Studio (從 15.5 版開始),包括免費的 Community Edition!The Remoted iOS Simulator, which allows developers to test and debug iOS apps entirely in Visual Studio on Windows, is available to all editions of Visual Studio (as of version 15.5), including the free Community Edition! 模擬器支援位置模擬、旋轉、手勢等功能,甚至包括 Mac 的 iOS 模擬器不支援的多點觸控功能。The simulator supports functionality like location simulation, rotation, gestures, and even includes functionality that the iOS simulator on Mac does not, like multi-touch. 開發人員在 Windows 上建置 iOS 應用程式時,這可賦予其絕佳的模擬器體驗,那裝置呢?This provides a great simulator experience for developers building iOS apps on Windows, but what about devices? 使用 Visual Studio 2017 15.6 版時,您可以使用 Wi-Fi 部署,透過網路來部署 iOS 應用程式,而完全不需任何纜線!With Visual Studio 2017 version 15.6, you can deploy your iOS apps over the network with Wi-Fi deployment – no cables required! 在 Xcode 中設定無線裝置之後,Visual Studio 即會顯示該裝置,就像一般部署目標一樣。After setting up a wireless device in Xcode, it shows up in Visual Studio just like a normal deploy target.


Release Notes Icon Visual Studio 2017 15.6.1 版服務更新Visual Studio 2017 version 15.6.1 Servicing Update

於 2018 年 3 月 8 日發行released on March 8, 2018

這些是在此版本中解決的客戶回報問題:These are the customer-reported issues addressed in this release:


Release Notes Icon Visual Studio 2017 15.6.2 版服務更新Visual Studio 2017 version 15.6.2 Servicing Update

於 2018 年 3 月 13 日發行released on March 13, 2018

.NET Core 的 Microsoft 資訊安全諮詢 Microsoft Security Advisories for .NET Core

**CVE-2018-0875:**Microsoft 知悉 .NET Core 公開版本中有安全性弱點,也就是惡意檔案或 Web 要求可能引起拒絕服務 (DoS) 攻擊。CVE-2018-0875: Microsoft is aware of a security vulnerability in the public versions of .NET Core where a malicious file or web request could cause a denial of service (DoS) attack.

重要

建議系統管理員將 .NET Core 執行階段的版本更新到 1.0.10、1.1.7 或 2.0.6。System administrators are advised to update their .NET Core runtimes to versions 1.0.10, 1.1.7 or 2.0.6. 建議開發人員將 .NET Core SDK 的版本更新到 1.1.8 或 2.1.101。Developers are advised to update their .NET Core SDK to versions 1.1.8 or 2.1.101.

這些是在此版本中解決的客戶回報問題:These are the customer-reported issues addressed in this release:


Release Notes Icon Visual Studio 2017 15.6.3 版服務更新Visual Studio 2017 version 15.6.3 Servicing Update

於 2018 年 3 月 19 日發行released on March 19, 2018

.NET Core 的 Microsoft 資訊安全諮詢 Microsoft Security Advisories for .NET Core

**CVE-2018-0875:**Microsoft 知悉 .NET Core 公開版本中有安全性弱點,也就是惡意檔案或 Web 要求可能引起拒絕服務 (DoS) 攻擊。CVE-2018-0875: Microsoft is aware of a security vulnerability in the public versions of .NET Core where a malicious file or web request could cause a denial of service (DoS) attack.

重要

建議系統管理員將 .NET Core 執行階段的版本更新到 1.0.10、1.1.7 或 2.0.6。System administrators are advised to update their .NET Core runtimes to versions 1.0.10, 1.1.7 or 2.0.6. 建議開發人員將 .NET Core SDK 的版本更新到 1.1.8 或 2.1.101。Developers are advised to update their .NET Core SDK to versions 1.1.8 or 2.1.101.

這些是在此版本中解決的客戶回報問題:These are the customer-reported issues addressed in this release:


Release Notes Icon Visual Studio 2017 15.6.4 版服務更新 Visual Studio 2017 version 15.6.4 Servicing Update

於 2018 年 3 月 22 日發行released on March 22, 2018

這些是在此版本中解決的客戶回報問題:These are the customer-reported issues addressed in this release:


Release Notes Icon Visual Studio 2017 15.6.5 版服務更新 Visual Studio 2017 version 15.6.5 Servicing Update

於 2018 年 4 月 4 日發行released on April 4, 2018

這些是在此版本中解決的客戶回報問題:These are the customer-reported issues addressed in this release:


Release Notes Icon Visual Studio 2017 15.6.6 版服務更新 Visual Studio 2017 version 15.6.6 Servicing Update

於 2018 年 4 月 10 日發行released on April 10, 2018

本版更新摘要Summary of Updates in this Release

針對 Microsoft Visual Studio資訊洩漏弱點的 Microsoft 資訊安全摘要報告 Microsoft Security Advisories for Microsoft Visual Studio Information Disclosure Vulnerability

CVE-2018-1037: 當 Visual Studio 在編譯程式資料庫 (PDB) 檔案時,若不當地洩漏未初始化記憶體的限制內容,便會存在資訊洩漏弱點。CVE-2018-1037: An information disclosure vulnerability exists when Visual Studio improperly discloses limited contents of uninitialized memory while compiling program database (PDB) files. 攻擊者可以利用此資訊洩漏,藉由編譯 PDB 檔案的 Visual Studio 執行個體,以檢視未初始化的記憶體。An attacker who took advantage of this information disclosure could view uninitialized memory from the Visual Studio instance used to compile the PDB file.

攻擊者若要利用這項弱點,就需要使用有弱點的 Visual Studio 版本來存取受影響的 PDB 檔案。To take advantage of the vulnerability, an attacker would require access to an affected PDB file created using a vulnerable version of Visual Studio. 攻擊者無法強制開發人員產生此資訊洩漏。An attacker would have no way to force a developer to produce this information disclosure.

安全性更新會修正編譯專案時產生 PDB 檔案的方式,以彌補此弱點。The security update addresses the vulnerability by correcting how PDB files are generated when a project is compiled.

重要

如需詳細資訊,請參閱 CVE-2018-1037 的安全性更新。For more information, see the security update for CVE-2018-1037.

這些是在此版本中解決的客戶回報問題:These are the customer-reported issues addressed in this release:

  • 此發行版本解決了下列問題:初次載入方案時,有些 Application Insights 使用者看不到 CodeLens 要求與例外狀況指示器。This release addresses an issue where some Application Insights users were not seeing CodeLens requests and exceptions indicators when the solution first loads.

已知問題Known Issues

查看 Visual Studio 2017 15.6 版中所有現有的已知問題和可用的因應措施。See all existing known issues and available workarounds in Visual Studio 2017 version 15.6.

Visual Studio 2017 Known Issues


意見反應Feedback

請提供您的意見!We’d love to hear from you! 若有任何問題,請透過安裝程式或 Visual Studio IDE 本身右上角的回報問題選項來通知我們。For issues, let us know via the Report a Problem option in the upper right-hand corner of either the installer or the Visual Studio IDE itself. 必須提供The Feedback Icon 圖示位在右上角。icon is located in the upper right-hand corner. 您可以在 Visual Studio 開發人員社群 (英文) 追蹤您的問題,也可以在那裡詢問問題和尋找解答。You can track your issues in the Visual Studio Developer Community, where you can ask questions and find answers. 您也可以透過 UserVoice (英文) 提供產品建議,或透過即時聊天支援取得免費的安裝協助。You can also make a product suggestion through UserVoice or get free installation help through our Live Chat support.


部落格Blogs

善用「開發人員工具部落格」網站中的見解與建議,讓您能夠隨時取得所有新版本的最新資訊,以及涵蓋各類功能的深入探討文章。Take advantage of the insights and recommendations available in the Developer Tools Blogs site to keep you up-to-date on all new releases and include deep dive posts on a broad range of features.

Developer Tools Blogs


Visual Studio 2017 版本資訊歷程記錄Visual Studio 2017 Release Notes History

您可以檢視舊版的 Visual Studio 2017 版本資訊:You can view prior versions of Visual Studio 2017 release notes:


頁首
Top of Page