Visual Studio Icon Visual Studio 2019 预览版发行说明Visual Studio 2019 Preview Release Notes


| 开发者社区 | 系统要求 | 兼容性 | 可分发代码 | 许可条款 | 博客 | 已知问题 || Developer Community | System Requirements | Compatibility | Distributable Code | License Terms | Blogs | Known Issues |


重要

此版本未发布,不适合在生产计算机上使用,也不适合用于创建生产代码。This release is not "go-live" and not intended for use on production computers or for creating production code. 有关如何安装和更新 Visual Studio 2019 的说明,请参阅文档将 Visual Studio 2019 更新到最新版本For instructions on installing and updating Visual Studio 2019, see this documentation on updating Visual Studio 2019 to the most recent release.


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

Visual Studio 2019 预览版发行Visual Studio 2019 Preview 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.4 预览版 5Visual Studio 2019 version 16.4 Preview 5 New release icon

发布时间:2019 年 11 月 14 日released November 14, 2019

Visual Studio 2019 版本 16.4 预览版 5 中修复的主要问题Top Issues Fixed in Visual Studio 2019 version 16.4 Preview 5


Release Notes Icon Visual Studio 2019 版本 16.4 预览版 4Visual Studio 2019 version 16.4 Preview 4

发布时间:2019 年 11 月 6 日released November 6, 2019

Visual Studio 2019 版本 16.4 预览版 4 中修复的主要问题Top Issues Fixed in Visual Studio 2019 version 16.4 Preview 4


Release Notes Icon Visual Studio 2019 版本 16.4 预览版 3Visual Studio 2019 version 16.4 Preview 3

发布时间:2019 年 11 月 4 日released November 4, 2019

Visual Studio 2019 版本 16.4 预览版 3 中修复的主要问题Top Issues Fixed in Visual Studio 2019 version 16.4 Preview 3

16.4 预览版 2 和 3 中的已知问题Known Issue in 16.4 Preview 2 and 3

方案:Scenario:

  • 用户的计算机上已安装了 16.3.x,并且用户拥有 16.4 预览版 1User has 16.3.x installed on their machine and user has 16.4 Preview 1
  • 用户升级为 16.4 预览版 2 或 16.4 预览版 3User UPGRADES to either 16.4 Preview 2 or 16.4 Preview 3
  • .NET 3 已从框中删除.NET 3 is removed from the box
  • 16.3 .NET 3 开发中断16.3 .NET 3 development broke

解决方法:Resolution:

  • 在 16.3 上运行修复会修复环境。Running repair on 16.3 fixes the environment.

Visual Studio 2019 版本 16.4 预览版 3 中的新增功能摘要Summary of What's New in Visual Studio 2019 version 16.4 Preview 3

  • XAML 设计器缩放/位置现在默认为“适合全部”。XAML Designer zoom/position now defaults to Fit All.
  • 添加了“创建数据绑定”对话框。Create Data Binding Dialog has been added.
  • 区域 IntelliSense 改进Improvements to regions IntelliSense
  • XAML IntelliSense 中的代码片段Snippets in XAML IntelliSense
  • 弹出 XAML 编辑器作为设计器的单独窗口Pop-up XAML editor as a separate window from designer
  • 显示引用的程序集的资源Displaying resources for referenced assemblies
  • 实时可视化树中的“仅我的 XAML”Just My XAML in Live Visual Tree
  • 合并资源字典Merge Resource Dictionary
  • 编辑模板现在可与第三方控件结合使用。Edit Template now works with controsl from 3rd party controls.

Visual Studio 2019 版本 16.4 预览版 2 中的新增功能详细信息Details of What's New in Visual Studio 2019 version 16.4 Preview 2

PythonPython

  • 对 Python 3.8 的官方支持即将推出,但尚不可用。Official support for Python 3.8 is coming soon, but not yet available. 有关可能遇到的问题的更多详细信息,请参阅 Github 问题For more details on issues that may be experienced, see the Github issue.

WPF/UWP 工具WPF/UWP Tooling

生成 WPF/UWP 应用程序的客户将在 Visual Studio XAML 工具中看到以下改进:Customers building WPF/UWP applications will see the following improvements in Visual Studio XAML tooling:

