Visual Studio Icon Visual Studio 2019 版本資訊Visual Studio 2019 Release Notes


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


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

Visual Studio 2019 版本Visual Studio 2019 Releases

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.1.6 版Visual Studio 2019 version 16.1.6 New release icon

發行於 2019 年 7 月 9 日released July 9, 2019

Visual Studio 2019 16.1.6 版中所解決的問題摘要Summary of issues addressed in Visual Studio 2019 version 16.1.6

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

CVE-2019-1077 Visual Studio 延伸模組自動更新弱點CVE-2019-1077 Visual Studio Extension Auto Update Vulnerability

當 Visual Studio 延伸模組自動更新程序不當處理某些檔案作業時,會引發權限提高弱點。An elevation of privilege vulnerability exists when the Visual Studio Extension auto-update process improperly performs certain file operations. 惡意攻擊此弱點成功的攻擊者,將能刪除任意位置上的檔案。An attacker who successfully exploited this vulnerability could delete files in arbitrary locations. 若要探索此弱點,攻擊者需要易受攻擊系統的無特殊權限存取權。To exploit this vulnerability, an attacker would require unprivileged access to a vulnerable system. 此安全性更新藉由保護 Visual Studio 延伸模組自動更新執行檔案作業的位置來解決此弱點。The security update addresses the vulnerability by securing locations the Visual Studio Extension auto-update performs file operations in.

CVE-2019-1075 ASP.NET Core 詐騙弱點CVE-2019-1075 ASP.NET Core Spoofing Vulnerability

ASP.NET Core 中有詐騙弱點,可能會導致開啟重新導向。A spoofing vulnerability exists in ASP.NET Core that could lead to an open redirect. 成功惡意探索此弱點的攻擊者可能會將目標使用者重新導向至惡意網站。An attacker who successfully exploited the vulnerability could redirect a targeted user to a malicious website. 為惡意探索此弱點,攻擊者可能會傳送特製的 URL 連結,並說服使用者按一下此連結。To exploit the vulnerability, an attacker could send a link that has a specially crafted URL and convince the user to click the link.

此安全性更新會更正 ASP.NET Core 剖析 URL 的方式,藉以處理此弱點。The security update addresses the vulnerability by correcting how ASP.NET Core parses URLs. 詳細資料請參閱 .NET Core 版本資訊Details can be found in the .NET Core release notes.

CVE-2019-1113 WorkflowDesigner XOML 還原序列化允許程式碼執行CVE-2019-1113 WorkflowDesigner XOML deserialization allows code execution

參考特定類型的 XOML 檔案可能會導致在 Visual Studio 中開啟 XOML 檔案時執行隨機程式碼。A XOML file referencing certain types could cause random code to be executed when the XOML file is opened in Visual Studio. 對於在 XOML 檔案中允許使用的類型,現在有所限制。There is now a restriction on what types are allowed to be used in XOML files. 如果開啟包含新未授權類型的 XOML 檔案,則會顯示訊息說明該類型未經授權。If a XOML file containing one of the newly unauthorized types is opened, a message is displayed explaining that the type is unauthorized.

如需詳細資訊,請參閱 https://support.microsoft.com/en-us/help/4512190/remote-code-execution-vulnerability-if-types-are-specified-in-xomlFor further information, please refer to https://support.microsoft.com/en-us/help/4512190/remote-code-execution-vulnerability-if-types-are-specified-in-xoml.


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

於 2019 年 7 月 2 日發行released July 2, 2019

Visual Studio 2019 16.1.5 版中所解決的問題摘要Summary of issues addressed in Visual Studio 2019 version 16.1.5


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

2019 年 6 月 25 日發行released June 25, 2019

Visual Studio 2019 16.1.4 版中解決的問題摘要Summary of issues addressed in Visual Studio 2019 version 16.1.4


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

2019 年 6 月 11 日發行 released June 11, 2019

Visual Studio 2019 16.1.3 版中解決的問題摘要Summary of issues addressed in Visual Studio 2019 version 16.1.3


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

2019 年 6 月 4 日發行 released June 4, 2019

Visual Studio 2019 16.1.2 版中解決的問題摘要Summary of issues addressed in Visual Studio 2019 version 16.1.2


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

2019 年 5 月 24 日發行 released May 24, 2019

Visual Studio 2019 16.1.1 版中解決的問題摘要Summary of Issues addressed in Visual Studio 2019 version 16.1.1


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

2019 年 5 月 21 日發行released May 21, 2019

Visual Studio 2019 16.1 版的新功能摘要Summary of What's New in Visual Studio 2019 version 16.1

IDEIDE

  • Visual Studio IntelliCode 現已全面上市,並會隨著任何支援 C#、C++、TypeScipt/JavaScript 或 XAML 的工作負載一起安裝。Visual Studio IntelliCode is now generally available and comes installed with any workload that supports C#, C++, TypeScipt/JavaScript, or XAML.
  • 新增每部監視器感知支援。Added Per-Monitor Awareness support.
  • 有適用於 C# 的新程式碼修正可用。New codefixes are available for C#.
  • Visual Studio 搜尋新增了最近使用項目。Most Recently Used has been added to Visual Studio Search.

