Visual Studio Icon Visual Studio 2019 16.7 版的版本資訊Visual Studio 2019 version 16.7 Release Notes



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


按一下按鈕以下載最新版的 Visual Studio 2019。Click a button to download the latest version of Visual Studio 2019. 如需安裝和更新 Visual Studio 2019 的指示,請參閱將 Visual Studio 2019 更新至最新版本For instructions on installing and updating Visual Studio 2019, see the Update Visual Studio 2019 to the most recent release. 此外,請參閱如何離線安裝上的指示。Also, see instructions on how to install offline.

Community Download Button Professional Download Button Enterprise Download Button


Visual Studio 2019 16.7 版的新功能What's New in Visual Studio 2019 version 16.7

支援時間範圍Support Timeframe

Visual Studio 2019 16.7 版是 Visual Studio 2019 第三個支援的服務基準。Visual Studio 2019 version 16.7 is the third supported servicing baseline for Visual Studio 2019. 我們鼓勵需要採用長期穩定且安全開發環境的 Enterprise 和 Professional 客戶在此版本上進行標準化。Enterprise and Professional customers needing to adopt a long term stable and secure development environment are encouraged to standardize on this version.   依照我們生命週期與支援原則中的詳細資訊所述,16.7 版將在下一個服務基準發行後支援一年的修正與安全性更新。As explained in more detail in our lifecycle and support policy, version 16.7 will be supported with fixes and security updates for one year after the release of the next servicing baseline.

此外,因已推出 16.7 版,所以 16.4 版 (即上一版本的服務基準),將再支援 12 個月,並於 2021 年 10 月停止支援。In addition, now that version 16.7 is available, version 16.4, which was the last servicing baseline, will be supported for an additional 12 months and will go out of support in October 2021. 也請注意,16.5 和16.6 版不再受到支援。Note as well that versions 16.5 and 16.6 are no longer under support either. 這些中繼版本只會在下一次的次要更新發行之前收到服務修正。These intermediary releases received servicing fixes only until the next minor update released.

您可以在 my.visualstudio.com 下載區段中取得最安全的 Visual Studio 2019 16.7 版。You can acquire the latest most secure version of Visual Studio 2019 version 16.7 in the downloads section of my.visualstudio.com.   如需 Visual Studio 所支援基準的詳細資訊,請參閱 Visual Studio 2019 的支援原則For more information about Visual Studio supported baselines, please review the support policy for Visual Studio 2019.

Visual Studio 2019 16.7 版Visual Studio 2019 version 16.7 Releases

Visual Studio 2019 封存版本資訊Visual Studio 2019 Archived Release Notes

Visual Studio 2019 部落格Visual Studio 2019 Blog

Visual Studio 2019 部落格 是由 Visual Studio 工程小組發行的官方產品見解。The Visual Studio 2019 Blog is the official source of product insight from the Visual Studio Engineering Team. 您可以在下列文章中找到有關 Visual Studio 2019 版的深入資訊:You can find in-depth information about the Visual Studio 2019 releases in the following posts:


Release Notes Icon Visual Studio 2019 16.7.10 版Visual Studio 2019 version 16.7.10 New release icon

發行於 2021 年 1 月 12 日released January 12, 2021

在此 Visual Studio 2019 16.7.10 版的發行版本中In this Release of Visual Studio 2019 version 16.7.10

資訊安全諮詢注意事項Security Advisory Notice

CVE-2021-1651 / CVE-2021-1680診斷中樞標準收集器服務權限提高弱點 CVE-2021-1651 / CVE-2021-1680 Diagnostics Hub Standard Collector Service Elevation of Privilege Vulnerability

當診斷中樞標準收集器未正確處理資料作業時,即會存在權限提升弱點。An elevation of privilege vulnerability exists when the Diagnostics Hub Standard Collector incorrectly handles data operations.

CVE-2020-26870 Visual Studio 安裝程式遠端程式碼執行弱點 CVE-2020-26870 Visual Studio Installer Remote Code Execution Vulnerability

當 Visual Studio 安裝程式嘗試顯示惡意 Markdown 時,即會存在遠端程式碼執行弱點。A remote code execution vulnerability exists when the Visual Studio Installer attempts to show malicious markdown.

CVE-2021-1723 .NET Core 及 Visual Studio 拒絕服務弱點 CVE-2021-1723 .NET Core and Visual Studio Denial of Service Vulnerability

Kestrel 的實作中有拒絕服務弱點。A denial of service vulnerability exists in the implementation of Kestrel.


Release Notes Icon Visual Studio 2019 16.7.9 版Visual Studio 2019 version 16.7.9

發行於 2020 年 12 月 8 日released December 08, 2020

在此 Visual Studio 2019 16.7.9 版的發行版本中In this Release of Visual Studio 2019 version 16.7.9

資訊安全諮詢注意事項Security Advisory Notice

CVE-2020-17156 Visual Studio 遠端程式碼執行弱點 CVE-2020-17156 Visual Studio Remote Code Execution Vulnerability

當 Visual Studio 複製惡意存放庫時,就會存在遠端程式碼執行弱點。A remote code execution vulnerability exists when Visual Studio clones a malicious repository.


Release Notes Icon Visual Studio 2019 16.7.8 版Visual Studio 2019 version 16.7.8

2020 年 11 月 10 日發行released November 10, 2020

在此 Visual Studio 2019 16.7.8 版的發行版本中In this Release of Visual Studio 2019 version 16.7.8

資訊安全諮詢注意事項Security Advisory Notice

CVE-2020-17100 Visual Studio 竄改弱點 CVE-2020-17100 Visual Studio Tampering Vulnerability

當適用於 Visual Studio 的 Python 工具建立 [python27] 資料夾時,會存在竄改弱點。A tampering vulnerability exists when the Python Tools for Visual Studio creates the python27 folder. 攻擊者若成功探索此弱點,即可在權限提升的內容中執行處理序。An attacker who successfully exploited this vulnerability could run processes in an elevated context.



Release Notes Icon Visual Studio 2019 16.7.7 版Visual Studio 2019 version 16.7.7 New release icon