DesignerDesigner

  • XAML 设计器缩放/位置现在默认为“适合全部”: 根据客户反馈,我们已重新评估了打开 XAML 窗口/页面/控件/等时出现的默认 XAML 设计器缩放行为。以前的经验丰富的用户在 Visual Studio 会话中存储了每个文件的缩放级别和位置,在经过一段时间后客户返回到文件时,这会导致混淆。XAML Designer zoom/position now defaults to Fit All: Based on customer feedback we’ve reevaluated the default XAML Designer zoom behavior that occurs when you open a XAML window/page/control/etc. The previous experienced stored the zoom level and position for each file across Visual Studio sessions which caused confusion when customers were coming back to a file after some time had passed. 从此版本开始,我们只会存储活动会话持续时间的缩放级别和位置,并在 Visual Studio 重启后返回到“适合全部”默认值。Starting with this release we will only store the zoom level and position for the duration of the active session and go back to a “fit all” default once Visual Studio is restarted.
  • “创建数据绑定”对话框: WPF .NET Framework 开发人员可以通过右键单击 XAML 设计器和属性资源管理器使用 Visual Studio 的“数据绑定”对话框,并且此对话框以前也可供 UWP 开发人员使用。Create Data Binding Dialog: Visual Studio has had a data binding dialog available to WPF .NET Framework developers from the right-click of the XAML Designer and Property Explorer, and this dialog was also previously available to UWP developers. 在此版本中,我们将为 UWP 开发人员提供这种体验,并添加对 WPF .NET Core 应用程序的支持。In this release we’re bringing back this experience to UWP developers and adding support for WPF .NET Core applications. 此功能仍处于开发阶段,并且将来会继续改进,以使其恢复与 .NET Framework 对话功能的功能奇偶一致性。This feature is still in development and will continue to improve in the future to bring back feature parity with .NET Framework dialog capabilities.

XAML 编辑器XAML Editor

  • #regions IntelliSense 改进: 从 Visual Studio 2015 开始,#regions 支持已适用于 WPF 和 UWP XAML 开发人员,更适用于 Xamarin.Forms。Improvements to #regions IntelliSense: Starting with Visual Studio 2015 #region support has been available for WPF and UWP XAML developers and more recently for Xamarin.Forms. 在此版本中,我们修复了 IntelliSense bug,通过此修复,#regions 现在会在你开始键入 <! 时正确显示。In this release we’ve fixed an IntelliSense bug, with this fix #regions will now show properly as you begin to type <!. 我们还添加了一种功能,使 #regions 能够在任何元素嵌套级别中正常工作。We have also added the ability for #regions to work correctly across any element nesting levels.
  • XAML IntelliSense 中的代码片段: IntelliSense 已经过增强,以支持显示 XAML 代码片段,这将适用于内置代码片段以及你手动添加的任何自定义代码片段。Snippets in XAML IntelliSense: IntelliSense has been enhanced to support showing XAML snippets, this will work for both built-in snippets and any custom snippets that you add manually. 从此版本开始,我们还会包括一些现成的 XAML 代码片段:#region、列定义、行定义、资源库和标记。Starting with this release we’re also including some out-of-the-box XAML snippets: #region, Column definition, Row definition, Setter and Tag.
  • 弹出 XAML 编辑器作为设计器的单独窗口: 现在,可以使用 XAML 选项卡旁边新的弹出 XAML 按钮轻松地将 XAML 设计器及其基础 XAML 编辑器拆分为单独的窗口。单击后,XAML 设计器将最小化其附加的 XAML 选项卡,并仅针对 XAML 编辑器视图弹出一个新窗口。Pop up XAML editor as a separate window from designer: It is now possible to easily split the XAML Designer and its underlying XAML editor into separate windows using the new Pop up XAML button next to the XAML tab. When clicked the XAML designer will minimize its attached XAML tab and pop open a new window for just the XAML editor view. 可以将此新窗口移动到 Visual Studio 中的任何显示或选项卡组。You can move this new window to any display or tab group in Visual Studio. 请注意,仍可以展开原始 XAML 视图,但无论如何,同一文件的所有 XAML 视图都将实时保持同步。Note that it is still possible to expand the original XAML view but regardless all XAML views of the same file will stay synchronized in real-time.
Pop up XAML code window
弹出 XAML 代码窗口Pop up XAML code window
  • 显示引用的程序集的资源: XAML IntelliSense 已更新,以支持在引用的程序集中显示 XAML 资源(如果源不可用),用于 WPF Framework 和 WPF .NET Core 项目。Displaying resources for referenced assemblies: XAML IntelliSense has been updated to support displaying XAML resources from a referenced assembly (when source is not available) for WPF Framework and WPF .NET Core projects.