偵錯工具Debugger

  • 已實作來源連結驗證改良功能。Source Link authentication improvements have been implemented.
  • 在預設符號伺服器清單中新增了 nuget.org 符號伺服器。Added nuget.org symbol server to the list of default symbol servers.
  • 時間移動偵錯預覽現在包含例外狀況逐步執行支援。Time Travel Debugging preview now includes exception stepping support.

擴充性Extensibility

  • 移除了 VSIX 專案中的 resx 檔案需求 (BuildTools 更新)。Removed the need for .resx file in VSIX projects (BuildTools update).
  • VSIX 專案範本現在使用新版 SDK。VSIX Project template now uses the new SDK version.

效能Performance

  • 使用者最佳化體驗能夠縮短超大型解決方案的載入時間。User optimization experience to improve the solution load time of very large solutions.
  • 範本作者可以將自訂標籤新增到範本。Template authors can add custom tags to their templates.
  • CodeLens 支援自訂 UI。CodeLens support for custom UI.
  • 提供了語言伺服器通訊協定實作的更新。Provided updates to Language Server Protocol implementation.
  • 更新了切換解決方案、資料夾及其他檢視的行為。Updated behavior for switching between solutions, folders, and other views.

C++C++

F#F#

.NET.NET

  • 新的 .NET 生產力功能包含專案與解決方案上的單鍵程式碼清理、新的切換區塊註解鍵盤快速鍵、重構以將類型移到其他命名空間。New .NET productivity features include one-click code cleanup on projects and solutions, a new toggle block comment keyboard shortcut, refactoring to move types to other namespaces.
  • 使用者現在可以透過開始視窗的複製畫面來複製 SSH URI 的程式碼。Users can now clone code from an SSH URI through the clone screen in the start window.
  • .NET 生產力的新增內容包括:用於未匯入型別的 IntelliSense 自動完成、切換單行註解/取消註解、將命名樣式匯出至 editorconfig,以及在命名空間內部/外部優先使用 using 的新編碼樣式設定。Additions to .NET Productivity include intellisense completion for unimported types, toggling single-line comment/uncomment, exporting naming styles to editorconfig, and a new code style setting for preferring usings inside/outside namspaces.
  • 實作了 .NET SDK 工具新增內容,主要關於 .NET Core 3.0 的 WinForms 和 WPF 專案支援,以及 Bug 修正和效能提升。Implemented .NET SDK tooling additions around supporting WinForms and WPF projects for .NET Core 3.0 along with bug fixes and performance improvements.
  • Visual Studio SDK v16.0 已發行到 NuGet。Visual Studio SDK v16.0 released to NuGet.
  • 推出了適用於 .NET Core 3.0 WPF 開發的 XAML 設計工具預覽。Released a preview of the XAML Designer for .NET Core 3.0 WPF development.

XamarinXamarin

已在 Visual Studio 2019 16.1 版中修正的常見問題Top Issues Fixed in Visual Studio 2019 version 16.1

Visual Studio 2019 16.1 版的新功能詳細資料Details of What's New in Visual Studio 2019 version 16.1

  • IntelliCode 現已全面上市,並會隨著任何支援 C#、C++、TypeScipt/JavaScript 或 XAML 的工作負載一起安裝。IntelliCode is now generally available and comes installed with any workload that supports C#, C++, TypeScipt/JavaScript, or XAML.
  • 預覽 IntelliCode 功能 (自訂模型、C++/TS/JS 支援及 Editorconfig 推斷) 預設會停用。Preview IntelliCode features - Custom Models, C++/TS/JS support, and Editorconfig inference - are disabled by default. 若要啟用它們,請移至 [工具] > [選項] > [IntelliCode] 。To enable them, go to Tools > Options > IntelliCode.
  • 從 [新增項目精靈] 中移除了 EditorConfig (IntelliCode) 範本Removed the Editorconfig (IntelliCode) template from the New Item Wizard. 若要建立推斷的 EditorConfig,在 [方案總管] 中以滑鼠右鍵按一下想要的位置,然後選擇 [新增] > [新增 EditorConfig (IntelliCode)] 。To create an inferred Editorconfig, right-click on the desired location in Solution Explorer and choose Add > New EditorConfig (IntelliCode).
  • 使用開始視窗,透過 SSH 從線上存放庫複製程式碼。Use the start window to clone code from an online repository through SSH.
Clone with SSH on start window
在開始視窗上使用 SSH 進行複製Clone with SSH on start window
  • 根據預設,Visual Studio IntelliCode 會在您安裝支援 C#、XAML 或 C++ 的工作負載時安裝。Visual Studio IntelliCode is installed by default when you install a workload that supports C#, XAML, or C++.
    • 根據預設,C# 與 XAML 基本模型會開啟。C# and XAML base models will be on by default.
    • 您可以透過 [工具] > [選項] > [IntelliCode] 啟用預覽功能,例如自訂模型訓練及引數完成。Preview features, such as custom model training and argument completion, can be enabled via Tools > Options > IntelliCode.
  • 新增每部監視器感知支援Added Per-Monitor Awareness support
  • 適用於 C# 的新程式碼修正New codefixes available for C#.
  • 為 Visual Studio 的 WinForms 式 PropertyBrowser 視窗新增每部監視器感知支援。Added Per-Monitor Awareness support for WinForms based PropertyBrowser window of Visual Studio. 電腦上必須安裝 RTM 版的 .NET Framework 4.8。Requires .NET Framework 4.8 RTM version installed on the machine.
  • 來源連結現在可以使用 Windows 驗證來支援 TFS 原始檔控制。Source Link can now use Windows Authentication to support on-premises TFS Source Control.
  • 新增 nuget.org 符號伺服器至預設符號伺服器清單Added nuget.org symbol server to the list of default symbol servers