發行於 2020 年 10 月 27 日released October 27, 2020

在此版 Visual Studio 2019 16.7.7 版中In this Release of Visual Studio 2019 version 16.7.7



Release Notes Icon Visual Studio 2019 16.7.6 版Visual Studio 2019 version 16.7.6

發行於 2020 年 10 月 13 日released October 13, 2020

在此版 Visual Studio 2019 16.7.6 版中In this Release of Visual Studio 2019 version 16.7.6



Release Notes Icon Visual Studio 2019 16.7.5 版Visual Studio 2019 version 16.7.5

2020 年 9 月 29 日發行released September 29, 2020

在此 Visual Studio 2019 16.7.5 版中In this Release of Visual Studio 2019 version 16.7.5



Release Notes Icon Visual Studio 2019 16.7.4 版Visual Studio 2019 version 16.7.4

2020 年 9 月 21 日發行released September 21, 2020

在此 Visual Studio 2019 16.7.4 版本中In this Release of Visual Studio 2019 version 16.7.4


  • 新增 Xcode 12.0 GM 支援。Adds Xcode 12.0 GM support.
  • 新增在 Info.plist 編輯器中將某個色彩集設定為輔色的支援。Adds support for setting a Color set as Accent Color in the Info.plist editor.

Release Notes Icon Visual Studio 2019 版本 16.7.3Visual Studio 2019 version 16.7.3

2020 年 9 月 8 日發行released September 08, 2020

在此 Visual Studio 2019 16.7.3 版本中In this Release of Visual Studio 2019 version 16.7.3


資訊安全諮詢注意事項Security Advisory Notice

CVE-2020-1130 診斷中樞標準收集器權限提升弱點 CVE-2020-1130 Diagnostics Hub Standard Collector Elevation of Privilege Vulnerability

當診斷中樞標準收集器未正確處理資料作業時,即會存在權限提升弱點。An elevation of privilege vulnerability exists when the Diagnostics Hub Standard Collector improperly handles data operations. 攻擊者若成功探索此弱點,即可在權限提升的內容中執行處理序。An attacker who successfully exploited this vulnerability could run processes in an elevated context.

CVE-2020-1133 診斷中樞標準收集器服務權限提升弱點 CVE-2020-1133 Diagnostics Hub Standard Collector Elevation of Privilege Vulnerability

當診斷中樞標準收集器未正確處理檔案作業時,即會存在權限提升弱點。An elevation of privilege vulnerability exists when the Diagnostics Hub Standard Collector improperly handles file operations. 攻擊者若成功探索此弱點,即可在權限提升的內容中執行處理序。An attacker who successfully exploited this vulnerability could run processes in an elevated context.

CVE-2020-16856 Visual Studio 遠端程式碼執行弱點 CVE-2020-16856 Visual Studio Remote Code Execution Vulnerability

當 Visual Studio 未正確處理記憶體中的物件時,即會存在遠端程式碼執行弱點。A remote code execution vulnerability exists in Visual Studio when it improperly handles objects in memory. 成功惡意探索弱點的攻擊者可以在目前使用者的內容中執行任意程式碼。An attacker who successfully exploited the vulnerability could run arbitrary code in the context of the current user.

CVE-2020-16874 Visual Studio 遠端程式碼執行弱點 CVE-2020-16874 Visual Studio Remote Code Execution Vulnerability

當 Visual Studio 未正確處理記憶體中的物件時,即會存在遠端程式碼執行弱點。A remote code execution vulnerability exists in Visual Studio when it improperly handles objects in memory. 成功惡意探索弱點的攻擊者可以在目前使用者的內容中執行任意程式碼。An attacker who successfully exploited the vulnerability could run arbitrary code in the context of the current user.

CVE-2020-1045 Microsoft ASP.NET Core 安全性功能略過弱點 CVE-2020-1045 Microsoft ASP.NET Core Security Feature Bypass Vulnerability

Microsoft ASP.NET Core 剖析已編碼 Cookie 名稱的方式有安全性功能略過弱點。A security feature bypass vulnerability exists in the way Microsoft ASP.NET Core parses encoded cookie names. ASP.NET Core Cookie 剖析器會將整個 Cookie 字串解碼,這可能會讓惡意攻擊者設定以百分比將名稱編碼的第二個 Cookie。The ASP.NET Core cookie parser decodes entire cookie strings which could allow a malicious attacker to set a second cookie with the name being percent encoded.

此版本修正的其他問題Additional Issues Fixed in this Release

  • 已修正使用模式比對的 switch 陳述式或 switch 運算式會發生編譯器損毀的問題。Fixed a compiler crash for switch statements or switch expressions that use pattern matching.
  • 已透過終止測試回合來還原單元測試的 [停止偵錯 (Shift+F5)] 工作流程。Restored the "Stop Debugging(Shift +F5)" workflow for Unit Testing by terminating the test run.
  • 防止在 WinForms .NET Core 設計工具包含未儲存的變更時,切換專案設定會導致 VS 損毀的問題。Prevent VS crash on switching project configuration when WinForms .NET Core designer has unsaved changes.
  • 若已從 VS 安裝程式中移除,則不受支援的 .NET Core 版本將不會再於修復或升級期間重新安裝。Out of support versions of .NET Core will no longer be reinstalled during a repair or upgrade if they were removed outside of VS setup.
  • 修正無法於 [在檔案中尋找] 內正確搜尋外部相依性的問題。Fixed an issue where External Dependencies weren't accurately searched in Find in Files.
  • 在 [方案總管] 操作功能表的 Git 子功能表中重新引入 [認可…] 按鈕。Reintroduced the "Commit..." button in the Git submenu in Solution Explorer's context menu.
  • 已修正造成 TFVC 簽入提示標籤遭到隱藏的 Bug。Fixed a bug that caused the TFVC Check-in Notes label to be invisible.
  • 修正搭配多個目標 Framework 在 SDK 樣式 csproj 中使用 WinForm 設計工具時造成損毀的問題。Fix crash when using WinForm designer in SDK-style csproj with multiple target frameworks.
  • 已修正 <d:Style.DataContext> 於其中報告無效標記錯誤的問題。Fixed issue where <d:Style.DataContext> was reporting an invalid markup error.