XAML 调试工具XAML Debugging Tools

  • 实时可视化树中的“仅我的 XAML”: Live Visual Tree 是一项功能,当 UWP 和 WPF 开发人员在调试模式下运行其应用程序时均可用该功能,并且该功能是与 XAML 热重载相关的实时编辑工具的一部分。Just My XAML in Live Visual Tree: The Live Visual Tree is a feature that is available to both UWP and WPF developers when they run their application in debug mode and is part of the live editing tooling related to XAML Hot Reload. 以前,该功能会显示所附加的运行应用程序的完整实时可视化树,无需任何筛选器即可查看你在应用程序中编写的 XAML。Previously the feature would display the full live visual tree of the attached running application with no filter possible to see just the XAML you’ve written in your app. 这导致了杂乱的体验,并且根据客户反馈,我们添加了一个名为“仅我的 XAML”的新默认值,它会将树限制为仅在你的应用程序中编写的控件。This made for a very noisy experience and based on customer feedback we’ve added a new default called “Just My XAML” which will limit the tree to just controls you wrote in your application. 虽然这是新的默认设置,但仍可以通过分叉实时可视化树本身中的按钮或通过新设置返回到以前的行为(如下所示:选项 > 调试 > 常规 > 启用“仅我的 XAML”)While this is the new default it is still possible to go back to the previous behavior through either the button within tine Live Visual Tree itself or through a new setting (found under: Options > Debugging > General > Enable Just My XAML)
Show Just My XAML in Live Visual Tree
显示实时可视化树中的“仅我的 XAML”Show Just My XAML in Live Visual Tree

资源和模板Resources & Templates

  • 合并资源字典: 现在,可以使用通过“解决方案资源管理器”提供的新功能轻松地将 UWP/WPF 项目中的现有资源字典与任何有效的 XAML 文件合并。Merge Resource Dictionary: It is now possible to easily merge an existing resource dictionary within your UWP/WPF project with any valid XAML file using the new feature available through the solution explorer. 只需打开要在其中添加合并语句的 XAML 文件,然后查找要合并的文件,然后在“解决方案资源管理器”中右键单击该文件。Simply open the XAML file in which you want to add the merge statement, then find the file you wish to merge in and right-click on it in solution explorer. 在上下文菜单中,选择“将资源字典合并到活动窗口”选项,该选项将添加带有路径的正确合并 XAML。In the context menu select the option “Merge Resource Dictionary Into Active Window”, which will add the right merge XAML with path.
Merge Resource Dictionary
合并资源字典Merge Resource Dictionary
  • 编辑模板现在可与第三方控件结合使用: 现在可以创建控件模板的副本,即使它不是作为源代码的解决方案的一部分。Edit Template now works with controls from 3rd party controls: It is now possible to create a copy of a controls template even when it’s not part of your solution as source code. 通过此更改,“编辑模板”功能现在可供使用,并且可以像提供源的第一方元素一样使用。With this change the “Edit Template” feature will now be available and work as it does for 1st party elements where the source is available today. 请注意,此功能适用于第三方控件库和不提供源的第一方。Note that this feature is applicable to both 3rd party control libraries and 1st party where source isn’t available.

Release Notes Icon Visual Studio 2019 版本 16.4 预览版 2Visual Studio 2019 version 16.4 Preview 2 New release icon

发布时间:2019 年 10 月 15 日 released October 15, 2019

Visual Studio 2019 版本 16.4 预览版 2 中修复的主要问题Top Issues Fixed in Visual Studio 2019 version 16.4 Preview 2

Visual Studio 2019 版本 16.4 预览版 2 中的新增功能摘要Summary of What's New in Visual Studio 2019 version 16.4 Preview 2

Visual Studio 2019 版本 16.4 预览版 2 中的新增功能详细信息Details of What's New in Visual Studio 2019 version 16.4 Preview 2

C++C++

  • Visual Studio CMake 项目现在提供概述页面,可帮助你开始进行跨平台开发。Visual Studio CMake projects now have Overview Pages to help you get started with cross-platform development. 这些页面是动态的,有助于连接到 Linux 系统并将 Linux 或 WSL 配置添加到 CMake 项目。These pages are dynamic and help you connect to a Linux system and add a Linux or WSL configuration to your CMake project.
CMake Overview Pages
CMake 概述页CMake Overview Pages
  • 现在可以通过 CMakeSettings.json 进一步配置要在 CMake 项目中使用的代码分析工具。You can now further configure which code analysis tool(s) to use in CMake projects via CMakeSettings.json. 请参阅 C++ 团队博客以了解详细信息。See the C++ Team Blog for more information.