專案Project

  • 用於切換方案總管檢視的按鈕,現在會持續顯示所有可用檢視的下拉式功能表。The button for switching the Solution Explorer view will now consistently shows a dropdown menu of all possible views.
Solution switching
解決方案檢視切換Solution view switching
  • 改善了超大型解決方案的載入時間。Improved the loading time for very large solutions. 改善幅度會因為解決方案大小而有所不同。The improvement varies based on the size of the solutions.

  • 移除了 [檔案] > [轉換] 下的 [轉換] 對話方塊。Removed the Convert dialog under File > Convert. 此功能先前已在 Visual Studio 2015 中淘汰。This feature was previously deprecated in Visual Studio 2015.

  • 更新了 task.vs.json 與 launch.vs.json 結構描述的驗證規則,並新增了屬性描述。Updated the validation rules for the task.vs.json and launch.vs.json schemas, and added descriptions for the properties.

  • 新增了透過 launch.vs.json 使用自訂程式的 Linux 遠端偵錯支援。Added support for Linux remote debugging using a custom program via launch.vs.json.

擴充性Extensibility

  • 使用者現在可在延伸模組中,使用最新版的 Microsoft.VisualStudio.SDK 將目標訂為 Visual Studio 2019。Users can now use the latest version of the Microsoft.VisualStudio.SDK to target Visual Studio 2019 in your extensions. 務必只在支援的最低 Visual Studio 版本為 16.0 時,才使用此版本的 SDK。Remember to only use this version of the SDK if the lowest supported version of Visual Studio is 16.0.
  • 建立新的 VSIX 專案現在會包含 Microsoft.VisualStudio.SDK NuGet 套件的 16.0 版。Creating new VSIX projects will now contain the 16.0 version of the the Microsoft.VisualStudio.SDK NuGet package.
  • 使用者現在可以將標籤新增到專案範本,以在 Visual Studio 2019 [新增專案] 對話方塊中進行分類與篩選。Users can now add tags to your project templates to enable categorization and filtering in the Visual Studio 2019 New Project Dialog. 使用者也可以選擇內建標籤,或自己的自訂語言、平台及專案類型標籤。Users can also choose from the built-in tags or their own custom language, platform, and project type tags.
Template tagging
範本標記Template tagging
  • CodeLens 延伸模組現在可以在其 CodeLens 詳細資料快顯中顯示任意 UI 內容。CodeLens extensions can now display arbitrary UI content in their CodeLens details popup.

  • 對語言伺服器通訊協定新增了以下支援:Updated Language Server Protocol with:

    • 投射的緩衝區支援,讓內嵌 Diff 可使用 LSP,並可在 LiveShare 中使用 Razor 檔案。Support for projected buffers to enable LSP for inline diff, and Razor files in LiveShare.
    • 支援非必要的診斷。Support for unnecessary diagnostics.
    • 支援 textDocument/typeDefinition。Support for textDocument/typeDefinition.
    • 支援 textDocument/foldingRange (大綱)。Support for textDocument/foldingRange (outlining).
  • 在 VSIX 專案中移除 resx 檔案的需求 (BuildTools 更新)Removed the need for .resx file in VSIX projects (BuildTools update)

  • Microsoft.VSSDK.BuildTools NuGet 套件現在會在組建缺少具有 MergeWithCTO 屬性的 .resx 時,在組建中提供空白的 .resx 檔案。The Microsoft.VSSDK.BuildTools NuGet package will now provide an empty .resx file as part of the build if no .resx with MergeWithCTO property exist. 大多數延伸模組不會使用或不須 .resx 檔案即可合併,因此可保持專案更清楚明瞭。Most extensions don't use or need a .resx file to merge, so this will keep the project cleaner.

  • 個別監視器感知的變更可能會影響某些延伸模組。Per-monitor awareness changes might affect some extensions. 深入了解 Visual Studio 擴充項的個別監視器感知支援Learn more about Per-Monitor Awareness support for Visual Studio extenders.

編輯器Editor

  • Visual Studio 搜尋現在會重點顯示前三個透過 Visual Studio 搜尋叫用的最近使用動作,如此範例模型所示。Visual Studio Search will now display on focus the three most recently used actions invoked through Visual Studio Search, as shown in this sample mockup. (注意:此模型中的圖示與某些細項未完全更新。)
    (Note: icons and specific line items have not been fully updated in this mock-up.)
    Visual Studio Search
    Visual Studio 搜尋的模型Mock-up of Visual Studio Search

C++C++

  • 在 Visual Studio 中,以原生方式搭配 C++ 使用本機適用於 Linux 的 Windows 子系統 (WSL) 安裝,而不需額外的設定或 SSH 連線。Use local Windows Subsystem for Linux (WSL) installation with C++ natively in Visual Studio without additional configuration or SSH connection.