Visual Studio 2019 版本 16.7.3 中已修正的開發人員社群主要問題Top Issues Fixed from Developer Community in Visual Studio 2019 version 16.7.3


Release Notes Icon Visual Studio 2019 16.7.2 版Visual Studio 2019 version 16.7.2

2020 年 8 月 18 日發行released August 18, 2020

在此 Visual Studio 2019 16.7.2 版本中In This Release of Visual Studio 2019 version 16.7.2


Visual Studio 2019 16.7.2 版中修正的開發人員社群主要問題Top Issues Fixed from Developer Community in Visual Studio 2019 version 16.7.2


Release Notes Icon Visual Studio 2019 16.7.1 版Visual Studio 2019 version 16.7.1

發行於 2020 年 8 月 11 日released August 11, 2020

在 Visual Studio 2019 16.7.1 此版本中In This Release of Visual Studio 2019 version 16.7.1


Visual Studio 2019 16.7.1 版中修正的開發人員社群主要問題Top Issues Fixed from Developer Community in Visual Studio 2019 version 16.7.1


Release Notes Icon Visual Studio 2019 16.7.0 版Visual Studio 2019 version 16.7.0

發行於 2020 年 8 月 5 日released August 5, 2020

在 Visual Studio 2019 16.7.0 此版本中In This Release of Visual Studio 2019 version 16.7.0


C++C++

  • 遠端 C++ 支援現在支援更廣泛的 Linux distro 與 Shell,包括 sh、csh、bash、tsch、ksh、zsh 與 dash。Our remote C++ support now supports a wider range of Linux distros and shells, including sh, csh, bash, tsch, ksh, zsh, and dash. 您可透過 ConnectionManager.exe 來修改新的 "shell" 屬性,以覆寫遠端連線的 shell 選擇。You can override the choice of a shell for a remote connection by modifying the new "shell" property via ConnectionManager.exe. 這項支援已使用以遠端 Linux 系統或 WSL 為目標的 MSBuild 型 Linux 專案與 CMake 專案來進行測試。This support has been tested with both MSBuild-based Linux projects and CMake projects targeting a remote Linux system or WSL.
  • 您現在可使用 Ninja (非常快速地評估累加建置的建置系統),以改善 MSBuild 型 Linux 專案的累加建置時間。You can now use Ninja (a build system that evaluates incremental builds very quickly) to improve incremental build times for MSBuild-based Linux projects. 您可透過在 [一般] 屬性頁中,將 [啟用累加建置] 設定為 [使用 Ninja],以選擇使用這項功能。You can opt into this feature by setting "Enable Incremental Build" to "With Ninja" in the General Property Page. Ninja (Ninja 式建置) 必須安裝在遠端 Linux 系統或 WSL 上。Ninja (ninja-build) must be installed on your remote Linux system or WSL.
  • 實作了新的 C++20 標準程式庫功能。New C++20 Standard Library features have been implemented. 如需詳細清單,請參閱 GitHub 上的 STL 變更記錄Please refer to the STL Changelog on GitHub for a detailed list.
  • 您現可在連線管理員中編輯和設定預設的遠端 SSH 連線。You can now edit and set default remote SSH connections in the Connection Manager. 這表示您可以編輯現有的遠端連線 (例如其 IP 位址變更時),並在 CMakeSettings.json 和 launch.vs.json 中設定要使用的預設連線。This means you can edit an existing remote connection (e.g. if its IP address changed) and set default connections to be consumed in CMakeSettings.json and launch.vs.json. 遠端 SSH 連線可讓您直接在 Visual Studio 中,建置及偵錯位於遠端 Linux 系統的 C++ 專案。Remote SSH connections allow you to build and debug C++ projects on a remote Linux system directly from Visual Studio.
Edit remote connections in the Connection Manager
在連線管理員中編輯遠端連線Edit remote connections in the Connection Manager
  • 在 Visual Studio 中增強了 Windows 上的 Clang (clang-cl) IntelliSense 支援。Enhanced IntelliSense support for Clang on Windows (clang-cl) in Visual Studio. Clang 的 include 路徑現在包含 clang 程式庫,我們改善了使用 std 程式庫時的編輯器內波浪線顯示,並且在 clang 模式中新增了 C++2a 的支援。The clang include path now includes the clang libraries, we've improved in-editor squiggle display when using the std library, and we've added support for C++2a in clang mode.
  • 您現在可以嘗試將程式碼錯誤加上底線,並在 C++ 專案中查看更多建議的快速修正。You can now try out underlining code errors and see more suggested quick fixes in C++ projects.  若要啟用此功能,請在 [工具] > [選項] > [文字編輯器] > [C/C++] > [實驗性] 底下,將 [Disable Experimental Code Linter] (停用實驗程式碼 Linter) 設定為 False。Enable this feature under Tools > Options > Text Editor > C/C++ > Experimental > Set 'Disable Experimental Code Linter' to false. 前往 C++ 小組部落格深入了解。Learn more on the C++ Team Blog.
IntelliSense code linter
IntelliSense 程式碼 LinterIntelliSense code linter
  • 新增了四個新的程式碼分析規則,以在 C++ 加入額外的安全性功能:C26817C26818C26819C26820We've added four new code analysis rules to incorporate additional safety features into C++: C26817, C26818, C26819, and C26820.
  • 我們已針對在具有 gdbserver 的遠端系統上對 CMake 專案進行偵錯新增第一級支援。We've added first-class support for debugging CMake projects on remote systems with gdbserver.
  • 在 Visual Studio 中使用適用於 C++ 之 AddressSanitizer 的實驗性實作 (現已可供 x64 原生專案使用),輕鬆地找出記憶體損毀錯誤。Find memory corruption errors easily with an experimental implementation of AddressSanitizer for C++ in Visual Studio, now available for x64 native projects. 我們現在也支援使用偵錯執行階段 (/MTd、/MDd、/LDd)。We also now support the use of debug runtimes (/MTd, /MDd, /LDd).
  • IntelliSense 現已提供概念、指定初始設定式,以及其他數個 C++20 功能的基本支援。IntelliSense now has basic support for Concepts, designated initializers, and several other C++20 features.
  • .ixx 與 .cppm 檔案現已識別為 C++,而且語法螢光筆與 IntelliSense 也會將其當成 C++ 處理。.ixx and .cppm files are now recognised as C++ and will be treated as such by the syntax highlighter and IntelliSense.