Clang-Tidy warnings in the Error List
错误列表中的 Clang-Tidy 警告Clang-Tidy warnings in the Error List
  • CMake 项目的启动下拉菜单现在会显示最近使用的目标,并且可以进行筛选。The launch drop-down menu for CMake projects now displays your most recently used targets and can be filtered.
  • C++/CLI 现在支持与 Windows 上的 .NET Core 3.1 和更高版本互操作。C++/CLI now supports interop with .NET Core 3.1 and higher on Windows.
  • 现可为使用 Windows 上的 MSVC 编译的项目启用 ASan 以进行 C++ 代码的运行时检测,这有助于检测内存错误。You can now enable ASan for projects compiled with MSVC on Windows for runtime instrumentation of C++ code that helps with detection of memory errors.

对发布到 GitHub 的支持Publish to GitHub Support

  • Visual Studio 的 GitHub Essentials 现在包含适用于 Visual Studio 的 GitHub 扩展中的“发布到 GitHub”功能。The publish to GitHub feature that was a part of the GitHub Extension for Visual Studio is now included in Visual Studio’s GitHub Essentials.
  • 现可使用“团队资源管理器同步”页面上的“发布到 GitHub”按钮将本地 Git 存储库发布到 GitHub。You can now publish local Git repositories to GitHub using the Publish to GitHub button on Team Explorer Synchronization page.

Visual Studio 中的垂直文档选项卡Vertical Document Tabs in Visual Studio

在位于编辑器左侧或右侧的垂直列表中管理文档选项卡。Manage your document tabs in a vertical list on either the left or right side of your editor.

Visual Studio 中的垂直文档选项卡Vertical Document Tabs in Visual Studio

集成终端Integrated terminal

  • 现可创建多个终端实例You can now create multiple terminal instances
  • 开发人员 PowerShell、开发人员命令提示和任何可用的 WSL 发行版的配置文件将在首次启动时或使用配置文件的还原按钮后自动生成Profiles for Developer PowerShell, Developer Command Prompt and any available WSL distros are automatically generated on first launch or after using the profile's restore button
  • 终端支持所选 Visual Studio 颜色主题The terminal supports the selected Visual Studio color theme

自动隐藏工具窗口Autohide tool windows

启用此预览功能选项,可以避免由于在启动 Visual Studio 时打开多个工具窗口而引入的启动延迟。Enabling this preview feature option allows you to skip startup delays introduced by launching Visual Studio with multiple tool windows opened.

.NET 效率.NET Productivity

  • 现在可以通过错误列表直接配置代码样式规则的严重性级别。You can now configure the severity level of a code style rule directly through the error list. 将光标置于错误、警告或建议上。Place your cursor on the error, warning, or suggestion. 右键单击,然后选择“启动”。 Right click and select Set severity. 然后选择要为该规则配置的严重性级别。Then select the severity level you would like to configure for that rule. 这将使用规则的新严重性更新现有的 EditorConfig。This will update your existing EditorConfig with the rule’s new severity. 这也适用于第三方分析器。This also works for third party analyzers.
Set rule severity directly through the error list
直接通过错误列表设置规则严重性Set rule severity directly through the error list
  • 现在可以通过“查找所有引用”按类型和成员进行分组。Find All References now allows you to group by type and member.
Group by type and member in Find All References
在“查找所有引用”中按类型和成员分组Group by type and member in Find All References
  • 现在可以将局部函数设置为静态,并将在函数外部定义的变量传入到该函数的声明和调用。You can now make a local function static and pass in variables defined outside the function to the function’s declaration and calls. 将光标置于局部函数名称上。Place your cursor on the local function name. 按 (Ctrl+.) 触发“快速操作和重构”菜单 。Press (Ctrl+.) to trigger the Quick Actions and Refactorings menu. 选择“将局部函数设置为 static” 。Select Make local function static.
Make local function static
将局部函数设置为静态Make local function static
  • 现在可以将变量显式传入局部静态函数。You can now pass a variable explicitly into a local static function. 将光标置于静态局部函数中的变量上。Place your cursor on the variable in the static local function. 按 (Ctrl+.) 触发“快速操作和重构”菜单 。Press (Ctrl+.) to trigger the Quick Actions and Refactorings menu. 选择“将变量显式传入局部静态函数”。 Select Pass variable explicitly in local static function.
Pass a variable into a local static function
将变量传入本地静态函数Pass a variable into a local static function

Release Notes Icon Visual Studio 2019 版本 16.4 预览版 1Visual Studio 2019 version 16.4 Preview 1

发布时间:2019 年 9 月 23 日 released September 23, 2019

Visual Studio 2019 版本 16.4 预览版 1 中的新增功能摘要Summary of What's New in Visual Studio 2019 version 16.4 Preview 1