Windows Subsystem for Linux
適用於 Linux 的 Windows 子系統Windows Subsystem for Linux
  • AddressSanitizer 現已整合到適用於 Linux 專案的 Visual Studio 和 WSL。AddressSanitizer is now integrated into Visual Studio for Linux projects and WSL.
ASan integration
ASan 整合ASan integration
  • 現在,在 MSBuild 和 CMake 專案中以 Linux 為目標時,使用者可將遠端組建電腦從遠端偵錯電腦分隔開來。Users can now separate remote build machines from remote debug machines when targeting Linux in both MSBuild and CMake projects.
  • 快速諮詢工具提示現在包含搜尋線上文件的連結,可深入了解程式碼建構。Quick Info tooltips now contain a link to search for online docs to learn more about the code construct. 在紅色波浪線的程式碼案例中,快速諮詢中的連結將會線上搜尋錯誤。In the case of red-squiggled code, the link in Quick Info will search for the error online.
  • 快速諮詢工具提示內的程式碼現在會以色彩標示,以反映它在編輯器中的顏色標示。Code within Quick Info tooltips is now colorized to reflect its colorization in the editor.
Colorized code in Quick Info tooltips
快速諮詢工具提示中以色彩標示的程式碼Colorized code in Quick Info tooltips
New Code Analysis quick fixes
新增程式碼分析快速修正New Code Analysis quick fixes
  • CMake 設定編輯器的功能改進,包括 Linux 的 Windows 子系統 (WSL) 支援及來自現有快取的設定、預設建置與安裝根目錄的變更,以及 Linux CMake 設定中環境變數的支援。Improvements to the CMake Settings Editor, including support for Windows Subsystem for Linux (WSL) and configurations from existing caches, changes to the default build and install roots, and support for environment variables in Linux CMake configurations.
Improvements to the CMake Settings Editor
對 CMake 設定編輯器的改進Improvements to the CMake Settings Editor
  • 遠端連線改良的記錄讓跨平台開發的問題變得容易診斷。Improved logging for remote connections makes it easier to diagnose issues with cross-platform development.
Improved logging for remote connections
已改進遠端連線的記錄Improved logging for remote connections
  • 現在在以 Linux 為目標時,您可以將遠端建置電腦從遠端偵錯電腦分離 (MSBuild 專案專用,並即將於 CMake 推出)。You can now separate your remote build machine from your remote debug machine when targeting Linux (specific to MSBuild projects, coming soon for CMake).
  • 範本列可依據該範本在您程式碼基底中的具現化來填入下拉式功能表。The Template Bar can populate the dropdown menu based on instantiations of that template in your codebase.
New Template Bar dropdown menu
新的範本列下拉式功能表New Template Bar dropdown menu
  • C++ IntelliCode 現在以方塊提供,可在 [工具] > [選項] > [IntelliCode] > [一般] 中啟用。C++ IntelliCode now ships in-box and can be enabled under Tools > Options > IntelliCode > General. 這個 IntelliCode 版本改善了正確性,並包含可用函式的支援。This version of IntelliCode has improved accuracy and includes support for free-functions.
  • CMake 整合現在對目標為 Windows 及 (或) Linux 的專案支援 Clang/LLVM 工具鏈。CMake integration now supports the Clang/LLVM toolchain for projects targeting Windows and/or Linux. 您現在可以建置、編輯使用 Clang、MSVC 或 GCC 的 CMake 專案並對其偵錯。You can now build, edit, and debug CMake projects that use either Clang, MSVC, or GCC.
CMake integration supports the Clang/LLVM toolchain
CMake 整合支援 Clang/LLVM 工具鏈CMake integration supports the Clang/LLVM toolchain
  • 缺少的 #include 會出現燈泡,並可透過 vcpkg 安裝,CMake find_package 指示詞則有可用套件的自動完成。Lightbulbs for missing #includes that can be installed by vcpkg, and autocompletion of available packages for the CMake find_package directive.