以動態方式定義播放清單Define playlists dynamically

您現在可以根據 [專案]、[類別] 或 [命名空間] 以動態方式定義播放清單。You can now define playlists dynamically based on Project, Class, or Namespace. 這表示您可以設定播放清單以包含特定專案/類別/命名空間中的所有內容;任何新增至該群組的新測試都會自動包含到您的播放清單中!This means you can configure a playlist to include everything in a certain project/class/namespace; any new test added to that group will automatically be included in your playlist!

  • 在 [測試總管] 中以滑鼠右鍵按一下專案、命名空間或類別群組來建立播放清單。Create a playlist by right clicking on a project, namespace, or class grouping in the Test Explorer.
Test Explorer: Create a playlist
測試總管:建立播放清單Test Explorer: Create a playlist
  • 按一下工具列中的 [編輯] 按鈕來編輯要包含在播放清單中的群組。Edit what groups are included in the playlist by clicking on the edit button in the tool bar. 核取方塊將會隨即出現。Check boxes will appear. 視需要編輯群組。Edit groups as desired.
Test Explorer: Edit a playlist
測試總管:編輯播放清單Test Explorer: Edit a playlist
  • 這些播放清單不會成為靜態的測試清單,而是會根據規則以動態方式更新。Instead of being a static list of tests these playlists dynamically update based on rules. 如果您想要深入了解產生您動態播放清單的規則,請使用 [儲存] 按鈕將動態清單檔案儲存到磁碟,並在所產生的 xml 中檢視規則。If you want to better understand what rules are generating your dynamic playlist, save the playlist file to disk with the save button and view the rules generated in the xml.
PlayList file dynamic rule set
PlayList 檔案動態規則集PlayList file dynamic rule set
  • 您可以繼續包含/排除個別的測試,而播放清單將能夠更新其動態規則,或切換回以靜態清單的形式追蹤測試。You can continue to include/exclude individual tests and the playlist will be able to either update its dynamic rules or switch back to keeping track of tests as a static list. 您也可以透過直接編輯播放清單 xml 檔案來使用特性以定義動態群組。You can also use traits to define a dynamic group by editing the playlist xml file directly.

Git 生產力Git Productivity

開啟 [工具] | [選項] | [環境] 中的 [New Git user experience] (新增 Git 使用者體驗)'' 預覽功能來體驗此功能。Toggle on the 'New Git user experience' Preview Feature in Tools | Options | Environment to use this experience.

  • 從任何資料夾或全新資料夾開始建立新的 Git 存放庫Create a new Git repository, starting from any folder or a brand new folder
  • 在開始新的複製作業之前,先儲存並關閉已開啟的資料夾或解決方案Save and close an open folder or solution before starting a new clone operation
  • 在認可文字方塊中清楚檢視認可或隱藏訊息的錯誤View commit or stash message errors clearly in the commit text box
  • 在 Git 存放庫視窗的樹狀檢視中,檢視及管理 Git 分支View and manage Git branches in a tree view within a new Git Repository window
  • 在 Git 存放庫視窗中,於每個分支的歷程記錄圖之間切換並與其互動Switch between and interact with the history graph of each branch in the Git Repository window
  • 在 Git 存放庫視窗中檢視傳入與傳出認可View incoming and outgoing commits in the Git Repository window
  • 內含最新功能詳細資料的 Git 生產力小組部落格 (英文)Git Productivity team blog with more details of recent features
Manage branches and view history in a focused Git Repository window
在焦點 Git 存放庫視窗中管理分支及檢視歷程記錄Manage branches and view history in a focused Git Repository window

透過聚焦於 Git 的合併編輯器,使用以下方式解決合併衝突:Resolve merge conflicts with a Git focused merge editor using:

  • 包含合併衝突的檔案資訊列會提示您開啟合併編輯器An info bar in files containing merge conflicts that prompts you to open the merge editor
  • 合併編輯器中的標題和說明提供更多資訊,也較不雜亂More informative titles and captions, and less clutter in the merge editor
  • 衝突中的差異會與對應的程式碼對齊,顯示文字層級的差異,並會在差異只在於空白字元時,顯示可見的空白字元。Diffs within conflicts that align matching lines, show word level differences, and display visible whitespace when it is the only difference.
  • 檔案層級新增/新增衝突的雙向合併Two-way merges for file level add/add conflicts
  • 只要按一下,就能以其中一邊為主,解決所有衝突The ability to resolve all conflicts to one side or the other with a single click
  • 有切換按鈕可以只專注於衝突,而忽略不衝突的差異A toggle to focus on just conflicts, ignoring non-conflicting differences
New Merge Editor Experience
使用合併編輯器解決合併衝突Resolve Merge Conflicts with the Merge Editor

JavaScript/TypeScriptJavaScript/TypeScript

  • 已更新 [完成] 和 [快速諮詢] 的實作,以為 LiveShare 案例提供更佳支援。The implementations of Completion and Quick Info have been updated to better support LiveShare scenarios.

Local Process with KubernetesLocal Process with Kubernetes

Local Process with Kubernetes
Local Process with KubernetesLocal Process with Kubernetes

Local Process with Kubernetes 讓您能在其餘應用程式或服務都連線到 Kubernetes 叢集時,在開發工作站上撰寫、測試及偵錯您的 .NET 程式碼。Local Process with Kubernetes allows you to write, test and debug your .NET code on your development workstation while connected to your Kubernetes cluster with the rest of your application or services. 將開發工作站連線到叢集,您就不需要在開發電腦上手動執行和設定相依服務。By connecting your development workstation to your cluster, you eliminate the need to manually run and configure dependent services on your development machine. 您在本機執行的微服務程式碼可以使用來自叢集的環境變數、連接字串和磁碟區。Environment variables, connection strings and volumes from the cluster are available to your microservice code running locally. 不需要增加額外的資產,例如 Dockerfile 或 Kubernetes 資訊清單。There is no need for extra assets, such as a Dockerfile or Kubernetes manifests. 您只要像平常一樣執行、偵錯和測試 .NET 程式碼即可。Run, debug, and test your .NET code as you normally would.