Visual Studio 2019 版本 16.4 预览版 1 中修复的主要开发人员社区问题Top Developer Community Issues Fixed in Visual Studio 2019 version 16.4 Preview 1

Visual Studio 2019 版本 16.4 预览版 1 中的新增功能详细信息Details of What's New in Visual Studio 2019 version 16.4 Preview 1

C++C++

  • 无论你使用 Clang 还是 MSVC 工具集,代码分析现在都本机支持 MSBuild 和 CMake 项目的 Clang-Tidy。Code Analysis now natively supports Clang-Tidy for both MSBuild and CMake projects, whether you're using a Clang or MSVC toolset. clang-tidy 检查可以作为后台代码分析的一部分运行,显示为编辑器内的警告(波形曲线),并显示在错误列表中。clang-tidy checks can run as part of background code analysis, appear as in-editor warnings (squiggles), and display in the Error List.

.NET Web 工具.NET Web Tools

  • 管理发布依赖项或使用连接服务时,自动检测 SQL Server 和 Azure 存储连接字符串。Automatic detection of SQL Server and Azure Storage connections strings when managing publish dependencies or using Connected Services. 它们以下拉列表的形式提供给用户,以供用户选择,而不必重新输入。They are offered in a drop-list for users to pick from, whereas before they had to re-type them in.
  • 添加了对使用 64 位运行时开发 Azure Functions 的支持Added support for developing Azure Functions using the 64bit runtime
  • 添加了对 .NET Core 3.0 应用发布选项的支持:准备运行 (Crossgen)、链接和 SingleExeAdded support for .NET Core 3.0 app publishing options: Ready to Run (Crossgen), Linking, and SingleExe

.NET 效率.NET Productivity

  • 现在可以通过编辑器直接配置代码样式规则的严重性级别。You can now configure the severity level of a code style rule directly through the editor. 如果用户当前没有 .editorconfig 文件,将自动生成该文件。If a user does not currently have an .editorconfig file, one will be generated for them. 请将光标置于错误、警告或建议上,然后键入 (Ctrl +.),以打开“快速操作和重构”菜单 。Place your cursor on the error, warning, or suggestion and type (Ctrl+.) to open the Quick Actions and Refactorings menu. 选择“配置或取消问题”。Select ‘Configure or Suppress issues’. 然后选择规则并选择要为该规则配置的严重性级别。Then select the rule and choose the severity level you would like to configure for that rule. 这将使用规则的新严重性更新现有的 EditorConfig。This will update your existing EditorConfig with the rule’s new severity. 这也适用于第三方分析器。This also works for third party analyzers.
Set rule severity directly through the editor
直接通过编辑器设置规则严重性Set rule severity directly through the editor
  • 你现在可以使用“Go To Base”命令向上导航到继承链 。You can now use the Go To Base command to navigate up the inheritance chain. 要导航到继承层次结构的元素的上下文(右键单击)菜单上提供 Go To Base 命令。Go To Base command is available on the context (right-click) menu of the element you want to navigate the inheritance hierarchy. 也可以键入 (Alt+Home)。 Or you can type (Alt+Home). 如果结果不止一个,则会打开一个工具窗口,其中包含可以选择导航到其中的所有结果。If there is more than one result a tool window will open with all of the results that you can choose to navigate to.
Go To Base
Go To BaseGo To Base
  • 你现在可以为所有参数添加 Null 检查。You can now add null checks for all parameters. 这将添加用于检查所有可为空的、非选中参数是否为 Null 的 if 语句。This will add if statements that check nullity of all the nullable, non-checked parameters. 将光标置于方法中的任何参数上。Place your cursor on any parameter within the method. 按 (Ctrl+.) 触发“快速操作和重构”菜单 。Press (Ctrl+.) to trigger the Quick Actions and Refactorings menu. 选择“为所有参数添加 Null 检查”选项。Select the option to ‘Add null checks for all parameters’.
Add null checks for all parameters
为所有参数添加 Null 检查Add null checks for all parameters
  • 无 XML 文档的方法现在可以从其覆盖的方法自动继承 XML 文档。Methods that have no XML documentation can now automatically inherit XML documentation from the method it is overriding. 请将光标置于实现了已记录接口方法的未记录方法上。Place your cursor over the undocumented method that implements a documented interface method. 然后,“快速信息”将显示接口方法中的 XML 文档。Quick Info will then display the XML documentation from the interface method.
XML inherit documentation
XML 继承文档XML inherit documentation

已知问题Known Issues

通过以下链接查看 Visual Studio 2019 中所有待解决问题和可用暂避方法。See all open issues and available workarounds in Visual Studio 2019 by following the below link.


反馈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