Autocompletion of available packages
自動完成可用的套件Autocompletion of available packages
  • 已將 Visual Studio 隨附的 CMake 版本更新為 3.14。Updated the CMake version that ships with Visual Studio to 3.14. 此版本新增了以 Visual Studio 2019 專案為目標的 MSBuild 產生器內建支援,以及檔案型的 IDE 整合 API。This version adds built-in support for MSBuild generators targeting Visual Studio 2019 projects as well as file-based IDE integration APIs.

  • C++ 專案的一般屬性頁已經過修改,在新的 [進階] 頁面下分割出一些選項。The General Property Pages for C++ projects has been revised, splitting out some options under a new Advanced page. [進階] 頁面也包括偏好工具組架構、偵錯程式庫、MSVC 工具組次要版本及 Unity (jumbo) 組建的額外屬性。The Advanced page also includes additional properties for preferred toolset architecture, debug libraries, the MSVC toolset minor version, and Unity (jumbo) builds.

  • 下列 C++20 預覽功能已新增到 C++ 標準程式庫的實作,並於 /std:c++latest 提供:The following C++20 preview features have been added to our implementation of the C++ Standard Library, available under /std:c++latest:

    • basic_string/basic_string_viewstarts_with()ends_with()starts_with() and ends_with() for basic_string/basic_string_view.
    • 關聯容器的 contains()contains() for associative containers.
    • listforward_listremove()remove_if()unique() 現在會傳回 size_typeremove(), remove_if(), and unique() for list and forward_list now return size_type.
    • shift_left()shift_right() 已新增到 <algorithm>shift_left() and shift_right() added to <algorithm>.
  • 下列 C++20 預覽功能已在 C++ 編譯器中實作,並於 /std:c++latest中提供:The following C++20 preview features have been implemented in the C++ compiler, available under /std:c++latest:

    • 為具有明確範本引數的函式呼叫運算式,增加透過依引數不同的查閱來尋找函式範本的功能 (P0846R0)。Increased ability to find function templates via argument-dependent lookup for function call expressions with explicit template arguments (P0846R0).
    • 指定的初始設定 (P0329R4),讓特定成員可在彙總初始設定中選取,例如使用 Type t { .member = expr } 語法。Designated initialization (P0329R4), which allows specific members to be selected in aggregate initialization, e.g. using the Type t { .member = expr } syntax.
  • Lambda 支援已經過全面檢修,解決了長久以來的大量問題。Lambda support has been overhauled, addressing a large number of long-standing bugs. 根據預設,此變更會在使用 /std:c++latest 時啟用。This change is enabled by default when using /std:c++latest. 在其他 /std:c++* 語言模式中及預設模式中,新的剖析器可以透過 /experimental:newLambdaProcessor 啟用,例如 /std:c++17 /experimental:newLambdaProcessorIn other /std:c++* language modes and under the default mode, the new parser can be enabled via /experimental:newLambdaProcessor, e.g. /std:c++17 /experimental:newLambdaProcessor.

  • CMake 的編輯器內文件In-editor documentation for CMake

  • 完成項和內建 CMake 命令、變數及屬性的快速資訊,讓您在編輯 CMakeLists.txt 檔案時更加輕鬆。Completions and quick info for built-in CMake commands, variables, and properties make it easier to edit your CMakeLists.txt files.

Tooltip info for add_subdirectory CMake command
add_subdirectory CMake 命令的工具提示資訊Tooltip info for add_subdirectory CMake command

F# 與 F# 工具F# and F# tools

對於 F# 語言和工具而言,這是個相當小的版本,但它還是會提供一些好用功能!This is a relatively minor release for the F# language and tools, but it's not without some goodies! 如同 VS 16.0 更新,此版本也會著重於編輯器工具的效能。As with the VS 16.0 update, this release also focused on performance of editor tooling.