若要啟用 Local Process with Kubernetes,請前往 [工具] > [選項] > [環境] > [預覽功能],然後選取 [啟用 Kubernetes 服務的本機偵錯]。To enable Local Process with Kubernetes, go to Tools > Options > Envrionment > Preview Features and select "Enable local debugging for Kubernetes services".

Enable Preview Features
啟用預覽功能Enable Preview Features

若是 .NET 主控台應用程式,則需要額外的步驟。For .NET console applications, an additional step is required. 請安裝 "Microsoft.VisualStudio.Azure.Kubernetes.Tools.Targets" Nuget 套件。Install the "Microsoft.VisualStudio.Azure.Kubernetes.Tools.Targets" Nuget Package.

.NET 生產力.NET Productivity

當隱藏項目運算子存在但沒有效果時,現在即會有警告與程式碼修正。There is now a warning and code fix when a suppression operator is present but has no effect. 亦可使用建議正確否定運算式的第二個程式碼。A second code fix suggesting the correct negating expression is also available. 將游標放在隱藏項目運算子上。Place your cursor on the suppression operator. 按下 (Ctrl+ + . ),以觸發 [快速動作與重構] 功能表。Press (Ctrl + .) to trigger the Quick Actions and Refactorings menu. 接著,選取下列其中一項:Next, select from one of the following:

  • 若要完全移除運算子,請選取 [移除運算子 (保留語意)]:To remove the operator completely, select Remove operator (preserves semantics):
Code fix to remove suppression operator
程式碼修正以移除隱藏項目運算子Code fix to remove suppression operator
  • 若要否定該運算式,請選取 [否定運算式 (變更語意)]:To negate the expression, select Negate expression (change semantics):
Code fix to negate expression
程式碼修正以否定運算式Code fix to negate expression
  • 若其可在專案中使用,則也可使用新的 C# 9 not 模式:You can also negate the expression with the new C# 9 not pattern if it is available in your project:
Code fix to negate expression using not
使用 not 的程式碼修正來否定運算式Code fix to negate expression using not

現在當在類型中產生函式時可產生屬性。You can now generate properties when generating a constructor in a type. 將游標放在執行個體上。Place your cursor on the instance. 按下 (Ctrl+ + . ),以觸發 [快速動作與重構] 功能表。Press (Ctrl + .) to trigger the Quick Actions and Refactorings menu. 選取 [在 <QualifiedName> 中產生函式 (包含屬性)]。Select Generate constructor in <QualifiedName> (with properties).

Generate properties when generating constructor
當產生函式時產生屬性Generate properties when generating constructor
  • 快速諮詢現在會一併顯示診斷識別碼與說明連結,讓您輕鬆導覽至我們的文件,深入了解程式碼中的警告和錯誤。Quick Info now displays the diagnostic ID along with a help link where you can easily navigate to our documentation to learn more about warnings and errors in your code.
Quick Info Diagnostic ID and Help Link
快速諮詢診斷識別碼和說明連結Quick Info Diagnostic ID and Help Link
  • 現在已有快速動作可將偵錯工具顯示屬性新增至類別。There is now a quick action to add a debugger display attribute to a class. 這可讓您將偵錯工具內的屬性以程式設計方式釘選到您的程式碼中。This allows you to pin properties within the debugger programmatically in your code. 將游標放在類別名稱上。Place your cursor on the class name. 按下 (Ctrl+ + . ),以觸發 [快速動作與重構] 功能表。Press (Ctrl+.) to trigger the Quick Actions and Refactorings menu. 選取 [新增 ‘DebuggerDisplay` 屬性]。Select Add ‘DebuggerDisplay` attribute. 這會將偵錯工具 Display 屬性新增到類別的頂端,並產生會傳回 ToString() 的 Auto 方法,您可以加以編輯以傳回您想要在偵錯工具中釘選的屬性值。This will add the debugger display attribute to the top of your class and generate an auto method that returns ToString() which you can edit to return the property value you want pinned in the debugger.
Add Debugger Display Attribute
新增 Debugger Display 屬性Add Debugger Display Attribute
  • 現已有適用於對相同變數之意外指派或比較的程式碼修正。There is now a code fix for accidental assignments or comparisons to the same variable. 將游標放在警告上。Place your cursor on the warning. 按下 (Ctrl+ + . ),以觸發 [快速動作與重構] 功能表。Press (Ctrl+.) to trigger the Quick Actions and Refactorings menu. 針對意外指派,請選取 [指派至 .value]。For accidental assignments, select Assign to .value. 針對意外比較,請選取 [比較 .value]。For accidental comparisons, select Compare to .value.
Accidental Assignments Code Fix
意外指派程式碼修正Accidental Assignments Code Fix
Accidental Comparisons Code Fix
意外比較程式碼修正Accidental Comparisons Code Fix
  • 您現在可以針對實作 IComparable 的類型產生比較運算子。You can now generate comparison operators for types that implement IComparable. 將游標放在類別內或 IComparable 上。Place your cursor either inside the class or on IComparable. 按下 (Ctrl+ + . ),以觸發 [快速動作與重構] 功能表。Press (Ctrl+.) to trigger the Quick Actions and Refactorings menu. 選取 [產生比較運算子]。Select Generate comparison operators. 系統將會為您產生具有比較運算子的未定案區段。A boiler plate will be generated for you with the comparison operators.
Generate Comparison Operators
產生比較運算子Generate Comparison Operators
  • 您現在可以在針對結構產生 .Equals 時產生 IEquatable 運算子。You can now generate IEquatable operators when generating .Equals for structs. 我們已經針對適用於實值類型的 [產生 Equals 與 GetHashCode] 具有重構。We already had a refactoring to Generate Equals and GetHashCode for value types. 現在針對結構,我們將會為您自動新增 IEquatable,以及等於和不等於運算子。Now with structs we will automatically add the IEquatable as well as the equals and not equals operators for you. 將游標放在結構內。Place your cursor within the struct. 按下 (Ctrl+ + . ),以觸發 [快速動作與重構] 功能表。Press (Ctrl+.) to trigger the Quick Actions and Refactorings menu. 選取 [產生 Equals(object)]。Select Generate Equals(object).
Generate IEquatable Operators
產生 IEquatable 運算子Generate IEquatable Operators
  • 您現在可以針對所有未使用的建構函式參數建立及指派屬性或欄位。You can now create and assign properties or fields for all unused constructor parameters. 我們已經有可讓您針對個別參數執行此動作的快速動作,但現在您可以同時對所有未使用的參數這麼做。We already had a quick action that allowed you to do this on an individual parameter, but now you can do it for all unused parameters at once. 將游標放在任何剩餘的參數上。Place your cursor on any of the remaining parameters. 按下 (Ctrl+ + . ),以觸發 [快速動作與重構] 功能表。Press (Ctrl+.) to trigger the Quick Actions and Refactorings menu. 若要建立並初始化屬性,請選取 [建立其餘項目並將其指派為屬性]。To create and initialize properties, select Create and assign remaining as properties. 若要建立並初始化欄位,請選取 [建立其餘項目並將其指派為欄位]。To create and initialize fields, select Create and assign remaining as fields.
Create and Assign Remaining Fields
建立並指派其餘欄位Create and Assign Remaining Fields
Create and Assign Remaining Properties
建立並指派其餘屬性Create and Assign Remaining Properties
  • 在 DateTime 和 TimeSpan 字串常值中,現在已有 IntelliSense 完成。There is now IntelliSense completion in DateTime and TimeSpan string literals. 將游標放在 DateTime 或 TimeSpan 字串常值內,然後按 (Ctrl+空格鍵)。Place your cursor inside the DateTime or TimeSpan string literal and press (Ctrl+Space). 您接著將會看到完成選項,以及每個字元所代表之意思的說明。You will then see completion options and an explanation as to what each character means. 系統會同時提供日期時間格式和範例。Both the date time format and an example will be provided.
IntelliSense Completion in DateTime and TimeSpan
DateTime 和 TimeSpan 字串常值中的 IntelliSense 完成IntelliSense Completion in DateTime and TimeSpan string literals
  • 您現在可以在 [變更簽章] 對話方塊內新增參數。You can now add a parameter within the Change Signature dialog. 將游標放在方法的簽章內。Place your cursor within the method’s signature. 按下 (Ctrl+ + . ),以觸發 [快速動作與重構] 功能表。Press (Ctrl+.) to trigger the Quick Actions and Refactorings menu. 選取 [變更簽章]。Select Change signature. 下列對話方塊將會隨即開啟,且您現在可以在其中選取 [新增] 以新增參數。The following dialog will open where you can now select Add to add a parameter. 在您選取 [新增] 之後,新的 [加入參數] 對話方塊將會隨即開啟。Once you select Add, the new Add Parameter dialog will open. [加入參數] 對話方塊可讓您新增類型名稱和參數名稱。The Add Parameter dialog allows you to add a type name and a parameter name. 您可以選擇使參數為必要或選擇性且具預設值。You can choose to make the parameter required or optional with a default value. 您可以接著在呼叫位置新增值並為該值選擇具名引數,或是引進 TODO 變數。You can then add a value at the call site and choose a named argument for that value or you can introduce a TODO variable. TODO 變數會將 TODO 放在您的程式碼中,讓您可以瀏覽每個錯誤並個別瀏覽每個呼叫位置,然後決定要傳遞的內容。The TODO variable puts a TODO in your code so you can visit each error and go through each call site independently and decide what to pass. 針對選擇性參數,您可以選擇完全省略呼叫位置。For optional parameters you have the option to omit the call site completely.
Change Signature Dialog
[變更簽章] 對話方塊Change Signature Dialog
Add Parameter Dialog
[加入參數] 對話方塊Add Parameter Dialog
  • 分析器建立者現在可以在使用 NuGet 來傳送其分析器時,使用 CompletionProviders 來進行 IntelliSense 完成。Analyzer authors can now use CompletionProviders for IntelliSense completions when shipping their analyzers with NuGet. 之前,程式庫建立者必須建立個別的 VSIX,因為 CompletionProviders 只能在 VSIX 中使用。Before, library authors would have to create a separate VSIX since CompletionProviders was only available in VSIX. 現在,程式庫建立者可以在其分析器所在的 NuGet 套件中實作 IntelliSense 完成,且不需要個別執行此動作。Now library authors can implement IntelliSense completions in the NuGet package where their analyzers are, and they don’t need to do it separately. 在 NuGet 套件中實作的完成提供者也能夠為個別專案提供特定的建議,且能在支援該功能的每個 IDE 中自動運作。Completion providers implemented in NuGet packages will also provide suggestions specific to individual projects and will automatically work in each IDE supporting the feature.

RazorRazor

透過選取 [啟用實驗性 Razor 編輯器] 預覽功能,試用新實驗性語言伺服器通訊協定 (LSP) 提供技術支援的 Razor 編輯器和所有 Razor 檔案 (.cshtml/.razor)。Try out the new experimental Language Server Protocol (LSP) powered Razor editor with all Razor files (.cshtml/.razor) by selecting the Enable experimental Razor editor preview feature.

測試總管Test Explorer

已將 [執行/偵錯檢視中的所有測試] 新增到 [測試總管]。Run/Debug All Tests In View have been added to the Test Explorer. 這些命令會取代出現在 [測試總管] 中 [執行所有測試] 和 [偵錯所有測試] 命令的所有位置。These commands replace where the Run All Tests and Debug All Tests commands appeared in the Test Explorer. 這項變更釐清這些命令會接受 [測試總管] 的篩選,如此只會執行出現在視窗中的測試。This change clarifies that these commands honor the filters of the Test Explorer so that only tests visible in window are run. 這包含資料行篩選和搜尋方塊篩選。This includes both column filters and search box filters.

Test Explorer Run/Debug All Tests in View commands
測試總管執行/偵錯檢視中的所有測試命令Test Explorer Run/Debug All Tests in View commands

[全域執行/偵錯所有項目] 命令現在只會顯示在最上層的測試功能表中。The Global Run/Debug All commands will now only appear in the top-level Test menu. 其不會再包含在任何測試視窗檢視的 [測試總管] 工具列或操作功能表中。They are no longer included in the Test Explorer toolbar or context menu of any test window view. 從 [測試總管] 觸發時,[分析所有測試的程式碼涵蓋範圍] 現在也會套用到測試視窗檢視。When triggered from the Test Explorer, the Analyze Code Coverage for All Tests now applies to the test window views as well.

快速鍵:Short-cut Keys:

  • Ctrl R、A - 執行所有測試 - 全域命令一律會執行所有測試Ctrl R, A - Run All Test - Global command always runs all tests
  • Ctrl R、V - 執行所有檢視中的測試 - 只有在測試視窗 (測試總管、播放清單、即時單元測試視窗) 為作用中視窗時,這個項目才是有效的命令Ctrl R, V - Run All Tests In View - Only a valid command when a test window (Test Explorer, Playlist, Live Unit Testing Window) are active windows
  • Ctrl R、Ctrl A - 偵錯所有測試 - 全域命令一律會偵錯所有測試Ctrl R, Ctrl A - Debug All Test - Global command always debugs all tests
  • Ctrl R、Ctrl V - 偵錯檢視中的所有測試 - 只有在測試視窗 (測試總管、播放清單、即時單元測試視窗) 為作用中視窗時,這個項目才是有效的命令Ctrl R, Ctrl V - Debug All Tests In View - Only a valid command when a test window (Test Explorer, Playlist, Live Unit Testing Window) are active windows

偵錯工具Debugger

透過原生指標來檢視受控 COM 物件Viewing Managed COM Objects Through Native Pointers

此功能自動解碼原生指標參考的受控 COM 物件,讓您完整檢查 [本機] 視窗中的值。This feature automatically decodes managed COM objects referenced by native pointers allowing you to fully inspect values in the Locals window. 您可以在此處的 Visual Studio 部落格中找到其他詳細資料。You can find more details here at the Visual Studio blog.

程式碼剖析工具Profiler

新的 .NET 效能計數器工具New .NET Performance Counters Tool

.NET Performance Counters Tool
.NET 效能計數器工具.NET Performance Counters Tool

使用 .NET 效能計數器工具,直接從 Visual Studio 分析工具中視覺化 Dotnet 計數器Visualize dotnet counters right from within the Visual Studio Profiler using the .NET Performance Counters Tool. 若要試用工具,請前往 [偵錯] -> [效能分析工具] -> 勾選 [.NET 效能技術器工具]To try out the tool go to Debug -> Performance Profiler -> Checkmark .NET Performance Counters Tool.

XamarinXamarin

  • 已針對使用 Android 配置檔案的使用者所遇到最常見問題類型,引入了程式碼修正程式。Code fixers have been introduced for the most common types of problems experienced by users with Android layout files.
  • Xamarin.Forms 範本選擇體驗現在有更具說明性的新外觀,且彈出式視窗與索引標籤式範本現在會使用 Shell。The Xamarin.Forms template selection experience now has a fresh and more illustrative look, and the Flyout and Tabbed templates now utilize Shell. 請在這裡閱讀 Shell 的相關資訊。Read more about Shell here. 若基於某些原因而不想使用 Shell,請使用空白範本。If for some reason you don't wish to use Shell, use the Blank template.
New Xamarin.Forms template selection experience
選擇 Xamarin.Forms 範本Choosing a Xamarin.Forms template

XAML 工具 (WPF、UWP 與 Xamarin.Forms)XAML Tools (WPF, UWP & Xamarin.Forms)

XAML 熱重新載入:XAML Hot Reload:

  • 應用程式內工具列改善: 我們已進一步縮小應用程式內工具列體驗,這是 WPF 與 UWP 的 XAML 熱重新載入工具工作流程一部分。In-app Toolbar Improvements: We have further refined the in-app toolbar experience that is part of the XAML Hot Reload tooling workflow for WPF & UWP. 變更會包含較短的工具列,使其不再涵蓋執行中的應用程式,而摺疊機制的變更會在按一下時,先摺疊 XAML 熱重新載入文字,然後在第二次按一下時完全摺疊該橫條圖。Changes include a shorter toolbar so that it no longer covers the running application, and a change in the collapse mechanism which when clicked will now collapse the XAML Hot Reload text first, then collapse the bar fully on the second click.

XAML 設計工具:XAML Designer:

  • 已擴充 WPF 與 UWP 的設計階段資料支援: 在此版本中,我們正在引入 WPF .NET Core 與 UWP 開發人員的新設計階段資料功能。Expanded Design-time Data Support for WPF & UWP: In this release we are introducing a new design-time data feature for WPF .NET Core and UWP developers. 此新功能會透過 d: 前置詞,延伸可存取設計階段屬性目前的清單。This new capability will extend the current list of accessible design-time properties through the use of the d: prefix. Xamarin.Forms 開發人員會很熟悉此功能,因為其同樣可以使用 “d:” 前置詞來表示屬性,因此種表示法只在設計階段呈現,且永不編譯至執行的應用程式中,所以用於設計階段 UI 驗證非常安全。This feature will be familiar to Xamarin.Forms developers, as it makes available the same approach of using a “d:” prefix to indicate a property that should only be rendered at design-time and never gets compiled into the running app making it very safe to use for design time UI validation. 在此版本中,我們支援 WPF 與 UWP 全部的現成控制項,並計畫在未來版本中支援協力廠商與自訂控制項。In this release we support all the out-of-the-box controls for WPF and UWP and plan to support 3rd party and custom controls in future releases.
  • XAML 設計工具重新整理按鈕: 我們已在 XAML 設計工具中新增重新整理按鈕,這個新圖示可在接近縮放層級指示器的左下角圖示區域中找到。XAML Designer Refresh Button: We have added a refresh button to the XAML designer, this new icon can be found in the bottom-left icon area near the zoom level indicator. 此重新整理動作會執行關閉設計工具檢視的對等重新設定,並在發生這種稀有情況時重新開啟,以解決轉譯問題。This refresh action does the equivalent reset of closing the designer view and re-opening it for the rare situations where this is required to resolve a rendering issue. 此功能適用於 WPF .NET Core 與 UWP 開發人員。This feature is available for WPF .NET Core and UWP developers.

XAML 程式碼編輯器:XAML Code Editor:

  • 色彩視覺化檢視: 我們已在 WPF .NET Core、WPF .NET Framework 與 Xamarin.Froms 專案的 XAML 程式碼編輯器中,進一步縮小了新的色彩視覺化檢視。Color Visualizer: We have further refined our new color visualizer in the XAML code editor for WPF .NET Core, WPF .NET Framework and Xamarin.Froms projects. 在此版本中,我們新增支持來自資源的色彩視覺化,先前的預覽版本並不支援此功能。In this release we have added support for visualizing colors coming from resources, which was previously not supported in the last preview.
Inline Color Previews in XAML Code Editor
XAML 程式碼編輯器中的內嵌色彩預覽Inline Color Previews in XAML Code Editor

顯示 NuGet 套件中的工具箱項目,但不含套件參考Show Toolbox items from a NuGet package without having a package reference

許多控制項程式庫的作者都希望能在工具箱中顯示控制項,即使目前的專案尚未參考該程式庫也一樣,因為這有助於提高發現能力。Many control library authors want their controls to be seen in the Toolbox even when the current project hasn't referenced the library yet, as this helps with discoverability. WPF .NET Framework SDK 過去使用登錄項目完成這項作業,但 .NET Core 不支援這種方式。WPF .NET Framework SDKs have historically accomplished this using registry entries, but this is not supported by .NET Core. 對於 WPF .NET Core,工具箱現在可以填入 VisualStudioToolsManifest.xml 檔案中的控制項,這些檔案位在 NuGet 後援資料夾的 WPF .NET Core NuGet 套件中。For WPF .NET Core, Toolbox can now be populated with controls from VisualStudioToolsManifest.xml files found within WPF .NET Core NuGet packages in NuGet fallback folders. 如需詳細資訊,請參閱 XAML Designer Extensibility GitHub 存放庫中的文件。For more details, see the documentation in the XAML Designer Extensibility GitHub repo.

Windows FormsWindows Forms

適用於 .NET Core 的 Windows Form 設計工具Windows Forms Designer for .NET Core

適用於 .NET Core 專案的 Windows Form 設計工具現已可用。The Windows Forms designer for .NET Core projects is now available. 若要在 Visual Studio 中啟用該設計工具,請移至 [工具] > [選項] > [環境] > [預覽功能],然後選取 [使用適用於 .NET Core 應用程式的預覽 Windows Form 設計工具] 選項。To enable the designer in Visual Studio, go to Tools > Options > Environment > Preview Features and select the Use the preview Windows Forms designer for .NET Core apps option.

在此版本中,現已支援下列控制項及其他改善:In this release the following controls are now supported along with other improvements:

  • UserControl 和自訂控制項基礎結構UserControl and custom controls infrastructure
  • TableLayoutPanelTableLayoutPanel
  • 適用於第三方控制項的基礎Fundamentals for third-party controls support
  • 適用於資料繫結支援的基礎Fundamentals for data binding support
  • 設計工具與 TableLayoutPanel 之互動的改善Improvements in designer interaction with the TableLayoutPanel

Bug 修正Bug Fixes

Visual Studio 2019 16.7.0 版修正的重大問題Top Issues Fixed in Visual Studio 2019 version 16.7.0

  • 已修正 WMI 提供者元件安裝失敗的問題。Fixed WMI Provider component installation failure.
  • 修正了使用者無法透過按一下列底部左側按鈕來查看測試回合進度的問題。Fixed an issue where users were not able to see test run progress by clicking the left button at the bottom of the bar.
  • 改善了探索可用 Visual Studio 程式碼空間計費方案的效能。Improved performance of discovering available Visual Studio Codespace billing plans.
  • 建立 Visual Studio 程式碼空間時,我們會將預設的暫停時間從 30 分鐘變更為 3 小時。When creating a Visual Studio Codespace, we changed the default suspend time from 30minutes to 3 hours.
  • 修正 Git [變更] 視窗通知使用者其有傳入/傳出認可,但事實上沒有的 Bug。Fix bug where the Git Changes window informs the user they have incoming/outgoing commits, when in fact they have none.
  • 改善了診斷工具與效能分析工具的穩定性。Improved stability of the Diagnostic Tools and Performance Profiler.
  • 解決了 Azure Sphere Visual Studio 延伸模組因為次要版本不相符而無法自動更新的問題。Addressed an issue where Azure Sphere Visual Studio extension will not be automatically updated due to a minor version mismatch. 修正之後,當 VSIX 自動更新程式執行時,Azure Sphere 就能自動更新。With the fix, Azure Sphere will be able to get automatically updated when the VSIX auto updater runs.

開發人員社群的問題From Developer Community


已知問題Known Issues

遵循以下連結,查看所有已知問題和 Visual Studio 2019 中可用的因應措施。See all open issues and available workarounds in Visual Studio 2019 by following the below link.


意見反應與建議Feedback and suggestions

我們很希望聽聽您的意見!We would love to hear from you! 若有任何問題,請透過安裝程式或 Visual Studio IDE 本身右上角的回報問題選項來通知我們。For issues, let us know through 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 make a product suggestion or track your issues in the Visual Studio Developer Community, where you can ask questions, find answers, and propose new features. 您也可以透過我們的即時聊天支援取得免費的安裝協助。You can also 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.


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

如需舊版 Visual Studio 2019 的相關詳細資訊,請參閱 Visual Studio 2019 版本資訊歷程記錄頁面。For more information relating to past versions of Visual Studio 2019, see the Visual Studio 2019 Release Notes History page.


頁面頂端

Top of Page