F# 編譯器和 F# 互動F# compiler and F# interactive
  • 新增了 .NET Core 上 F# 互動的 P/Invoke 支援 (#6544)Added P/Invoke support to F# interactive on .NET Core (#6544)
  • 針對在 for 迴圈中使用時的 Span<'T> 新增了編譯器最佳化 (#6195)Added a compiler optimization for Span<'T> when used in a for loop (#6195)
  • 新增了最佳化,以避免針對不同案例中的 F# 選項使用無關的 Some 配置 (#6532)Added an optimization to avoid an extraneous Some allocations for F# options in various scenarios (#6532)
  • 匿名記錄具現化中使用的運算式執行順序已變更為從上到下,而不是依字母順序執行,以使目前的體驗與一般記錄相符 (#6487)Changed the execution order of expressions used in the instantiation of Anonymous Records to be top-to-bottom, rather than alphabetical, to match the current experience with normal Records (#6487)
  • 已解決非常大的常值運算式或非常大的結構宣告可能導致編譯器在組建上產生堆疊溢位的 Bug (#6258 (英文))A bug where very large literal expressions or very large struct declarations could cause the compiler to stack overflow on build has been resolved (#6258)
  • 已修正使用匿名記錄對函式進行偵錯時不再觸發中斷點的 Bug (#6512 (英文))A bug where breakpoints would no longer trigger when debugging a function with an Anonymous Records has been fixed (#6512)
  • 已修正傳遞至建構的匿名記錄預期 obj 參數會導致編譯器當機的 Bug (#6434 (英文))A bug where Anonymous Records passed to constructs expecting an obj parameter caused a compiler crash has been fixed (#6434)
  • 已修正 for var expr1 to expr2 do ... 迴圈可能導致異常有效 (和已捨棄) 的語法的 Bug (#6586 (英文))A bug where for var expr1 to expr2 do ... loops could result in bizarrely valid (and discarded) syntax has been fixed (#6586)
  • 已修正無法搭配事件正確使用匿名記錄的 Bug (#6572 (英文))A bug where Anonymous Records could not be used properly with events has been fixed (#6572)
  • 已解決一個長期存在的 Bug,即 FsLexYacc 中產生了超大型的剖析器 (超過 1 億行) (#5967 (英文))A longstanding bug where extremely large generated parsers in FsLexYacc (over 100 million lines) has been resolved (#5967
  • 已解決一個長期存在的問題,即型別提供者導致編輯器的「型別提供者」外掛程式元件可能留有使記憶體流失的可能性 (#6409 (英文))A longstanding issue in the Type Provider plugin component of the compiler that could leave the door open for a memory leak caused by a type provider has been resolved (#6409)
  • Saul Rennison (英文) 已將 --pathmap 的支援新增至 F# 編譯器,這可解決下列問題:從編譯中產生的可執行檔會在內嵌的 F# 簽章檔案資源中包含原始程式檔的絕對路徑 (#5213 (英文))Support for --pathmap was added to the F# compiler by Saul Rennison, which resolves an issue where the resulting executable from a compilation would include absolute paths to source files in the embedded F# signature file resource (#5213)
  • ncave (英文) 已新增對 F# AST 的最佳化,可透過其他工具和環境 (例如 Fable (英文)) 來改進它的取用量 (#6333 (英文))An optimization to the F# AST that improves its consumption via other tools and enviroments (e.g., Fable) has been added by ncave (#6333)
  • Steffen Forkmann (英文) 已新增關於在解析成員時周遊資訊的最佳化 (#4457 (英文))An optimization around traversing information when resolving members has been added by Steffen Forkmann (#4457)
  • Gauthier Segay (英文) 已新增錯誤訊息的改進,例如,型別實作遺漏必要的覆寫時,即會報告那些遺漏的覆寫清單 (#4982 (英文))An improvement to error messages such that when a type implementation is missing necessary overrides a list of those missing overrides is reported has been added by Gauthier Segay (#4982)
F# 工具F# tools
  • .NET SDK 中適用於 F# 專案的目標 Framework 下拉式清單現在將包含所有可用 .NET Core 的值、.NET Standard 和 .NET Framework 值,以便輕鬆地從 .NET SDK 上的 .NET Framework 移轉至 .NET CoreThe Target Framework dropdown for F# projects in the .NET SDK will now include values for all available .NET Core, .NET Standard, and .NET Framework values to ease migrating to .NET Core from .NET Framework on the .NET SDK
  • 已修正重新命名泛型型別參數會產生雙反引號逸出的名稱的 Bug (#5389 (英文))A bug where renaming generic type parameters produces double backtick-escaped names has been fixed (#5389)
  • 已解決一個長期存在的問題,即已重複將型別提供者重新具現化,因而會在經過一段時間之後導致大量配置 (#5929 (英文))A longstanding problem where Type Providers were redundantly reinstantiated, causing massive allocations over time, has been resolved (#5929)
  • 已解決一個長期存在的問題,即在短時間內讀取 IL 會不必要地配置 20 MB (#6403 (英文))A longstanding issue where reading IL needlessly allocated 20MB over a short period of time was been resolved (#6403)
  • Vasily Kirichenko (英文) 已解決 F# 編譯器服務中的方法 GetToolTipText 可能針對數個成員多載顯示同一個 XML 簽章的 Bug (#6244 (英文))A bug where the method GetToolTipText in the F# compiler service could show the same XML signature for several member overloads has been resolved by Vasily Kirichenko (#6244)
F# 開放原始碼基礎結構F# open source infrastructure

最後,我們已透過下列方式改進貢獻體驗:Finally, we improved the contribution experience by doing the following:

  • 從來源處理序完成我們的組建,讓 F# 編譯器和核心程式庫均可使用 .NET Core 來源組建存放庫來建置Completed our build from source process so that the F# compiler and core library can be built with the .NET Core source build repository
  • 已移除 netstandard1.6 上的相依性,讓整個程式碼基底統一將目標設定為 netstandard2.0net472Removed our dependency on netstandard1.6 so that the entire codebase uniformly targets netstandard2.0 and net472
  • 已將 .vsconfig 檔案新增至存放庫的根目錄,如此一來,使用 Visual Studio 的參與者就不需要知道事先安裝所需的所有項目Added a .vsconfig file to the root of the repository so that contributors using Visual Studio don't have to know everything that needs installing up front
  • 重寫了專案的讀我檔案,以移除可能令人混淆的資訊、納入開始參與的快速入門,並嘗試在我們想要採用的變更種類相關訊息中,展現更高的包容性Rewrote our project's README to remove potentially confusing information, include a quickstart for getting started with contributing, and attempting to be more inclusive in our messaging about the kinds of changes we'd love to take

.NET 生產力.NET Productivity

  • 現已針對未匯入的型別完成實驗性 IntelliSense!There is now experimental intellisense completion for unimported types! 使用者現在會收到對專案內相依性中的型別 IntelliSense 建議,即使使用者尚未將 import 陳述式新增到檔案也一樣。Uers now receive intellisense suggestions for types in dependencies in projects even if they have not yet added the import statement to the file. 開啟此選項的位置在 [工具] > [選項] > [文字編輯器] > [C#] > [Intellisense] 。Turn this option on in Tools > Options > Text Editor > C# > Intellisense.
Intellisense completion for unimported types
針對未匯入的型別完成 IntelliSenseIntellisense completion for unimported types
  • 「切換單行註解/取消註解」現在可透過鍵盤快速鍵 (Ctrl+K、/) 來取得。Toggle Single Line Comment/Uncomment is now available through the keyboard shortcut (Ctrl+K,/). 此命令將根據您是否已經將選取範圍標記為註解來新增或移除單行註解。This command will add or remove a single line comment depending on whether your selection is already commented.
  • 能夠使用位於 [工具] > [選項] > [文字編輯器] > [C#] > [程式碼樣式] 的 [產生 editorconfig] 按鈕,來匯出命名樣式。Ability to export naming styles with the “Generate editorconfig” button located in Tools > Options > Text Editor > C# > Code Style.
  • 能夠使用新的 editorconfig 程式碼樣式規則,要求或避免命名空間內部的 using。Ability to use a new editorconfig code style rule to require or prevent usings inside a namespace. 在使用位於 [工具] > [選項] > [文字編輯器] > [C#] > [程式碼樣式] 的 [產生 editorconfig] 按鈕時,也會匯出這項設定。This setting will also be exported when using the “Generate editorconfig” button located in Tools > Options > Text Editor > C# > Code Style.
Editorconfig rule for usings outside/inside namespaces
在命名空間外部/內部使用的 Editorconfig 規則Editorconfig rule for usings outside/inside namespaces
Tools Options setting for usings inside/outside namespace
在命名空間外部/內部使用的工具選項設定Tools Options setting for usings inside/outside namespace
  • 尋找所有參考的「種類」欄位現在有更多篩選選項,且會認知命名空間與類型。The Find All References “Kind” column now has more filter options and is aware of namespaces and types.
Find All References Kind column has more filter options
尋找所有參考的 [種類] 欄現在有更多篩選選項Find All References Kind column has more filter options
  • 為分割/合併 if 陳述式新增了程式碼修正。Added a codefix for split/merge if statements.
Split or merge if statements
分割或合併 if 陳述式Split or merge if statements
  • 新增了程式碼修正,以包裝二進位運算式。Added a codefix for wrapping binary expressions.
Wrap binary expressions
包裝二進位運算式Wrap binary expressions
  • 在 regex 字串內時,regex 自動完成清單現已可透過 Intellisense 選單存取 (CTRL+ 空格鍵)。A regex completion list can now be accessed through the intellisense menu (Ctrl + space) when inside a regex string. 這些完成項也包含內嵌建議的描述。These completions also include an in-line description of what the suggestion does.
Regex completion offered in Intellisense with (Ctrl + space)
Regex 完成Regex completion
  • 新增了程式碼修正,以為類別解密。Added a codefix for unsealing a class.
Unseal a class codefix
取消密封類別Unseal a class
  • 對專案與解決方案使用單鍵程式碼清理。Use one-click code cleanup for projects and solutions. 在方案總管中以右鍵按一下專案或解決方案,然後選取 [執行程式碼清理]。Right-click on projects or the solution in the Solution Explorer and select ‘Run Code Cleanup’.
Right-click to run code cleanup over the entire solution
以滑鼠右鍵按一下以對整個解決方案執行程式碼清理Right-click to run code cleanup over the entire solution
You will see a dialog box while cleanup is applied to each file
在清理套用到各個檔案時,系統會顯示對話方塊A dialog is present box while cleanup is applied to each file
  • 現在可以使用重構對話方塊,將類型移到命名空間或資料夾。Now use a refactoring dialog to move type to namespace or folder. 將您的資料指標放在類別名稱與類型 (Ctrl + .) 中,以開啟快速動作及重構功能表,然後選取 [移到命名空間]。Place your cursor in the class name and type (Ctrl + .) to open the quick actions and refactorings menu and select ‘Move to namespace.’ 這會啟動對話方塊,您可從中選取類型要移動的目標命名空間。This launches a dialog where you can select the target namespace you would like to move the type to.
Place cursor in class name and type (Ctrl+.) to view refactorings
將資料指標放在類別名稱與型別中 (Ctrl+.) 以檢視重構Place cursor in class name and type (Ctrl+.) to view refactorings
Select the destination namespace
選取目的地命名空間Select the destination namespace
  • 切換區塊註解/取消註解現在可以透過鍵盤快速鍵 (Ctrl+Shift+/),或透過 [編輯] > [進階] > [切換區塊註解] 進行。Toggle Block Comment/Uncomment is now available through the keyboard shortcut (Ctrl+Shift+/) or through Edit > Advanced > Toggle Block Comment. 這個命令會取決於您選取的項目,新增或移除區塊註解。This command will add or remove block comments depending on what you have selected.
Toggle block comment with (Ctrl+Shift+/)
使用 (Ctrl+Shift+/) 切換區塊註解Toggle block comment with (Ctrl+Shift+/)
  • 現在會有程式碼修正,使唯讀結構欄位變得可寫入。There is now a codefix for making readonly struct fields writable. 將您的資料指標放在結構名稱中,鍵入 (Ctrl+.) 以開啟快速動作及重構功能表,然後選取 [Make readonly fields writable (讓唯讀欄位變成可寫入)]。Place your cursor in the struct name, type (Ctrl+.) to open the quick actions and refactorings menu, and select ‘Make readonly fields writable.’
  • 從建構函式新增私人欄位或從私人欄位新增建構函式的程式碼修正變得較容易探索,而且在選取了欄位名稱的任一部份時就會顯示。The codefix to add a private field from a constructor and vice versa is easier to discover and will show when any portion of the field name is selected. 此重構現在也提供所有可用的建構函式。This refactoring now also offers all possible constructors.

適用於 .NET Core 3.0 WPF 開發的 XAML 設計工具預覽XAML Designer Preview for .NET Core 3.0 WPF development

  • 有個 XAML 設計工具的早期預覽適合在 Visual Studio 中建置 .NET Core 3.0 WPF 應用程式的開發人員使用。There is an early preview of the XAML Designer for developers building .NET Core 3.0 WPF applications in Visual Studio. 目前有許多設計階段功能將無法使用。Many design-time features will be unavailable at this time. 由於這是早期預覽,因此,如果您遇到問題 (例如當機),請將 Visual Studio 意見反應提交給小組以持續改進體驗。Since this is an early preview, if you encounter issues such as crashes, please submit Visual Studio feedback for the team to improve the experience going forwards.
  • 透過每個對 Visual Studio 2019 所做的更新,我們將繼續實作更多先前已在 .NET Framework WPF 應用程式的 XAML 設計工具中提供的功能。With each update to Visual Studio 2019, we will continue implementing more of the features that were previously available in the XAML Designer for .NET Framework WPF applications.

.NET SDK 工具.NET SDK tooling

此版本隨附許多工作來解除封鎖在 .NET Core 上使用 WPF:This release included a lot of work to unblock the use of WPF on .NET Core:

  • 已解決每當您將新項目新增至 .NET Core WinForms 或 WPF 專案時會快顯錯誤對話方塊的問題 (#4486 (英文))。An issue where an error dialog popped up whenever you add a new item to a .NET Core WinForms or WPF project was been resolved (#4486).
  • 支援 .NET SDK 專案中的 XAML 檔案 (# 1467 (英文)),其中包含許多更小的工作項目,而目標為實現與舊樣式 .NET 專案的同等體驗。Support for XAML files in .NET SDK projects (#1467) which includes many smaller items of work aimed at achieving experience parity with old-style .NET projects.
  • 支援 .NET Core 上 WinForms 的捷徑功能表項目 (#137 (英文)):Windows Form、使用者控制項、元件和類別。Context menu item support for WinForms on .NET Core (#137): Windows Form, User Control, Component, and Class.
  • 支援 .NET Core 上 WPF 的捷徑功能表項目 (#137 (英文)):視窗、頁面、使用者控制項、資源字典。Context menu item support for WPF on .NET Core (#137): Window, Page, User Control, Resource Dictionary.
  • [資料來源] 視窗現在已針對 .NET SDK 專案啟用,會針對 WinForms 啟用常見的資料管理案例 (#4479 (英文))。The Data Sources window is now enabled for .NET SDK projects, enabling common data management scenarios for WinForms (#4479.

另外,已在此版本中新增各種其他修正:Separately, a variety of other fixes were added in this release:

  • .NET SDK 專案現在支援 .razor 檔案 (#4468 (英文))。.NET SDK projects now support .razor files (#4468).
  • 已在偵錯屬性頁中新增可存取的說明文字,使其可供螢幕助讀程式讀取 (#4568 (英文))。Accessible help text was added to the Debug property page, allowing it to be read by screen readers (#4568).
  • 我們已新增設定,可讓您停用按兩下以開啟專案檔 (#4493 (英文))。We added a setting that allows you to disable double-click to open a project file (#4493).
  • 編輯專案檔的捷徑功能表選項不再包含專案名稱,可修正捷徑功能表可能因為專案名稱非常長而變得太寬的問題 (#1492 (英文))。The context menu option to edit a project file no longer includes the project name, fixing an issue where the context menu could get too wide due to a very long project name (#1492).
  • 已修正使用資料繫結 UI 建立資料來源會建立兩個 .datasource 檔案的 Bug (#4485 (英文))。A bug where creating a Data Source with the Data Binding UI created two .datasource fileas has been fixed (#4485).
  • 已解決使用連結的檔案可能造成最新檢查程式失敗的 Bug (#4580 (英文))。A bug where using linked files could cause the up-to-date checker to fail has been resolved (#4580).
  • 已修正各種涉及套件解決方案的 Bug,並且會在相依性節點中顯示其已解決/尚未解決的狀態 (# 2924 (英文)、#4577 (英文))。A variety of bugs involving package resolution and the display of their resolved/unresolved state in the Dependencies node have been fixed (#2924,#4577).

您可以移至 GitHub 上的 16.1 里程碑 (英文) 來查看已結案問題的完整清單。You can see a full list of closed issues by going to the 16.1 milestone on GitHub.

XamarinXamarin

  • 已將範本、裝置建立、安裝程式等的預設 Android 體驗更新為 API 28。Updated the default Android Experience to API 28 for templates, device creation, installers, and more.
  • Windows 上的 IntelliSense 現在會在撰寫 Xamarin.Forms XAML 時,為設計階段屬性顯示建議。IntelliSense on Windows now shows recommendations for design-time attributes when writing Xamarin.Forms XAML.

已知問題Known Issues

前往以下連結,查看 Visual Studio 2019 16.1 版中的所有問題及可行的因應措施。See all issues and available workarounds in Visual Studio 2019 version 16.1 by following the below link.

Visual Studio 2019 Known Issues


意見反應Feedback

我們很希望聽聽您的意見!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