Visual Studio 2017(版本 15.0)发行说明 Visual Studio 2017 version 15.0 Release Notes


开发人员社区 | 系统要求 | 兼容性 | 可分发代码 | 许可条款 | 博客 | 发行节奏Developer Community | System Requirements | Compatibility | Distributable Code | License Terms | Blogs | Release Rhythm


备注

此版本不是最新版本的 Visual Studio 2017。This is not the latest version of Visual Studio 2017. 若要查看最新版 Visual Studio 2017 的相关信息,请访问最新发行说明页。To see information on the latest version of Visual Studio 2017, please visit the current Release Notes page.

提示

可在本页底部切换页面语言。You can switch the page language at the bottom of this page. 单击Click the 图标搜索语言,或从可用语言列表中选择。 icon, search for your language, or select from the list of available languages.


反馈Feedback

我们期待你的宝贵意见和建议!We’d love to hear from you! 对于这些问题,可通过安装程序或 Visual Studio IDE 右上角的“报告问题”选项告知我们。For issues, let us know via the Report a Problem option in the upper right-hand corner of either the installer or the Visual Studio IDE itself. 必须向The Feedback Icon 图标位于右上角。icon is located in the upper right-hand corner. 可以在 Visual Studio 开发者社区中跟踪问题,也可在其中提问和找到答案。You can track your issues in the Visual Studio Developer Community, where you can ask questions and find answers. 也可以通过 UserVoice 提出产品建议或通过实时聊天客户支持获取免费的安装帮助。You can also make a product suggestion through UserVoice or get free installation help through our Live Chat support.


发布历史记录Release History


下载 Visual Studio 2017 的最新版本Download the Current Release of Visual Studio 2017

单击按钮下载最新版 Visual Studio 2017。Click the button to download the latest version of Visual Studio 2017. 有关说明,请参阅安装 Visual Studio 2017For instructions, see Install Visual Studio 2017.

注意:安装包大小会根据当前 Visual Studio 配置而有所不同。Note: Installation package size will vary depending on your current Visual Studio configuration.


发布日期:2018 年 4 月 10 日 - Visual Studio 2017 版本 15.0 (26228.30)Release Date: April 10, 2018 - Visual Studio 2017 version 15.0 (26228.30)

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

有关 Microsoft Visual Studio 信息泄漏漏洞的 Microsoft 安全公告 Microsoft Security Advisories for Microsoft Visual Studio Information Disclosure Vulnerability

CVE 2018 1037:如果 Visual Studio 在编译程序数据库 (PDB) 文件时以不当方式公开未初始化内存的有限内容,就会出现信息泄漏漏洞。CVE-2018-1037: An information disclosure vulnerability exists when Visual Studio improperly discloses limited contents of uninitialized memory while compiling program database (PDB) files. 如果攻击者已利用此信息泄漏漏洞,可以通过用于编译 PDB 文件的 Visual Studio 实例来查看未初始化内存。An attacker who took advantage of this information disclosure could view uninitialized memory from the Visual Studio instance used to compile the PDB file.

攻击者必须获取对使用 Visual Studio 易受攻击版本创建的受影响 PDB 文件的访问权限,才能利用此漏洞。To take advantage of the vulnerability, an attacker would require access to an affected PDB file created using a vulnerable version of Visual Studio. 攻击者无法强迫开发人员生成此信息泄漏。An attacker would have no way to force a developer to produce this information disclosure.

安全更新程序通过更正 PDB 文件在项目编译时的生成方式来修复此漏洞。The security update addresses the vulnerability by correcting how PDB files are generated when a project is compiled.

重要

有关详细信息,请参阅 CVE-2018-1037 安全更新程序。For more information, see the security update for CVE-2018-1037.


发布日期:2018 年 3 月 13 日 - Visual Studio 2017 版本 15.0 (26228.29)Release Date: March 13, 2018 - Visual Studio 2017 version 15.0 (26228.29)

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

.NET Core 的 Microsoft 安全建议 Microsoft Security Advisories for .NET Core

CVE-2018-0875:Microsoft 发现 .NET Core 公共版本存在安全漏洞,其中恶意文件或 Web 请求可能导致拒绝服务 (DoS) 攻击。CVE-2018-0875: Microsoft is aware of a security vulnerability in the public versions of .NET Core where a malicious file or web request could cause a denial of service (DoS) attack.

  • 建议系统管理员将 .NET Core 运行时更新到 1.0.10、1.1.7 或 2.0.6 版本。System administrators are advised to update their .NET Core runtimes to versions 1.0.10, 1.1.7 or 2.0.6. 建议开发人员将 .NET Core SDK 更新到 1.1.8 或 2.1.101。Developers are advised to update their .NET Core SDK to versions 1.1.8 or 2.1.101.

发行日期:2018 年 2 月 21 日 - Visual Studio 2017 版本 15.0 (26228.26)Release Date: February 21, 2018 - Visual Studio 2017 version 15.0 (26228.26)

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

团队资源管理器支持 TLSv1.2。Team Explorer supports TLSv1.2. 我们已更新随附 Visual Studio 提供的 Git 和 Git 凭据管理器组件。We have updated the Git and the Git Credential Manager components that ship in Visual Studio. 另外还更新了可选的适用于 Windows 的 Git 组件。The optional Git for Windows component has also been updated. 此更新允许 Git 连接到不再支持 TLSv1 和 TLSv1.1 而支持 TLSv1.2 的服务。This update allows Git to connect to services that have deprecated support for TLSv1 and TLSv1.1 in favor of TLSv1.2.


发行日期:2018 年 2 月 2 日 - Visual Studio 2017 15.0 版 (26228.23)Release Date: February 2, 2018 - Visual Studio 2017 version 15.0 (26228.23)

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

  • MSVC 编译器已更新,提供对 /Qspectre 开关的支持,当编译器检测到 Spectre 变体 1 的实例时,此开关会自动插入推理屏障。The MSVC compiler has been updated with support for the /Qspectre switch which will automatically insert a speculation barrier when the compiler detects instances of Spectre variant 1. 有关 /Qspectre 的详细信息,请参阅 Visual C++ 团队博客For more information about /Qspectre please refer to the Visual C++ Team Blog.
  • JDK 提升至 8u161 以修复下载错误。The JDK was bumped to 8u161 to fix download errors.

发布日期:2018 年 1 月 9 日 - Visual Studio 2017 版本 15.0 (26228.21)Release Date: January 9, 2018 - Visual Studio 2017 version 15.0 (26228.21)

此版本中已修复的问题Issues Fixed in this Release

.NET Core 的 Microsoft 安全建议 Microsoft Security Advisories for .NET Core

CVE-2018-0786 X509 证书验证中的安全功能免验证 Microsoft 正在发布此安全建议,以提供公共版 .NET Core 1.0、1.1 和 2.0 中漏洞的相关信息。CVE-2018-0786 Security Feature Bypass in X509 Certificate Validation Microsoft is releasing this security advisory to provide information about a vulnerability in the public versions of .NET Core 1.0 and 1.1, and 2.0. 此建议还指导开发者如何正确地更新应用程序。This advisory also provides guidance on what developers can do to update their applications correctly. 此安全建议适用于 UWP 的 .NET Native。This security advisory is also applicable to .NET native for UWP.

Microsoft 可察觉公共版 .NET Core 中的安全漏洞,利用此漏洞,攻击者提交特定用途标记为无效的证书,但组件会将此证书用于该用途。Microsoft is aware of a security vulnerability in the public versions of .NET Core where an attacker could present a certificate that is marked invalid for a specific use, but a component uses it for that purpose. 此操作会忽略增强型密钥使用标记。This action disregards the Enhanced Key Usage tagging.

安全更新通过确保 .NET Core 组件完全验证证书,解决了此漏洞。The security update addresses the vulnerability by ensuring that .NET Core components completely validate certificates. 建议系统管理员将 .NET Core 运行时更新到 1.0.9、1.1.6 或 2.0.5 版本。System administrators are advised to update their .NET Core runtimes to versions 1.0.9, 1.1.6 and 2.0.5. 建议开发人员将 .NET Core SDK 更新到 2.1.4 或 1.1.7 版本。Developers are advised to update their .NET Core SDK to version 2.1.4 or 1.1.7.

CVE-2018-0764 分析 XML 文档时拒绝服务 Microsoft 正在发布此安全建议,以提供公共版 .NET Core 1.0、1.1 和 2.0 中漏洞的相关信息。CVE-2018-0764 Denial of Service when parsing XML documents Microsoft is releasing this security advisory to provide information about a vulnerability in the public versions of .NET Core 1.0 and 1.1, and 2.0. 此建议还指导开发者如何正确地更新应用程序。This advisory also provides guidance on what developers can do to update their applications correctly.

Microsoft 可察觉由于 XML 文档处理不当,在所有公共版 .NET Core 中产生的拒绝服务漏洞。Microsoft is aware of a Denial of Service vulnerability in all public versions of .NET core due to improper processing of XML documents. 如果攻击者成功利用此漏洞,可能会导致对 .NET 应用程序拒绝服务。An attacker who successfully exploited this vulnerability could cause a denial of service against a .NET application. 远程未经过身份验证的攻击者可以通过向 .NET Core 应用程序发布特制请求利用此漏洞。A remote unauthenticated attacker could exploit this vulnerability by issuing specially crafted requests to a .NET Core application.

更新通过更正 .NET Core 对 XML 文档处理的操作方式解决了此漏洞。The update addresses the vulnerability by correcting how .NET core handles XML document processing. 建议系统管理员将 .NET Core 运行时更新到 1.0.9、1.1.6 或 2.0.5 版本。System administrators are advised to update their .NET Core runtimes to versions 1.0.9, 1.1.6 and 2.0.5. 建议开发人员将 .NET Core SDK 更新到 2.1.4 或 1.1.7 版本。Developers are advised to update their .NET Core SDK to version 2.1.4 or 1.1.7.


发布日期:2017 年 12 月 6 日 - Visual Studio 2017 15.0 版 (26228.18)Release Date: December 6, 2017 - Visual Studio 2017 version 15.0 (26228.18)

此版本中已修复的问题Issues Fixed in this Release

ASP.NET Core 安全建议 ASP.NET Core Security Advisories

Microsoft 已发布面向 ASP.NET Core 的安全建议。Microsoft has released security advisories for ASP.NET Core. 有关详细信息,请参阅 ASP.NET Core 存储库中相应的公告。Details can be found in corresponding announcements in the ASP.NET Core repo. 请注意以下信息:绕过 CVE-2017-8700 CORS 可能导致信息泄露:ASP.NET Core 1.0 和 1.1 中存在安全漏洞,因为这两个版本可绕过跨源资源共享 (CORS),造成信息泄露。Please note the following information: CVE-2017-8700 CORS bypass can enable Information Disclosure: There is a security vulnerability in ASP.NET Core 1.0 and 1.1 where Cross-Origin Resource Sharing (CORS) can be bypassed, leading to information disclosure. 使用 ASP.NET Core 1.0 和 ASP.NET Core 1.1 创建的新项目现在将使用包含以上安全更新的包版本。New projects created with ASP.NET Core 1.0 and ASP.NET Core 1.1 will now use package versions that include the above security update. 对于现有项目,用户可以使用“管理 NuGet 程序包”对话框将包更新到较新版本。For existing projects, users can update their packages to newer versions using the Manage NuGet Packages dialog.


发布日期:2017 年 11 月 14 日 - Visual Studio 2017 15.0 版 (26228.17)Release Date: November 14, 2017 - Visual Studio 2017 version 15.0 (26228.17)

此版本中已修复的问题Issues Fixed in this Release

.NET Core 和 ASP.NET Core 安全建议 .NET Core and ASP.NET Core Security Advisories

Microsoft 已发布面向 .NET Core 和 ASP.NET Core 的安全建议。Microsoft has released security advisories for .NET Core and ASP.NET Core. 有关详细信息,请参阅 .NET CoreASP.NET Core 存储库中的对应公告。Details can be found in corresponding announcements in the .NET Core and ASP.NET Core repos. 请注意以下信息:Please note the following information:

  • CVE-2017-8585 格式不正确的证书可能导致拒绝服务:.NET Core 1.0、1.1 和 2.0 中存在安全漏洞,格式不正确的证书或其他 ASN.1 格式的数据可能在 Linux 和 macOS 上引发无限循环,导致拒绝服务。CVE-2017-8585 Malformed Certificate can cause Denial of Service: There is a security vulnerability in .NET Core 1.0, 1.1 and 2.0 where a malformed certificate or other ASN.1 formatted data could lead to a denial of service via an infinite loop on Linux and macOS. 建议系统管理员将 .NET Core 运行时更新到 1.0.8、1.1.5 或 2.0.1 版本。System administrators are advised to update their .NET Core runtimes to versions 1.0.8, 1.1.5 and 2.0.1. 建议开发人员将 .NET Core SDK 更新到 2.0.3 或 1.1.5 版本。Developers are advised to update their .NET Core SDK to version 2.0.3 or 1.1.5.

  • CVE-2017-8700 CORS 绕过可能导致信息泄露:ASP.NET Core 1.0 和 1.1 中存在安全漏洞,跨源资源共享 (CORS) 可被绕过,造成信息泄露。CVE-2017-8700 CORS bypass can enable Information Disclosure: There is a security vulnerability in ASP.NET Core 1.0 and 1.1 where Cross-Origin Resource Sharing (CORS) can be bypassed, leading to information disclosure.

  • CVE-2017-11879 开放重定向可能导致特权提升:ASP.NET Core 2.0 中存在安全漏洞,其中存在开放重定向,可能导致特权提升。CVE-2017-11879 Open Redirect can cause Elevation Of Privilege: There is a security vulnerability in ASP.NET Core 2.0 where an Open Redirect exists, leading to Elevation Of Privilege.

  • CVE-2017-11770 拒绝服务漏洞:ASP.NET Core 1.0、1.1 和 2.0 中存在安全漏洞,当通过 Windows Http.Sys 托管该应用程序时,Windows Http.Sys 中格式不正确的请求可能导致拒绝服务。CVE-2017-11770 Denial Of Service Vulnerability: There is a security vulnerability in ASP.NET Core 1.0, 1.1 and 2.0 when the application is hosted through Windows Http.Sys where a malformed request can lead to a Denial Of Service.

使用 ASP.NET Core 1.0 和 ASP.NET Core 1.1 创建的新项目现在将使用包含以上安全更新的包版本。New projects created with ASP.NET Core 1.0 and ASP.NET Core 1.1 will now use package versions that include the above security updates. 对于现有项目,用户可以使用“管理 NuGet 程序包”对话框将包更新到较新版本。For existing projects, users can update their packages to newer versions using the Manage NuGet Packages dialog.


发布日期:2017 年 9 月 18 日 - Visual Studio 2017 版本 15.0 (26228.16)Release Date: September 18, 2017 - Visual Studio 2017 version 15.0 (26228.16)

此版本中已修复的问题Issues Fixed in this Release


发布日期:2017 年 5 月 23 日 - Visual Studio 2017 版本 15.0 (26228.13)Release Date: May 23, 2017 - Visual Studio 2017 version 15.0 (26228.13)

此版本中已修复的问题Issues Fixed in this Release

离线安装方案不再需要连接 Internet。Offline install scenarios no longer require internet access.


发布日期:2017 年 3 月 31 日 - Visual Studio 2017 版本 15.0 (26228.12)Release Date: March 31, 2017 - Visual Studio 2017 version 15.0 (26228.12)

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

现在 Visual Studio 2017 的 Xamarin.VS 扩展中支持 Xcode 8.3、iOS 10.3、watchOS 3.2 和 tvOS 10.2 工具和 API。We now support Xcode 8.3, iOS 10.3, watchOS 3.2, and tvOS 10.2 tools and APIs in the Xamarin.VS Extension for Visual Studio 2017.


发布日期:2017 年 3 月 28 日 - Visual Studio 2017 版本 15.0 (26228.10)Release Date: March 28, 2017 - Visual Studio 2017 version 15.0 (26228.10)

此版本中已修复的问题Issues Fixed in this Release

这些是在内部版本 26228.10 中解决的客户报告的问题:These are the customer-reported issues addressed in build 26228.10:


发布日期:2017 年 3 月 14 日 - Visual Studio 2017 版本 15.0 (26228.09)Release Date: March 14, 2017 - Visual Studio 2017 version 15.0 (26228.09)

此版本中已修复的问题Issues Fixed in this Release

这些是在内部版本 26228.09 中解决的客户报告的问题:These are the customer-reported issues addressed in build 26228.09:


发布日期:2017 年 3 月 7 日 - Visual Studio 2017 版本 15.0 (26228.04)Release Date: March 7, 2017 - Visual Studio 2017 version 15.0 (26228.04)

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

开发:快速导航、编写并修复代码Develop: Navigate, write, and fix your code fast

  • 新的安装体验降低了最小内存需求量,可以实现更快速、更定制化的安装,并且支持脱机安装。New Installation Experience has a reduced minimum footprint for faster and more customizable installations, as well as support for offline installs.
  • Visual Studio IDE 大幅改进了 Visual Studio 2017,包括减少启动和解决方案加载时间、改进登录和标识、改进代码导航以及增添打开文件视图和链接的服务,实现了应用和任意本地服务或云端服务之间的连接。Visual Studio IDE provides a broad range of enhancements in Visual Studio 2017, including reduction in startup and solution load times, sign in and identity improvements, improved code navigation, open folder view, and connected services enable connections between your app and any service on-premises or in the cloud.
  • 2015 和 2017 之间在 Visual C++ 方面没有重大更改。There are no breaking changes for Visual C++ between 2015 and 2017. 更佳的 C++14 一致性级别、CMake 支持、生成吞吐量和编辑器效率。Better C++14 conformance level, CMake support, build throughput, and productivity in the editor.
  • C# 和 Visual Basic 扩展了对新的 C# 7.0 和 Visual Basic 15 语言功能的支持,引入了新的重构,只需一个操作即可整理源代码。C# and Visual Basic extend support for new C# 7.0 and Visual Basic 15 language features, and introduces new refactorings that allow you to organize source code with one action.
  • F# 支持 F# 4.1 语言功能、对 F# 编译器和 FSharp.Core 的改进,以及基于 Roslyn 工作区的新编辑器。F# support for F# 4.1 language features, improvements to the F# compiler and FSharp.Core, and a new editor based on Roslyn Workspaces.
  • JavaScript 和 TypeScript 拥有 TypeScript 2.1,可用于 Visual Studio 中的所有 TypeScript 项目。JavaScript and TypeScript has TypeScript 2.1 available for all TypeScript projects in Visual Studio. 提供新的 JavaScript 语言服务,并默认启用。A new JavaScript language service is available and enabled by default.

调试:轻松调试、探查和诊断Debug: Debug, profile, and diagnose with ease

调试和诊断对异常帮助器进行了大改造,且可以通过“运行时单击”更快地导航代码。Debugging and Diagnostics overhaul of the Exception Helper and faster code navigation with Run to Click. 此外,“诊断工具”窗口中增添了应用程序事件摘要,并对 CPU 工具实施了多项改进。Plus, a new summary of your application events in the Diagnostic Tools window and several improvements to the CPU Tool.

测试:使用全面的测试工具编写高质量代码Test: Write high-quality code with comprehensive testing tools

  • 实时单元测试现在可以在编辑器中将单元测试结果和代码覆盖率可视化。Live Unit Testing can now visualize unit testing results and code coverage live in the editor.
  • 测试工具使用测试资源管理器将自动化与测试用例工作项关联。Testing Tools associate automation with test case work items using the Test Explorer.

协作:使用版本控制、具备敏捷性且高效协作Collaborate: Use version control, be agile, and collaborate efficiently

  • 通过团队资源管理器中的新增 Git 功能和更新的连接体验,可以在 Visual Studio 2017 中使用 Git 完成更多工作,并可轻松找到要连接到的项目和存储库。New Git features in Team Explorer and updated connect experience to do more with Git in Visual Studio 2017 and easily find the projects and repos to which you want to connect.
  • 增强的 Visual Studio 反馈工作流报告问题协作性更佳。Enhanced Visual Studio Feedback Workflow has more collaborative Report-A-Problem. 搜索、跟进和投票,获取所有反馈的最新更新。Search, follow, and vote to get latest updates on all feedback.

扩展:构建自己的扩展,根据自身喜好进行自定义Extend: Customize to your liking by building your own extensions

  • Visual Studio 扩展:通过构建自己的扩展来按照自身喜好对 Visual Studio 进行自定义。Visual Studio Extensions: Customize Visual Studio to your liking by building your own extensions.
  • 项目和项模板的可发现性:突破性地改进了 Visual Studio 使用项目和项模板的方式,提升了模板发现的性能。Discoverability of Project and Item Templates: There is a breaking change with how Visual Studio consumes project and item templates to improve performance of template discovery.

装备:利用工具提高工作效率并探索新功能Equip: Utilize tooling to increase productivity and explore new capabilities

  • .NET Core 和 ASP.NET Core:这包含新的基于 MSBuild 的 .NET Core 工具的 1.0 最终版本。.NET Core and ASP.NET Core: This contains the 1.0 final release of the new MSBuild based .NET Core Tools. 使用 Visual Studio 2017 可创建 .NET Standard 库、.NET Core 应用/库和使用新 csproj 格式的 ASP.NET web 项目。Using Visual Studio 2017, you can create .NET Standard libraries, .NET Core apps/libraries, and ASP.NET web projects that use the new csproj format.
  • 通用 Windows 应用开发工具:此版本包括对 .NET Native 本机工具链、.NET Core NuGet 框架的更新、新的效率工具以及对即将推出的 Windows 10“创作者更新”SDK 的预览支持。Tools for Universal Windows App Development: Updates include a new version of the .NET Native toolchain, .NET Core NuGet framework, new productivity tools, and support for the Windows 10 "Creators Update" SDK.
  • Xamarin:Xamarin 4.3 添加了对 tvOS 的支持,同时改进了 iOS 资产目录支持和 XML 编辑体验。Xamarin: Xamarin 4.3 adds support for tvOS, while also improving iOS Assets Catalog support and the XML editing experience.
  • Visual Studio Tools for Apache Cordova:基于浏览器的新模拟器可实现快速编码并即时查看结果。Visual Studio Tools for Apache Cordova: A new browser-based simulator enables you to code fast and see the results immediately.
  • 针对 Visual Studio 的 Node.js 工具:更新侧重于稳定性、性能和总体产品质量。Node.js Tools for Visual Studio: Updates focused on stability, performance, and overall product quality.
  • Visual Studio Tools for Unity:现可通过新的 Visual Studio 安装程序中的“使用 Unity 的游戏开发”工作负载安装 Visual Studio Tools for Unity 3。Visual Studio Tools for Unity: Visual Studio Tools for Unity 3 is now available with the "Game Development with Unity" workload from the new Visual Studio installer.
  • Redgate 数据工具:为了将 DevOps 功能扩展到 SQL 数据库开发,Visual Studio 现在包含 Redgate 数据工具,其中包括 Redgate ReadyRoll Core、SQL 搜索和 SQL Prompt Core。Redgate Data Tools: To extend DevOps capabilities to SQL database development, Visual Studio now includes Redgate Data Tools, comprising Redgate ReadyRoll Core, SQL Search, and SQL Prompt Core.
  • NuGet:NuGet 现在支持将包依赖项信息作为包引用直接存储在项目文件中,同时保持包引用的可传递优势。NuGet: NuGet now supports storing package dependency information directly in project files as package references, while maintaining the advances of transitive package references.
  • 用于 XAML 应用的工具:现在可以通过 XAML 运行时工具栏跟踪焦点。Tools for XAML Apps: The XAML runtime toolbar now lets you track focus. 通过 XAML“编辑并继续”功能、XAML 编辑器改进和性能优化,提升了 XAML 的工作效率。XAML productivity has been improved with XAML Edit & Continue, improvements to the XAML Editor, and performance optimizations.
  • Data Tools 和 SQL Server:SQL Server Data Tools 的最新更新实现了对 Azure SQL 数据库和 SQL Server 2016 的最新功能的支持。Data Tools and SQL Server: The latest update of SQL Server Data Tools enables support for the newest features in Azure SQL Database and SQL Server 2016.
  • 开发人员分析工具:Visual Studio 2017 包括开发人员分析工具 v8.6,对 Visual Studio 中的 Application Insights 和 HockeyApp 功能做出了许多改进。Developer Analytics Tools: Visual Studio 2017 includes Developer Analytics Tools v8.6 with many improvements to the Application Insights and HockeyApp features in Visual Studio.
  • Visual Studio 的 Office 开发人员工具:包含了附带最新功能和更新的 Office 开发人员工具。Office Developer Tools for Visual Studio: Includes Office Developer Tools with the latest features and updates.
  • 体系结构依赖关系的实时验证:依赖关系验证关系图(又称层关系图)的实时通知。Live Architecture Dependency Validation: Real-time notifications of dependency validation diagrams (aka Layer diagrams).
  • 开发人员命令提示符:重构了脚本以支持新的安装体验。Developer Command Prompt: Refactored scripts to support the new installation experience.
  • 用于 .NET 的 Azure SDK:现可通过新的 Visual Studio 安装程序获取。Azure SDK for .NET: Now available from the new Visual Studio installer.

此版本中的新增功能What's New in this Version

安装体验 Installation Experience

我们很高兴推出新款全新设计的安装程序:We're delighted to introduce our new installer, which was designed from the ground up to:

  • 减少 Visual Studio 的最小内存占用量。Reduce the minimum footprint of Visual Studio.
  • 安装速度更快、系统影响更小和完全卸载。Install more quickly, with less system impact, and uninstall cleanly.
  • 方便你更轻松地选择并仅安装所需功能。Make it easier for you to select and install just the features you need.

首次安装 Visual Studio 2017 时,会获得新体验*(图 1)*:When you first install Visual Studio 2017, you'll see the new experience (Figure 1):

The new installation experience in Visual Studio 2017
(图 1)Visual Studio 2017 中的新安装体验(Figure 1) The new installation experience in Visual Studio 2017

最小的安装仅为数百兆字节,但仍然支持针对超过 20 种语言的基本代码编辑(包括源代码管理)。The smallest install is just a few hundred megabytes, yet still contains basic code editing support for more than twenty languages including source code control. 大部分用户会想安装更多功能。Most users will want to install more. 可添加一个或多个代表常见框架、语言和平台的“工作负载”,涵盖从 .NET 桌面开发到使用 Unity 的游戏开发等一切事务。You can add one or more 'workloads' that represent common frameworks, languages, and platforms - covering everything from .NET desktop development to game development with Unity.

如何更新 Visual StudioHow to Update Visual Studio

若要更新 Visual Studio,请运行 Visual Studio 安装程序并单击“更新”按钮。To update Visual Studio, run the Visual Studio Installer and click the "Update" button.

对新的安装程序提出反馈Feedback on the New Installer

可使用标题栏右上角处新安装程序客户端的“报告问题”和“提供建议”命令来报告问题或给出好评。You can report problems or praise using the Report a Problem and Provide a Suggestion commands from the new installer client in the upper right corner of the title bar. 我们想知道你在安装、卸载或修改安装时是否遇到错误,是否遇到异常安装时间(例如挂起)或意外错误消息。We want to know if you experience errors installing, uninstalling, or modifying your installation, as well as abnormal installation times (e.g. hangs) or unexpected error messages.

创建用于脱机安装和新命令行安装支持的布局Creating a Layout for Offline Installation and New Command-Line Installation Support

系统管理员和其他用户现在可以创建 Visual Studio 的脱机布局,其中包含了安装产品所需的所有内容,无需访问 Internet。System administrators and other users can now create an offline layout of Visual Studio that contains all content needed to install the product without requiring internet access. 此布局可以是完整的产品、工作负荷和/或组件的一个子集,以及一个或多个产品区域设置。This layout can be the full product, a subset of workloads and/or components, and one or more product locales. 请注意,创建脱机布局需要 Internet 访问。Note that creating the offline layout requires internet access. 有关详细信息,请参阅 Create an offline installation of Visual Studio 2017(创建 Visual Studio 2017 的脱机安装)。For more information, see Create an offline installation of Visual Studio 2017.

安装别名 Installation Nickname

Visual Studio Enterprise 和 Community(以及其他产品)现在可以并行安装在同一台计算机上。Visual Studio Enterprise and Community (among other products) can now be installed side-by-side on the same computer. 若要使标识这些安装更加容易,可以指定短名称或“别名”。To make identifying these installations simpler, you can specify a short name or "nickname". 例如,如果要安装 Visual Studio Enterprise,然后安装 Visual Studio Community,这两个程序在开始菜单上的显示是一样的。For example, if you were to install Visual Studio Enterprise, and then install Community, both would appear the same on the start menu. 可以为第二个程序提供别名,如“community”,开始菜单项中将显示诸如“Visual Studio 2017 (community)”和“Visual Studio 2017 (community) 开发人员命令提示”这样的名称。You can give the second one a nickname like "community", and the start menu items will appear with names such as "Visual Studio 2017 (community)" and "Developer Command Prompt for Visual Studio 2017 (community)".


Visual Studio IDE Visual Studio IDE

IDE 改进IDE Improvements

  • 已对 Visual Studio 进行优化以减少启动时间和解决方案加载时间。Visual Studio has been optimized to reduce startup time and solution load time. 首次启动 Visual Studio 提速 50%。The very first launch of Visual Studio is at least 50% faster.
  • Visual Studio 现可监视影响启动、解决方案加载或编辑的扩展性能。Visual Studio will now monitor extension performance that impacts startup, solution load, or editing. 通过 IDE 中的通知栏,将收到有关执行效果不佳的扩展的警报。You will receive alerts about poorly performing extensions via the Notification bar in the IDE. 借助新的性能中心(也可通过“帮助”>“管理 Visual Studio 性能”使用),可查看影响性能的扩展,还可发现影响启动性能的工具窗口并更改其启动加载行为。The new Performance Center (also available via Help > Manage Visual Studio Performance) lets you view not only extensions that are impacting performance, but also discover tool windows that are impacting your startup performance and change their startup load behavior.
  • 可在新的 Visual Studio 安装程序中选择 Visual Studio 适用的 GitHub 扩展。The GitHub extension for Visual Studio can be selected in the new Visual Studio installer.
  • 已将“重载所有项目”替换为“重载解决方案”,以在切换 VS 外部分支时获得更佳性能。Reload All Projects has been replaced with Reload Solution to support better performance when switching branches external to VS. 使用 Git 命令行切换分支时,请在切换分支后选择“重载解决方案”以最大程度地提升性能。When using the Git command line to switch branches, choose Reload Solution after the branch has switched to achieve the maximum performance improvement.
  • 增强了用于 .NET Core 和 ASP.NET Core 项目的文件通配功能。File globbing capabilities for .NET Core and ASP.NET Core projects have been enhanced. 请参阅项目文件通配,以获取更多详细信息。See project file globbing for more details.
  • 即将自动转到克隆后的存储库的文件夹视图。You are now automatically taken to the folder view of your repository after cloning. 可查看文件或使用新解决方案选择列表在解决方案资源管理器中打开解决方案。You can view files or open Solutions with the new Solution selection list in the Solution Explorer.
  • 引入了新的外部服务主机,它将替代 VSHub。A new external service host is being introduced that will replace VSHub. 此新的服务主机是一个外部进程,将在任务管理器中显示为 ServiceHub.Host.CLR.*.exe 和 ServiceHub.Host.Node.x86.exe。This new service host is an external process and will appear in Task Manager as ServiceHub.Host.CLR.*.exe, as well as ServiceHub.Host.Node.x86.exe. 此主机将最终消除与 VSHub 一起引入的 localhost http 流量,前者应可解决用户报告的产生干扰的 Fiddler 问题。This host will ultimately eliminate the localhost http traffic that was introduced with VSHub which should alleviate the noise Fiddler users reported.
  • 预发布许可证到期消息更明确地说明了当前的许可证状态。Pre-release license expiration messages more clearly communicate the current license state.
  • 现在,屏幕阅读器可以更轻松地访问“帐户设置”对话框。The Account Settings dialog is now more accessible to screen readers.
  • 现在,通过从 Visual Studio 安装程序中安装帮助查看器组件,可使用脱机帮助。Offline help is now available by installing the Help Viewer component from the Visual Studio installer.
  • 现在可以使用 Visual Studio 安装程序的“语言包”选项卡随时添加和删除多个用户界面语言。可以使用“工具”>“选项”>“国际设置”,在那些已安装的用户界面语言之间选择当前的用户界面语言。You can now add and remove multiple user interface languages at any time using the Visual Studio installer on the Language Packs tab. You can select the current user interface language among those installed using Tools > Options > International Settings.
  • 通过版本控制状态栏,你可以更轻松地将本地存储库发布到 SCC 主机,并跟踪未提交*(图 2)和未推送(图 3)*的工作。The version control status bar makes it easier to publish local repos to an SCC host and keep track of uncommitted (Figure 2) and un-pushed work (Figure 3).
Version Control - Unpublished commits example
(图 2)版本控制 - 未发布的提交示例(Figure 2) Version Control - Unpublished commits example
Version Control - No pending changes example
(图 3)版本控制 - 未挂起的更改示例(Figure 3) Version Control - No pending changes example

登录和标识改进Sign In and Identity Improvements

推出了一种新的标识服务,可用于跨 Microsoft 开发人员工具共享用户帐户。We introduced a new identity service that allows you to share user accounts across Microsoft developer tools. 在 Visual Studio 中,此共享包括团队资源管理器、Azure Tools 和 Windows 应用商店发布等功能。Within Visual Studio, this sharing includes features such as Team Explorer, Azure Tools, Windows Store publishing, and more. 现在,这些功能的登录体验共有且一致。These features now share a common and consistent sign in experience.

除了改进 Visual Studio,我们还在服务端部署了部分改进功能,让用户可安全保持登录状态,消除了每 12 小时便强制登录的要求。Along with improvements to Visual Studio, we have completed the deployment of some improvements on the service side that allow users to safely stay signed in and eliminate the forced sign in every 12 hours. 这解决了最常报告的登录问题。This addresses the most commonly reported sign in issue. 深入了解如何减少 Visual Studio 提示Learn more about fewer Visual Studio prompts.

起始页Start Page

重新设计的起始页拥有新的“打开”和“创建”功能:The redesigned Start Page has new Open and Create facilities:

  • 从 VSTS 获取远程存储库或使用我们更加醒目的 MRU,以轻松地打开本地项目和解决方案。Acquire remote repos from VSTS or use our more prominent MRU to open local projects and solutions easily.
  • 起始页 MRU 会显示在其他计算机上克隆的存储库,因此可在当前计算机上轻松克隆这些库。The Start Page MRU shows repos you've cloned on other machines so you can easily clone them on your current machine.
  • 通过可搜索的模板和最近使用的模板列表,直接从起始页新建项目。Create a new project directly from the Start Page with searchable templates and a list of recently used templates. 最近使用的模板也会在具有个性化帐户的 Visual Studio 实例间漫游。Recently used templates will also roam across Visual Studio instances with a personalization account.
  • 通过起始页上的“从 VSTS 签出”选项,快速启动 VSTS 体验的新克隆。Quickly launch the new Clone from VSTS experience through the "Checkout from VSTS" option on the Start Page.
  • 可删除的“入门”部分。A dismissible "Get Started" section.
  • “新闻”部分现可折叠:The News section is now collapsible:
    • 更新了新闻源中新添加的项上的徽章。Updated badge on newly added items in the News Feed.
    • 在新闻源处于折叠状态时,如果出现新项,则对新闻源扩展器设置徽章。Badge on News Feed expander if new items appear when the News Feed is collapsed.
  • 优化了视觉设计,由此解决了反馈的有关屏幕较小时元素截断的问题,同时提升了空间利用率。Refined visual design to address feedback about truncated elements on smaller screens and utilization of empty space.

下方显示了新的起始页*(图 4)*:The new Start page is shown below (Figure 4):

Start Page with Get Started and News
(图 4)带“入门”和“新闻”的起始页(Figure 4) Start Page with Get Started and News

改进了代码导航 Improved Code Navigation

Visual Studio 2017 中的代码导航功能有了显著改进:We've made significant improvements to code navigation features in Visual Studio 2017:

  • 通过“转到所有”(Ctrl+Ctrl+ T)可快速查找并转到代码中的文件、类型、方法和其他元素。Go To All (Ctrl+, or Ctrl+ T) lets you quickly find and go to files, types, methods, and other elements in your code. 通过它可找到任何类型的项,甚至在大型基本代码中亦可如此。It allows you to locate items of any kind, even in large code bases. 此外,若知道要查找的项类型,便可轻松进行筛选。What’s more, if you know what kind of item you’re after, you can filter down easily. 在 C#、Visual Basic 和 F# 中,我们还添加了模糊匹配,因此即使某个类型名称拼写错误,也仍然可获得结果。In C#, Visual Basic, and F#, we have also added "fuzzy" matching such that if you misspell a type name you will still get results. 还优化了“转到行”(Ctrl + G)体验。We've also modernized the Go To Line (Ctrl + G) experience. “转到”系列命令位于“编辑”菜单的顶部*(图 5)(图 6)*。You can find the Go To family of commands at the top of the Edit Menu (Figure 5) and (Figure 6).
Go To Results Filtered
(图 5)转到筛选的结果(Figure 5) Go To Results Filtered
Go To Line
(图 6)转到行(Figure 6) Go To Line
  • “查找所有引用”(Shift+F12) 已大幅改进(当前针对 C#、Visual Basic、F# 和 C++),可实现高级分组、筛选、分类、在引用结果中搜索以及结果着色(针对 C# 和 VB),让用户清晰了解引用并自信地找到所需的代码行。Find All References (Shift+F12) has been overhauled (currently for C#, Visual Basic, F#, and C++), providing advanced grouping, filtering, sorting, searching within reference results, and colorization for results (for C# and VB), so you can get a clear understanding of your references and get to the line of code you need with confidence. 鼠标悬停在引用项上时,会显示一个工具提示,其中显示源代码中该引用的上下文(针对 C# 和 VB)。On mouse hover on a reference item, a tooltip is displayed with the context of the reference in source code (for C# and VB). 通过切换工具栏中的“保存结果”按钮,“查找所有引用”的下一个调用将在新窗口中填充引用结果。By toggling on the Keep Results button in the toolbar, the next invocation of Find All References will populate reference results in a new window. 通过此操作,可将当前结果保留在现有窗口中*(图 7)*。This allows you to keep the current results in the existing window (Figure 7).
Find All Reference
(图 7)查找所有引用(Figure 7) Find All Reference
  • 结构参考线现在编辑器中绘制,以便可轻松可视化正在处理的代码的结构。Structure Guide Lines are now drawn in the editor so that you can easily visualize the structure of the code that you are working in. 鼠标悬停时,会显示一个工具提示(图 8),其中包含当前代码块(相对于其上级块)的上下文。On mouse hover, a tooltip (Figure 8) is displayed containing the context of the current code block relative to its ancestor blocks. 结构参考线当前支持 C#、Visual Basic、F# 和 XAML 文件,以及通过 TextMate 语法支持的任何文件。Structure Guide Lines are currently supported for C#, Visual Basic, F#, and XAML files, and for any files supported via TextMate grammars. 可通过取消选中“文本编辑器” > “常规”类别下的“显示结构参考线”复选框,在“工具”>“选项”对话框中禁用此功能。This feature may be disabled in the Tools > Options dialog by unchecking the Show structure guide lines checkbox under the Text Editor > General category.
Structure Guide Lines
(图 8)结构参考线(Figure 8) Structure Guide Lines

通过 EditorConfig 支持编码约定Coding Convention Support via EditorConfig

Visual Studio 编辑器现支持 EditorConfig,它允许开发人员定义编码样式约定并使其在不同编辑器和 IDE 之间保持一致。The Visual Studio editor now supports EditorConfig, which allows developers to define and maintain consistent coding style conventions between different editors and IDEs. 请参阅文档获取更多详细信息,请参阅 .NET 文档获取有关如何使用 .editorconfig 文件管理 .NET 代码样式的信息。See documentation for more details, and .NET documentation for information on how to use .editorconfig files to govern your .NET code style.

打开文件夹Open Folder

“打开文件夹”是使用不含项目和解决方案的基本代码的简便方法。Open Folder is a convenient way for you to work with code bases without projects and solutions. 通过“文件”>“打开”>“文件夹”打开文件夹视图,然后选择要导航的文件夹。Open Folder View from File > Open > Folder, and then select a folder to navigate. 可使用解决方案资源管理器打开和编辑文件(图 9)。You can open and edit files using the Solution Explorer (Figure 9). 许多常用语言具有语法突出显示和符号导航(GoTo)支持。Many popular languages have syntax highlighting and support for symbol navigation (GoTo).

The new Open Folder feature in Visual Studio IDE
(图 9)Visual Studio IDE 中新的“打开文件夹”功能(Figure 9) The new Open Folder feature in Visual Studio IDE

此外,某些语言可直接由文件夹获得高级 IntelliSense 和调试支持:Additionally, some languages have advanced IntelliSense and debugging support directly from the folder:

  • C++ (CMake)。C++ (CMake).
  • Node.js - JavaScript/TypeScript。Node.js - JavaScript/TypeScript.
  • C# 和 VB。C# & VB.

可使用 F5 和解决方案资源管理器中的文件上下文菜单实现生成或调试操作。You can build or debug by using F5 and the file context menu in the Solution Explorer. 要获得最佳体验,请确保安装所使用语言的工作负荷。For the best experience, make sure you install the workload for the languages you are working with.

文件夹视图也支持以下操作:The folder view also supports the following:

  • 使用 GoTo (Ctrl+) 在文件夹中的代码中进行搜索。Search across the code in your folder with GoTo (Ctrl+).
  • 将解决方案资源管理器文件夹视图的范围设置为子文件夹。Scope the Solution Explorer folder view to subfolders.
  • 在资源管理器中或解决方案资源管理器的命令提示符下打开文件夹。Open folders in Explorer or the Command Prompt from the Solution Explorer.
  • 利用解决方案选择下拉列表,在打开的文件夹/存储库的解决方案之间轻松切换。Easily toggle between Solutions in the opened folder or repository with the Solution selection dropdown.
  • 使用 launch.vs.json 配置调试和启动设置。Configure debug and launch settings with launch.vs.json. 右键单击可调试的文件并选择“调试和启动设置”。Right-click on a file that can be debugged and select Debug and Launch Settings.
  • 使用 tasks.vs.json 配置任务和自定义生成。Configure tasks and customize build with tasks.vs.json. 右键单击任何文件,并选择“配置任务设置”。Right-click on any file and select Configure Task Settings.
  • Launch.vs.json 和 tasks.vs.json 在 JSON 编辑器中具有 IntelliSense。Launch.vs.json and tasks.vs.json have IntelliSense in the JSON editor.

大幅提升了打开文件夹和在文件夹视图与解决方案视图之间切换时的效果。The performance of opening folders and toggling between folder view and solution view has been drastically improved.

轻量级解决方案加载Lightweight Solution Load

轻量级解决方案加载可让大型解决方案的加载速度更快。Lightweight Solution load enables faster loading of large Solutions. 它可大幅节省大型解决方案的加载时间和内存使用量。It can provide substantial improvements in Solution load time and memory usage for large Solutions. 此功能并非默认启用,可按解决方案逐一启用,也可在 IDE 中全局启用。The feature is not enabled by default and can be enabled on a Solution-by-Solution basis or globally in the IDE. 若要全局启用,可导航到“工具”>“选项”,选择“项目和解决方案”下的“常规”(图 10),或通过使用“快速启动”搜索“轻量级解决方案加载”。To enable globally, navigate to Tools > Options, select General under Projects and Solutions (Figure 10) or by searching for "Lightweight Solution load" with Quick Launch. 可在解决方案属性窗格中,为单个解决方案开启和关闭该功能。The feature can be turned on and off for individual Solutions in the Solution properties pane.

The new Lightweight Solution load feature Visual Studio IDE
(图 10)Visual Studio IDE 中的轻量级解决方案加载的新增功能(Figure 10) The new Lightweight Solution load feature Visual Studio IDE

轻量级解决方案加载最适合包含 C# 项目或包含混用 C# 和 C++ 的项目的大型解决方案。Lightweight Solution Load is best suited for large solutions that contain C# or a mix of C# and C++ projects. 如果检测到正在使用大型解决方案,系统可能会提示启用此功能。You may be prompted to enable the feature if we detect that you are working with large solutions. 有关此功能的更多详细信息,可访问 Visual Studio 博客You can find more details about this feature on the Visual Studio blog.

大幅改进了完整解决方案生成的性能,现在与常规的解决方案加载拥有同等性能。Performance of full Solution builds has been improved substantially, now at parity with conventional Solution load.

语法着色、自动完成、代码段和对更多语言的“导航到”搜索支持Syntax Colorization, Autocomplete, Snippet, and "Navigate To" Search Support for More Languages

基于在 Visual Studio 2015 更新中添加的支持,Visual Studio 2017 现支持对更多语言进行语法着色和自动完成。Building on the support we added in the Visual Studio 2015 updates, Visual Studio 2017 now supports syntax colorization and autocomplete for an increased range of languages. 此外,这些语言中的其中一些语言也支持通过“导航到”(Ctrl+) 和/或代码段导航。In addition, some of these languages also support navigation via "Navigate To" (Ctrl+), and/or Code Snippets.

以下所示的语言文件支持新“Visual Studio 核心编辑器”中的这些功能(即使并未安装显式支持有问题的语言的工作负载)。Files for the languages noted below, support these features in the new Visual Studio Core Editor even when no workloads have been installed to explicitly support the language in question. 如果安装了提供语言支持的工作负载(例如 .NET 桌面应用程序开发工作负载、使用 C++ 的 Windows 桌面应用开发工作负载等),会提供更广泛的语言支持,包括 IntelliSense 和其他高级语言功能(例如灯泡)。If a workload that provides language support is installed (e.g., the .NET Desktop Application Development workload, the Windows Desktop App Development with C++ workload, etc.), then more extensive language support including IntelliSense and other advanced language features like Light Bulbs may be provided.

按支持级别列出的语言文件类型:Language file types listed by support level:

  • 仅支持语法着色和自动完成:Supports only Syntax Colorization and Autocomplete:
    • Bat、Clojure、CoffeeScript、CSS、Docker、F#、Groovy、INI、Jade、Javadoc、JSON、LESS、LUA、Make、Markdown ++、Objective-C、Perl、PowerShell、Python、Rust、ShaderLab、SQL、Visual Basic .NET、YAML。Bat, Clojure, CoffeeScript, CSS, Docker, F#, Groovy, INI, Jade, Javadoc, JSON, LESS, LUA, Make, Markdown ++, Objective-C, Perl, PowerShell, Python, Rust, ShaderLab, SQL, Visual Basic .NET, YAML.
  • 支持代码段(除了语法着色和自动完成以外):Supports Code Snippets (in addition to Syntax Colorization and Autocomplete):
    • CMake、C++、C#、Go、Groovy、HTML、Java、Javadoc、JavaScript、Lua、Perl、PHP、R、Ruby、Shellscript、Swift、XML。CMake, C++, C#, Go, Groovy, HTML, Java, Javadoc, JavaScript, Lua, Perl, PHP, R, Ruby, Shellscript, Swift, XML.
  • 支持导航到(除了语法着色和自动完成以外):Supports Navigate To (in addition to Syntax Colorization and Autocomplete):
    • C++、C#、Go、Java、JavaScript、PHP、TypeScript、Visual Basic。C++, C#, Go, Java, JavaScript, PHP, TypeScript, Visual Basic.

项目概述页入门Getting Started with Project Overview Pages

针对新创建的项目,我们引入了全新的入门体验。We have introduced a completely new getting started experience for freshly created projects. 我们已将当前的入门页替换为新应用配置设计器中的“概述”选项卡,此页面侧重于能够让你快速入门并开始运行的操作!We've replaced current getting started pages with an Overview tab in our new App Configuration Designer and focused the page on the actions that will get you up and running quickly! 在 4.x ASP.NET Core 和 Cordova 项目中已启用此选项*(图 11)*。This has been enabled in ASP.NET 4.x ASP.NET Core, and Cordova projects (Figure 11).

(Figure 11) Project Overview
(图 11)项目概述(Figure 11) Project Overview

使用连接的服务连接到服务 Connecting to Services Using Connected Services

在以前的版本中,此功能被命名为“服务功能”。In a previous release, this feature was named Service Capabilities. 我们已将该名称更改为“连接的服务”。We've changed the name to Connected Services.

连接的服务即 Visual Studio 2017 中新式的“添加连接的服务”功能或“添加服务引用”功能。Connected Services is the modern "Add Connected Service" or "Add Service Reference" feature of Visual Studio 2017. 连接的服务功能可使应用与服务间的连接更轻松。The Connected Services feature makes it easier to connect your app to services. 解决方案资源管理器中提供了一个用于 Web 和移动项目类型的名为“连接的服务”的新节点。A new node called "Connected Services" is available in the Solution Explorer for Web and Mobile project types. 双击此节点会在 Visual Studio 中打开一个新的整页选项卡,可在其中发现可连接到的热门 Microsoft 服务。Double-clicking this node will open a new full page tab in Visual Studio where you can discover popular Microsoft services you can connect to.

在“连接的服务”页*(图 12)*上选择一个服务将调用“连接的服务向导”,该向导会配置项目、下载必要的 NuGet 数据包,从而帮助快速轻松地根据服务需要进行编码。Selecting a service on the Connected Services page (Figure 12) will invoke the Connected Services Wizard that configures your project, and downloads the necessary NuGet packages to get you started coding against your service quickly and painlessly.

Connected Services
(图 12)连接的服务(Figure 12) Connected Services

产品随附的工具和功能 In-Product Acquisition of Tools and Features

通过 Visual Studio 2017 可轻松获取其他工作负载和组件,而无需离开 IDE(图 13)。Visual Studio 2017 makes it easy to acquire additional workloads and components without leaving the IDE (Figure 13). 利用“快速启动”可查找并启动任何工作负荷或单个组件的 Visual Studio 安装程序。Leverage Quick Launch to find and kick-off the Visual Studio Installer for any Workload or Individual component.

In-product acquisition via Quick Launch
(图 13)通过快速启动实现产品内获取(Figure 13) In-product acquisition via Quick Launch

如果找不到正在寻找的模板,也可以从“新建项目”对话框中打开 Visual Studio 安装程序*(图 14)*。If you can't find the templates you’re looking for, the Visual Studio Installer can also be opened from within the New Project dialog (Figure 14).

In-product Quick Launch dialogue
(图 14)产品内快速启动对话框(Figure 14) In-product Quick Launch dialogue

Visual C++ Visual C++

Visual Studio 2017 向 Visual C++ 环境引入了许多更新和修补程序。Visual Studio 2017 brings many updates and fixes to the Visual C++ environment. 感谢你报告 bug!Thank you for reporting bugs! 我们修复了编译器和工具中的 250 多个 bug 和已报告问题,其中很多是客户通过 Microsoft Connect 提交的。We've fixed over 250 bugs and reported issues in the compiler and tools, many submitted by customers through Microsoft Connect. 我们在此版本中着手了 STL 的性能改进。In this release, we worked on performance improvement of the STL. 现在默认使用全新的基于 SQLite 的数据库引擎。The new SQLite-based database engine is now being used by default. 这将提高数据库操作(如“转到定义”和“查找所有引用”)的速度,并将极大地缩短初始解决方案分析时间。This will speed up database operations like Go To Definition and Find All References, and will significantly improve initial solution parse time. 现提供原始 C++ 工作流的更细化的安装体验。We now provide a more granular installation experience for installing the original C++ workload. 我们添加了可选组件,使你能够仅安装所需工具。We have added selectable components that enable you to install just the tools that you need. Visual Studio 中的 CMake 支持已准备好展现它的强大功能!CMake support in Visual Studio is ready for primetime! 直接将 CMake 项目加载到 VS 中并立即开始编写代码。Load your CMake projects directly into VS and start coding now. 改进了“打开文件夹”C++ 体验,因此可以直接将源代码编入 VS 中,而无需创建任何 VS 解决方案和项目。“Open Folder” C++ experience has been improved – so bring your source code to VS without the need to create any VS solutions and projects. “导航到”现称为“转到”,这个涵盖性术语针对一组新的导航筛选器。Navigate To is now known as Go To, an umbrella term for a set of new navigation filters. 这使用户可更轻松地找到正确结果,尤其在较大代码库中。This will make it easier to find the right results, especially in larger code bases.

C++ 代码分析C++ Code Analysis

用于强制执行 C++ 核心准则 的 C++ 核心检查器现已通过 Visual Studio 分发。The C++ Core Checkers for enforcing the C++ Core Guidelines are now distributed with Visual Studio. 只需在项目“属性”页*(图 15)*的“代码分析扩展”对话框中启动检查器,即会在运行代码分析时包含扩展。Simply enable the checkers in the Code Analysis Extensions dialog in the project's property pages (Figure 15) and the extensions will be included when you run code analysis.

CppCoreCheck properties page
(图 15)CppCoreCheck 属性页(Figure 15) CppCoreCheck properties page

C++ 编译器C++ Compiler

我们更新了 C++ 编译器和标准库,不仅增强了对 C++11 和 C++14 功能的支持,还引入了对预期推出的某些 C++17 标准功能的初步支持。We've updated the C++ compiler and standard library with enhanced support for C++11 and C++14 features, as well as preliminary support for certain features expected to be in the C++17 standard. 编译器支持通用 constexpr 和聚合的 NSDMI,具有 C++14 标准版中的全部新增功能。With support for generalized constexpr and NSDMI for aggregates, the compiler is complete for features added in the C++14 Standard. 请注意,编译器仍缺少 C++11 和 C++98 标准版中的一些功能。Note that the compiler still lacks a few features from the C++11 and C++98 Standards. Visual Studio 2017 允许结合使用 /sdl 和 /await。Visual Studio 2017 allows using /sdl with /await. 删除了协同程序的 /RTC 限制。We removed /rtc limitation with Coroutines.

此版本在优化和代码生成方面做出了若干改进。This release brings several improvements in optimization and code generation. 显著改进包括:Some notable improvements include:

  • 改进了循环的代码生成:支持常量整数除法的自动矢量化,优化了 memset 模式的识别。Improved code generation of loops: support for automatic vectorization of division of constant integers, better identification of memset patterns.
  • 提高了代码安全性:改进了缓冲区溢出编辑器诊断的显示,/guard:cf 现可保护生成转移表的切换语句。Improved code security: improved emission of buffer overrun compiler diagnostics, and /guard:cf now guards switch statements that generate jump tables.
  • /Debug:fastlink 选项得到改进,相较 Visual Studio 2015,大组件上的链接速度提升了 30%。The /debug:fastlink option has been improved to provide 30% faster link times on large components than in Visual Studio 2015.
  • 使用协同例程时,实验关键字 "yield"(在 /await 开关下可用)已被删除。When using co-routines, the Experimental keyword "yield" (available under /await switch) has been removed. 应更新你的代码,以改为使用 "co_yield”。Your code should be updated to use the "co_yield” instead. 有关详细信息,请参阅 Visual C++ 团队博客For more information, see the Visual C++ Team blog.

C++ 库C++ Libraries

  • [STL] basic_string 的性能改进。[STL] Performance improvement of basic_string.
  • [STL] 增添了 <any>、<string_view>、apply()、make_from_tuple()。[STL] Added <any>, <string_view>, apply(), make_from_tuple().
  • [STL] std::vector 已经过全面检修,以提高正确性和性能。[STL] std::vector has been overhauled for correctness and performance.
  • [STL] 现在 STL 会避免取消引用 null 复杂精致指针。[STL] The STL now avoids dereferencing null fancy pointers.
  • [STL] 增添了 <optional>、<variant>、shared_ptr::weak_type 和 <cstdalign>。[STL] Added <optional>, <variant>, shared_ptr::weak_type, and <cstdalign>.
  • [STL] 在 min/max/minmax(initializer_list) 和 min_element/max_element/minmax_element() 中启用了 C++14 constexpr。[STL] Enabled C++14 constexpr in min/max/minmax(initializer_list) and min_element/max_element/minmax_element().
  • [STL] 将 std::string/std::wstring 的移动构造函数的性能提升了超过 3 倍。[STL]Improved the performance of std::string/std::wstring's move constructors by more than 3x.
  • [STL] 有关 STL 改进的完整列表,请参阅:Visual C++ 团队博客[STL] For a complete list of STL improvements see: Visual C++ Team blog.
  • [ATL] 还进行了另一组名称查找一致性修复。[ATL] Yet another set of name-lookup conformance fixes.
  • [ATL] 现有的移动构造函数和移动赋值运算符现已正确地标记为非引发。[ATL] Existing move constructors and move assignment operators are now properly marked as non-throwing.
  • [ATL] 取消禁止有关 atlstr.h 中本地静态变量的线程安全初始化的有效警告 C4640。[ATL] Un-suppress valid warning C4640 about thread safe init of local statics in atlstr.h.
  • [ATL] 在[使用 ATL 和生成 DLL] 时,本地静态变量的线程安全初始化在 XP 工具集中自动关闭。[ATL] Thread Safe Initialization of local statics was automatically turned off in the XP toolset when [using ATL AND building a DLL]. 这种情况不会再出现。This is no longer the case. 如果需要关闭线程安全初始化,则可以在项目设置中添加 /Zc:threadSafeInit-。You can add /Zc:threadSafeInit- in your Project settings if having thread safe initialization off is desired.
  • [AMP] 审核了库并修复了拼写错误。[AMP] Audited library and fixed typos.
  • [VCRuntime] 控制流防护符号新增了标头“cfguard.h”。[VCRuntime] New header ‘cfguard.h’ for Control Flow Guard symbols.

C++ IDEC++ IDE

现针对 C++ 本机项目和 C++ /CLI 项目有了更佳的配置更改性能,后者的性能增加更为明显。Configuration change performance is now better for C++ native projects and much better for C++/CLI projects. 第一次激活解决方案配置时,现在的速度会更快,且此解决方案配置的所有后续激活几乎可瞬时完成。When a solution configuration is activated for the first time it will now be faster and all subsequent activations of this solution configuration will be almost instantaneous.

现在默认使用全新的基于 SQLite 的数据库引擎。The new SQLite-based database engine is now being used by default. 这将提高数据库操作(如“转到定义”和“查找所有引用”)的速度,并将极大地缩短初始解决方案分析时间。This will speed up database operations like Go To Definition and Find All References, and will significantly improve initial solution parse time. 设置已移至“工具”>“选项”>“文本编辑器”>“C/C++”>“高级”下(之前位于...“C/C++”>“实验”下)。The setting has been moved to Tools > Options > Text Editor > C/C++ > Advanced (it was formerly under ...C/C++ > Experimental).

我们改进了不使用预编译标头的项目和文件的 IntelliSense 性能 - 为当前文件中的标头创建自动预编译标头。We've improved IntelliSense performance on projects and files not using precompiled headers – an Automatic Precompiled Header will be created for headers in the current file.

其他更新包括:Other updates include:

  • 还为错误列表中的 IntelliSense 错误添加了错误筛选和帮助(图 16)。We've added error filtering and help for IntelliSense errors in the error list (Figure 16). 单击错误列现在允许进行筛选(图 17)。Clicking on the error column now allows for filtering (Figure 17). 此外,单击特定错误或按 F1 将启动错误消息的联机搜索。Also, clicking on the specific errors or pressing F1 will launch an online search for the error message.
Error List
(图 16)错误列表(Figure 16) Error List
Error List Filtered
(图 17)筛选的错误列表(Figure 17) Error List Filtered
  • 增添了按类型筛选“成员列表”项的功能*(图 18)*。Added the ability to filter Member List items by kind (Figure 18).
Member List Filtered
(图 18)筛选的成员列表(Figure 18) Member List Filtered
  • 添了新的实验性预测 IntelliSense 功能,此功能可根据上下文筛选成员列表中的所示内容。Added a new experimental Predictive IntelliSense feature that provides contextually-aware filtering of what appears in the Member List.

  • 在新的“查找所有引用”UI 中,可了解是否要从 C++ 代码结果中的变量进行读取或向其写入。The new Find All References UI includes information about whether you are reading from or writing to a variable in the results for C++ code.

  • 已将“点到箭头”IntelliSense 功能从实验级提升为高级,且现在为默认启用。The Dot-to-Arrow IntelliSense feature has been moved from experimental to advanced, and is now enabled by default. 编辑器功能“展开作用域”和“展开优先级”也已从实验级提升为高级。The editor features Expand Scopes and Expand Precedence have also been moved from experimental to advanced.

  • 实验性的重构功能“更改签名”和“提取函数”现默认可用。The experimental refactoring features Change Signature and Extract Function are now available by default.

  • 我们启用了用于 C++ 项目的新实验性功能“快速项目加载”。We've enabled the new experimental feature for C++ projects ‘Faster project load’. 下次打开 C++ 项目时,加载速度将更快,而再下一次的加载速度甚至还会更快!The next time you open a C++ project it will load faster, and the time after that it will load even faster!

  • 改进了“打开文件夹”体验。Improvements to the Open Folder experience. 通过“打开文件夹”加载源,可编辑、生成和调试非 MSBuild C++ 项目。Edit, build, and debug your non-MSBuild C++ project by loading your sources through “Open Folder”. 通过以下 json 文件自定义体验:Customize the experience through these json files:

    • 使用 CppProperties.json 可自定义 IntelliSense 和浏览体验。CppProperties.json to customize the IntelliSense and browsing experience.
    • 使用 Tasks.vs.json 可自定义生成步骤。Tasks.vs.json to customize the build steps.
    • 使用 Launch.vs.json 可自定义调试体验。Launch.vs.json to customize the debugging experience.
  • 无需在根文件夹中创建 CppProperties.json 文件,C++ IntelliSense 便可正常工作。C++ IntelliSense will work without the need to create a CppProperties.json file in the root folder. 此外,我们增添了一个新的下拉列表,允许用户在分别由 CMake 和 CppProperties.json 文件提供的配置之间轻松切换。Along with this, we've added a new dropdown to allow users to easily switch between configurations provided by CMake and CppProperties.json files. “打开文件夹”中的 CMake 支持:在使用“打开文件夹”打开 CMake 项目时会自动配置用于 C++ 编辑、生成和调试的环境。CMake support in Open Folder: opening CMake projects with “Open Folder” will automatically configure the environment for C++ editing, building and debugging.

  • 通过 CMakeLists.txt 文件所在的同一文件夹中的 CMakeSettings.json 文件提供进一步的配置支持*(图 19)*。Further configuration is supported via a CMakeSettings.json file that sits in the same folder as the CMakeLists.txt file (Figure 19).

CMake Open Folder
(图 19)CMake 打开文件夹(Figure 19) CMake Open Folder

C++ 安装工作负荷C++ Installation Workloads

  • 使用 C++ 的 Windows 桌面开发:Windows Desktop Development with C++:

    • 现提供原始 C++ 工作流的更细化的安装体验。We now provide a more granular installation experience for installing the original C++ workload. 我们添加了可选组件,使你能够仅安装所需工具。We have added selectable components that enable you to install just the tools that you need. 请注意,在安装程序用户界面中列出的组件的安装大小的指示并不准确,而且它低估了整个大小。Please note that the indicated installation sizes for the components listed in the installer UI are not accurate and underestimate the total size.

    • 若要在 C++ 桌面工作负载中成功创建 Win32 项目,则必须安装工具集和 Windows SDK。To successfully create Win32 projects in the C++ desktop workload, you must install both a toolset and a Windows SDK. 安装推荐(选中)的组件“VC++ 2017 v141 工具集(x86、x64)”和“Windows 10 SDK (10.0.14393)”可以确保正常运行。Installing the recommended (selected) components “VC++ 2017 v141 toolset (x86, x64)” and “Windows 10 SDK (10.0.14393)” will ensure this will work. 如果未安装所需工具,将无法成功创建项目,且向导将挂起。If the necessary tools are not installed, projects will not be created successfully and the wizard will hang.

  • 使用 C++ 的 Linux 开发:Linux Development with C++:

    • 热门扩展“用于 Linux 开发的 Visual C++”现已纳入 Visual Studio。The popular extension Visual C++ for Linux Development is now part of Visual Studio. 此安装提供开发和调试运行在 Linux 环境中的 C++ 应用程序所需的一切信息。This installation provides everything you need to develop and debug C++ applications running on a Linux environment.
  • 使用 C++ 的游戏开发:Game Development with C++:

    • 以 DirectX 或 Cocos2d 为后盾,利用 C++ 的强大功能构建专业游戏。Use the full power of C++ to build professional games powered by DirectX or Cocos2d.
  • 使用 C++ 的移动开发(Android 和 iOS):Mobile Development with C++ (Android and iOS):

    • 现可利用 Visual Studio 创建和调试面向 Android 和 iOS 的移动应用。You can now create and debug mobile apps using Visual Studio that can target Android and iOS.
  • 通用 Windows 平台开发:Universal Windows Platform development:

    • C++ 是通用 Windows 平台开发工作负荷的可选组件。C++ comes as an optional component for the Universal Windows Platform development workload. 当前必须手动完成 C++ 项目的升级。Upgrading C++ projects currently must be done manually. 如果在 Visual Studio 2017 中打开面向 v140 的 UWP 项目,且如果没有安装 Visual Studio 2015,则需要在项目属性页中选择 v141 平台工具集。If you open a v140-targeted UWP project in Visual Studio 2017, you need to select the v141 platform toolset in the project property pages if you do not have Visual Studio 2015 installed.

Clang/C2 平台工具集Clang/C2 Platform Toolset

Visual Studio 2017 附带的 Clang/C2 工具集现在支持 /bigobj 开关,这对生成大项目来说至关重要。The Clang/C2 toolset that ships with Visual Studio 2017 now supports the /bigobj switch, which is crucial for building large projects. 它还在编译器的前端和后端进行了多项重要的 bug 修复。It also includes several important bug fixes, both in the front-end and the back-end of the compiler.


C# 和 Visual Basic C# and Visual Basic

语言扩展Language Extensions

此版本引入了对 C# 7.0 和 Visual Basic 15 语言功能的支持,包括:This release introduces support for C# 7.0 and Visual Basic 15 language features, including:

对于 C#:For C#:

  • 类似任务的异步方法返回类型:这可从异步方法中返回任何类似任务的类型。Task-like return types for async methods: this introduces the ability to return any task-like type from an async method. 以前,这些返回类型限制为 Task<T>TaskPreviously these return types were constrained to Task<T> and Task.
  • 值元组 引入使用元祖临时对一组类型化的值分组的语言支持。Value tuples introduce language support for using tuples to temporarily group a set of typed values. 若要了解详细信息,请查看 GitHub 上的 设计说明To learn more, please review the design notes on GitHub.
  • 嵌套的本地函数 对语言进行了扩展,以支持在块范围内声明函数。Nested local functions extend the language to support declaration of functions in a block scope.
  • 模式匹配扩展 通过函数式语言带来了代数数据类型和模式匹配的许多优势。Pattern matching extensions enable many of the benefits of algebraic data types and pattern matching from functional languages.
  • 引用返回 使函数可以按引用返回值。Ref returns enable functions to return values by reference.

对于 Visual Basic:For Visual Basic:

  • 值元组引入使用元组临时对一组类型化的值分组时的语言支持:Dim point As (x As Integer, y As Integer) = GetOffset()Value tuples introduce language support for using tuples to temporarily group a set of typed values: Dim point As (x As Integer, y As Integer) = GetOffset().
  • ByRef 返回消耗可扩展语言,支持使用具有 ByRef 返回的库中的函数和属性。ByRef return consumption extend the language to support consumption of functions and properties from libraries which have ByRef returns.
  • 二进制文本和数字组分隔符允许二进制数的本机表示形式。Binary literals and digit group separators allow native representation of binary numbers. 这对位掩码和标志枚举非常方便:&B1001_0011This is super convenient for bitmasks and flags enumerations: &B1001_0011.

有关详细信息,请关注我们在 CSharpLang GitHubVBLang GitHub 上的语言设计,以详细了解这些设计及其他建议的语言扩展。For more information, follow our language design on the CSharpLang GitHub and VBLang GitHub to learn more about these and other proposed language extensions.

快速操作和重构Quick Actions and Refactorings

Visual Studio 提供许多重构,帮助提高工作效率并使代码更易读。Visual Studio provides lots of refactorings to help you be productive and make your code more readable. 下面列出了部分重构:Here are just a few:

  • 使用初始值设定项简化对象初始化*(图 20)*。Simplify object initialization with an initializer (Figure 20).
Use object initializer
(图 20)使用对象初始值设定项(Figure 20) Use object initializer
  • 利用新的 C#7 功能以内联方式移动 out 变量声明*(图 21)*。Move out variable declarations inline, leveraging a new C#7 feature (Figure 21).
Move out variable inline
(图 21)以内联方式移出变量(Figure 21) Move out variable inline
  • 利用新的 C#7 功能,使用 null 合并运算符简化 null 检查和引发表达式*(图 22)*。Simplify null-checks and throw-expressions using null-coalescing operator, leveraging a new C#7 feature (Figure 22).
Use throw expression with null-coalescing operator
(图 22)配合使用引发表达式和 null 合并运算符(Figure 22) Use throw expression with null-coalescing operator
  • 将类型移动到匹配文件:通过 Ctrl+ 单击一下,提取某文件中的类型并将其置于带匹配名称的另一文件。Move type to matching file: Extract a type from one file and put it in another file with a matching name with one click via Ctrl+.
  • 同步文件和类型名称:如果文件和类型名称不同步,可使用 Ctrl+Sync file and type name: If your file and type name are out of sync, you can use Ctrl+.
  • String.Format 转换为字符串插值:借助此“快速操作”利用 C# 6 语言功能Convert String.Format to string interpolation: take advantage of the C# 6 language feature with this Quick Action.
  • 将缺少的大小写添加到 C# 开关或 Visual Basic Select。Add missing case(s) to a C# switch or a Visual Basic Select.
  • 将属性转换为方法,反之亦然。Convert property to a method, and vice versa.
  • 添加包引用:可对无法识别的类型自动检索和安装 NuGet 包(以及添加 using/Import)。Add Package Reference: Offers to auto-retrieve and install a NuGet package (and add the using/Import) for an unrecognized type. 若要启用此功能,请转到“工具”>“选项”>“文本编辑器”>“[C# / Basic]”>“高级”>“建议对引用程序集中的类型使用 using”/“建议对 NuGet 包中的类型使用 using”。To enable this feature, go to Tools > Options > Text Editor > [C# / Basic] > Advanced > Suggest usings for types in reference assemblies / Suggest usings for types in NuGet packages.
  • 根据需要同步异步方法。Make async methods synchronous where applicable.
  • 支持对拼写错误的类型执行“模糊”匹配。Support for "fuzzy" matching for misspelled types.
编码约定配置和强制Coding Convention Configuration and Enforcement

以 Visual Studio 对 EditorConfig 的支持为基础,我们与社区协作,将 .NET 代码样式设置添加到了文件格式。Building on Visual Studio's support for EditorConfig, we worked with the community to add .NET code style settings to the file format. 这意味着你可以配置团队的代码样式约定、将其签入源控件,并在开发人员键入时让冲突实时显示在编辑器中。This means that you can configure your team's code style conventions, check them into source control, and have violations appear live in the editor as developers are typing. 可以在 Roslyn 存储库的 .editorconfig 中或此文档中查看所有代码样式选项。You can see all the code style options in the Roslyn repo's .editorconfig or in the documentation. 可通过“工具”>“选项”>“文本编辑器”>“[C#/Basic]”>“代码样式”继续配置特定于计算机的代码样式设置,并且这些规则会在 EditorConfig 存在且与之冲突时被覆盖。You can continue to configure your machine-specific code style settings in Tools > Options > Text Editor > [C#/Basic] > Code Style and these rules are overridden when an EditorConfig is present and conflicts.

我们还添加/更新了样式分析器,以帮助你自定义和强制执行团队的编码约定,包括:We've also added/updated style analyzers to help you customize and enforce coding conventions on your team, including:

  • 命名样式规则。Naming style rules.
  • 使用“var”或显式类型。Use of “var” or explicit types.
  • 对访问成员Use of “this.” 使用“this.”or “Me.” 或“Me.”。on member access.
  • 使用表达式主体或块。Use expression-bodies or blocks.
  • 对 'cast' 和 'null' 检查使用模式匹配。Use pattern-matching for 'cast' and 'null' checks.
  • 使用显式元组名称。Use explicit tuple names.
  • 通过引发表达式、条件委托、合并表达式和 null 传播简化 null 检查。Simplify null-checking with throw-expressions, conditional delegates, coalescing expressions, and null propagation.
  • 需要大括号。Require braces.

注意:其中部分代码样式规则在编辑器中默认配置为“建议”(图 23)Note: several of these code style rules are configured as Suggestions in the editor by default (Figure 23).

Configure code style preferences and enforcement from EditorConfig
(图 23)在 EditorConfig 中配置代码样式首选项和强制实施(Figure 23) Configure code style preferences and enforcement from EditorConfig

IntelliSense 改进IntelliSense Improvements

此版本还改进了 IntelliSense,可帮助在处理较大解决方案或不熟悉的代码库时提高工作效率。This release also introduces improvements to IntelliSense that will make you more productive when working in a large solution or an unfamiliar codebase. 我们为 IntelliSense 添加了图标任务栏,可供你按类型(如方法、属性、类等)筛选成员列表。We have added an icon tray to IntelliSense that enables you to filter the member list by type (e.g., methods, properties, classes, etc.). 每个筛选器切换都具有关联的键盘快捷方式,可以通过将鼠标悬停在该图标上来发现。Each filter toggle has an associated keyboard shortcut which you can discover by hovering over the icon. 若要启用此功能,请转到“工具”>“选项”>“文本编辑器”>“[C# / Basic]”>“IntelliSense”,选中筛选选项并突出显示*(图 24)*。To enable this feature, go to Tools > Options > Text Editor > [C# / Basic] > IntelliSense and check the options for filtering and highlighting (Figure 24).

IntelliSense Completion Filtering
(图 24)IntelliSense 完成筛选(Figure 24) IntelliSense Completion Filtering

其他编辑器改进Other Editor Improvements

  • 你现在可以通过定位游标中间字符串并按 Enter 键,将一个长字符串拆分为多个串联字符串。You can now split a long string into multiple concatenated strings by positioning the cursor mid-string and pressing Enter.
  • 我们投入了大量工作来提高存在用于计算诊断和 CodeLens 信息的后台操作时的 IDE 响应。We have done considerable work to improve responsiveness of the IDE in presence of background operations that compute diagnostics and CodeLens information.

F#  F# 

对 F# 4.1 语言功能的支持Support for F# 4.1 Language Features

  • 与 C# 7/VB 15 元组互操作的结构元组。Struct Tuples which interop with C# 7/VB 15 Tuples.
  • 支持使用 C# 7 ref 返回的 Byref 返回。Byref returns which support consuming C# 7 ref returns.
  • 使用 [<Struct>] 属性的结构记录支持(由 Will Smith 完成)。Struct Record support with the [<Struct>] attribute (by Will Smith).
  • [<Struct>] 属性的结构可区分联合支持。Struct Discriminated Union support with the [<Struct>] attribute.
  • 新的 Result<'TSuccess, 'TFailure> 类型,带有 FSharp.Core 中的支持函数(由 Oskar Gewalli 完成)。A new Result<'TSuccess, 'TFailure> type, with supporting functions in FSharp.Core (by Oskar Gewalli).
  • fixed 关键字,其支持在堆栈上本地固定指针类型。The fixed keyword, which supports pinning a pointer-type local on the stack.
  • 数值文本中的下划线(由 Avi Avni 完成)。Underscores in numeric literals (by Avi Avni).
  • 调用方信息属性参数(由 Lincoln AtkinsonAvi Avni 共同完成)。Caller Info Attribute Arguments (by Lincoln Atkinson and Avi Avni).
  • 同一文件中通过 namespace recmodule rec 的相互引用类型和模块。Mutually Referential Types and Modules within the same file via namespace rec and module rec.
  • 模块上与类型共享同一名称的隐式“Module”后缀。Implicit "Module" suffix on modules which share the same name as a type.

对 F#  编译器和 FSharp.Core 的改进Improvements to the F#  Compiler and FSharp.Core

(许多改进通过 F # 社区实现)(Many done by the F# community)

基于 Roslyn Workspaces 的新编辑器A New Editor Based on Roslyn Workspaces

(许多新 IDE 功能由优秀的 F# 社区提供)(Many new IDE features contributed by the outstanding F# community)

F#  社区的其他贡献Additional Contributions by the F#  Community

我们要特别感谢整个 F# 社区为 Visual Studio 2017 中 F# 工具版本进行内部测试、归档 bug、促进讨论以及实现 bug 修复和功能所作出的努力。We would like to thank the entire F# community for dogfooding builds of F# tooling in Visual Studio 2017, filing bugs, driving discussions, and implementing bug fixes and features. 没有 F# 社区,就不会有 Visual Studio 2017 的成功。The success of F# in Visual Studio 2017 truly would not have been possible without the F# community. 请查看完整的参与者列表。Please see the full list of contributors.


JavaScript 和 TypeScript JavaScript and TypeScript

TypeScript 2.1TypeScript 2.1

TypeScript 2.1 适用于 Visual Studio 中的所有 TypeScript 项目。TypeScript 2.1 is available for all TypeScript projects in Visual Studio. TypeScript 2.1 提供下层 async/await、更好的类型推理、本地对象扩展及更多功能!TypeScript 2.1 delivers down-level async/await, better type inference, local object expansion, and more! 若要详细了解此版本,请查看 发布博客文章完整更改日志To read more about the release, check out the release blog post or the full change log.

JavaScript 语言服务JavaScript Language Service

提供新的 JavaScript 语言服务(图 25),并默认启用。A new JavaScript language service (Figure 25) is available and enabled by default. 新服务提供更强大的 IntelliSense,并增添了对 JSDoc 注释批注、ES6 和常见 JS 模块格式的 IntelliSense 支持。The new service provides richer IntelliSense and adds IntelliSense support for JSDoc comment annotations, ES6, and Common JS module formats. 此外,它还支持 JSX 语法和 ES2016 的功能,如生成器、模块和修饰器。It also supports JSX syntax and features from ES2016, such as generators, modules, and decorators. 有关详细信息,请参阅此博客文章或 GitHub 上的 JavaScript IntelliSense 文档For more information, see this blog post or the JavaScript IntelliSense documentation on GitHub.

Rich JavaScript IntelliSense for jQuery
(图 25)适用于 jQuery 的大量 JavaScript IntelliSense(Figure 25) Rich JavaScript IntelliSense for jQuery

性能改进Performance Improvements

改进性能是此版本的一个重点所在。Improving performance was one of the greatest focuses of this release. 除对提高内存和响应作出一些优化外,整个 JavaScript/TypeScript 语言服务也已移到 devenv.exe 之外的附属进程,从而降低较大 VS 项目的内存占用。Along with several optimizations to improve memory and responsiveness characteristics, the entire JavaScript/TypeScript language service has been moved to a satellite process outside of devenv.exe to provide memory relief to the largest VS projects. 如此一来,在处理较大的 JavaScript 项目时,Visual Studio 进程的内存消耗更低,内存崩溃的可能性更小。You will see lower memory consumption from the Visual Studio process and less out of memory crashes when working with huge JavaScript projects. 若要阅读有关这些改进的详细信息,请参阅此博客文章To read more about these improvements, check out this blog post.


调试和诊断 Debugging and Diagnostics

运行时单击Run to Click

只需在调试运行到此行时单击代码行旁边的图标(图 26)。Simply click the icon next to a line of code while debugging to run to that line (Figure 26). 无需再设置临时断点,也不必再执行多个步骤来执行代码和在所需行停止。No longer set temporary breakpoints or perform several steps to execute your code and stop on the line you want. 现在,调试器下停在中断状态时,“运行时单击”图标会在鼠标悬停位置的代码行旁边巧妙显示。Now while stopped at a break state under the debugger, the Run to Click icon subtly appears next to the line of code that your mouse is hovered over. 将鼠标移动到图标,然后单击按钮,代码即会运行并在下次于代码路径中命中时停在该行。Move your mouse to the icon and click the button, now your code will run and stop on that line the next time it is hit in your code path. 可通过“调试”>“选项”>“启用‘运行时单击’”将其关闭。Turn it off from Debug> Options > Enable Run to Click.

Run to Click Icon
(图 26)运行时单击图标(Figure 26) Run to Click Icon

“附加到进程”筛选器Attach to Process Filter

在“附加到进程”对话框(图 27)中轻松搜索,快速查找要将调试器附加到的进程。Easily search in the Attach to Process dialog (Figure 27) to quickly find the process you want to attach the debugger to. 将对正在运行的进程列表进行筛选,以筛选出与搜索条件匹配的项。The list of running processes will be filtered to items matching your search. 搜索筛选器具有记忆功能,会在重新打开对话框时提供之前的搜索内容。The search filter is sticky and will remember your previous search when you reopen the dialog.

Attach to Process Filter
(图 27)“附加到进程”筛选器(Figure 27) Attach to Process Filter

重新附加到进程Reattach to Process

现可快速重新附加到之前调试的进程。You can now quickly reattach to processes you were previously debugging. 触发新的“调试/重新附加到进程”(Shift+Alt+P) 命令会立即尝试将调试器附加到通过“附加到进程”对话框调用的上一个调试会话的最后若干进程中。Triggering the new Debug/Reattach to Process (Shift+Alt+P) command will immediately try to attach the debugger to the last processes from the previous debugging session that were invoked from the Attach to Process dialog. 调试器将通过先尝试匹配上一个进程 ID,然后匹配上一个进程名称,再次附加到进程。The debugger will reattach to processes by first attempting to match the previous process ID and then by matching to the previous process name. 如果没有找到匹配项,或找到多个具有相同名称的进程,则会出现“附加到进程”对话框,可通过它选择所需的进程。If no matches are found or there are multiple processes found with the same name, then the "Attach to Process" dialog will appear so you can select the intended process.

新的异常帮助器The New Exception Helper

新的“异常帮助窗口”(图 28)可用于查看异常信息,该信息显示在非模式对话框中,可对内部异常进行即时访问。Use the new Exception Helper (Figure 28) to view your exception information at a glance in a compact non-modal dialog with instant access to inner exceptions. 诊断 NullReferenceException 时,现可从异常帮助器的右侧快速查看哪些内容是 null。While diagnosing your NullReferenceException, you can now quickly see what was null from right inside the Exception Helper. 现可在引发的异常处停止时单击复选框添加条件,排除特定模块引发的异常类型。You can now exclude breaking on exception types thrown from specific modules by clicking the checkbox to add a condition while stopped at the thrown exception. 请阅读此博客文章,更详细地了解新的异常帮助器优势。Read this blog post for more detailed information on the new benefits of the Exception Helper.

The New Exception Helper dialog
(图 28)新的“异常帮助程序”对话框(Figure 28) The New Exception Helper dialog

将条件添加到异常设置Add Conditions to Exception Settings

如果你将调试程序设置为在引发时中断,则可以添加条件,以便调试程序仅在指定模块中引发异常时才中断*(图 29)*。When you configure the debugger to break on thrown exceptions, you can add conditions so that the debugger will only break when exceptions are thrown in specified modules (Figure 29).

Edit Conditions dialog box
(图 29)“编辑条件”对话框(Figure 29) Edit Conditions dialog box

调试器辅助功能的改进Debugger Accessibility Improvements

现可更有效地将多个调试器窗口(调用堆栈、局部变量、自动、监视和快速监视)与屏幕阅读器配合使用以及用于满足其他辅助功能需要。You can now more effectively use several of the Debugger windows (Call Stack, Locals, Autos, Watch, and Quickwatch) with screen readers and for other accessibility needs.

.NET Core 的 IntelliTrace 事件IntelliTrace Events for .NET Core

IntelliTrace 现在支持 ASP.NET Core 应用的 MVC、ADO.NET 和 HttpClient 事件。IntelliTrace now supports MVC, ADO.NET, and HttpClient events for ASP.NET Core apps. 这些事件将显示在“诊断工具”窗口中的“事件”选项卡中。These will appear in the Events tab in the Diagnostic Tools Window.

“诊断工具”窗口更新Diagnostic Tools Window Updates

启动调试会话后,将在“诊断工具”窗口中看到应用程序新的“摘要”视图(图 30)。When you start a debugging session, you'll see a new Summary view (Figure 30) of your application in the Diagnostic Tools Window. 从此处,将能够:From here, you'll be able to:

Summary tab in Diagnostics Tools Window
(图 30)“诊断工具”窗口中的“摘要”选项卡(Figure 30) Summary tab in Diagnostics Tools Window

性能探查器更新Performance Profiler Updates

性能探查器现可附加到正在运行的进程。The Performance Profiler can now attach to a running process. CPU 使用率工具、GPU 使用率工具和性能向导现可附加到正在运行的进程。The CPU Usage tool, GPU Usage tool, and Performance Wizard now support attaching to a running process.

CPU 使用率工具更新CPU Usage Tool Updates

CPU 使用率工具作出了几处改进:Several improvements have been made to the CPU Usage Tool:

  • 更好的外部代码支持 - CPU 工具现在可以使你更深入地了解库和框架函数被用户代码调用时的成本。Better External Code support - The CPU Tool now gives you better insights into the costs of library and framework functions when called by user code.
  • 函数视图*(图 31)*- 通过函数的 CPU 成本对函数进行排名的视图。Functions view (Figure 31) - A view that ranks functions by their CPU cost.
Functions List
(图 31)功能列表(Figure 31) Functions List
  • 调用方/被调用方视图*(图 32)*可用于调查所选函数调用和被调用的成本。Caller/Callee View (Figure 32) allows you to investigate costs of function calls made to and from a selected function.
Caller / Callee View
(图 32)调用方/被调用方视图(Figure 32) Caller / Callee View
  • 当在 CPU 工具中选定函数时,源视图将显示函数的源代码。Source View shows a function's source code when the function is selected in the CPU Tool.

Chrome 调试支持Chrome Debugging Support

当开始调试 ASP.NET 项目并选择 Google Chrome 作为浏览器后,Visual Studio 将调试在 Chrome 中运行的 JavaScript。When you start debugging ASP.NET projects and choose Google Chrome as your browser, Visual Studio will debug your JavaScript running in Chrome. 如果想要改为使用浏览器内的开发工具,可以在“工具”>“选项”>“调试”下禁用此功能。If you prefer to use the in-browser development tools instead, you can disable this feature under Tools > Options > Debugging.


实时单元测试 Live Unit Testing

Visual Studio 2017 Enterprise 版中的实时单元测试(图 33)功能会在编辑器中实时显示单元测试结果和代码覆盖率。Live Unit Testing (Figure 33) is a capability in the Visual Studio 2017 Enterprise edition that displays unit test results and code coverage live in the editor. 它支持 MSTest、xUnit 和 Nunit for C# 以及面向 .NET Framework 的 VB 项目。It supports MSTest, xUnit, and Nunit for C# and VB projects targeting .NET Framework.

Live Unit Testing
(图 33)实时单元测试(Figure 33) Live Unit Testing

有关详细信息,请参阅 Live Unit Testing 博客See the Live Unit Testing blog for more details.


测试工具 Testing Tools

使用测试资源管理器将自动化与测试用例工作项关联Associate automation with test case work items using Test Explorer

现在可通过在测试资源管理器中选择一种测试方法将自动化和测试用例工作项(图 34)关联。You can now associate automation with test case work items (Figure 34) by selecting a test method in the Test Explorer. 通过这种新体验还可查看所选择的测试方法的现有关联。This new experience also allows you to view any existing associations for the chosen test method.

只需在测试资源管理器中右键单击测试,Simply right click a test in the Test Explorer...

Test Explorer Associate Automation
(图 34)测试资源管理器关联自动化(Figure 34) Test Explorer Associate Automation

并提供测试用例 ID 即可创建关联*(图 35)*。...and provide a test case ID to create an association (Figure 35).

Associate Automation
(图 35)关联自动化(Figure 35) Associate Automation
*

在 Visual Studio 的先前版本中,可使用工作项窗体完成此操作。In previous versions of Visual Studio, this could be done using the work item form. 可使用“工具”|“选项”打开兼容模式来启用基于工作项窗体的体验*(图 36)*。The work-item form based experience can be enabled by turning on the compatibility mode using Tools | Options (Figure 36).

Work Item Form Compatibility mode
(图 36)工作项窗体兼容模式(Figure 36) Work Item Form Compatibility mode

团队资源管理器 Team Explorer

新增 Git 功能New Git Features

我们已在 Visual Studio 2017 中添加了新的 Git 功能,用户现在可在不离开 IDE 的情况下执行更多端到端工作流。We've added new Git features to Visual Studio 2017 that allow you to do more of your end-to-end workflow without leaving the IDE. 可轻松查看传出提交的差异、执行强制推送来完成变基或推送修改提交、复原上游分支以及从 VS 继续修补程序变基。You can easily view the diff for outgoing commits, perform a force push to complete a rebase or push an amended commit, unset your upstream branch, and continue a patch rebase from VS. 此外,迁移到了 git.exe。Additionally, we have moved to git.exe. 这使我们可提供最新功能。This allows us to provide the most up-to-date features. 我们支持 SSH、尊重你的配置选项,并在团队资源管理器中精确显示命令行中所示的内容。We support SSH, respect your config options, and show in Team Explorer exactly what you see in the command line. 若要了解有关这些功能的详细信息,请查看博客文章To learn more about these features, check out the blog post.

连接到 VSTS/TFSConnect to VSTS/TFS

在 Visual Studio 起始页和团队资源管理器中,已个性化和简化了在 VSTS/TFS 中连接到项目和克隆存储库的过程,从而使得能够更快速且更轻松地找到要连接到的项目和存储库。On the Visual Studio start page and in Team Explorer, the process for connecting to projects and cloning repos in VSTS/TFS has been personalized and streamlined, making it faster and easier to find the projects and repos to connect to. 全新的“连接”页面仅显示已在所有 VSTS/TFS 服务器中映射和克隆的项目和存储库(而非显示每个项目的每个存储库)。Our brand new Connect page shows only the projects and repos that you have mapped and cloned across all your VSTS/TFS servers (rather than every repo for every project). 此外,你在克隆存储库前不再需要连接到某个项目。Additionally, you no longer need to connect to a project before cloning repos.

当启动对话框以连接到 VSTS 和 TFS 时,将看到经过重新设计的用户体验。When you launch the dialog to connect to VSTS and TFS, you will see the redesigned UX. 可以看到添加的 TFS 服务器,然后是所选用户帐户的所有 VSTS 服务器、项目和存储库。You will see any TFS servers you've added followed by all VSTS servers, projects, and repos for your selected user account. 结果以树形列出,以改善导航效果。The results are listed in a tree to allow for improved navigation. 除了存储库外,还可以连接到集合或项目。You can connect to collections or projects in addition to repos. 有关详细信息,请参阅 Connect to Team Projects(连接到团队项目)。For more information, see Connect to Team Projects.

工作项窗体Work Item Forms

如果从 Visual Studio 2017 连接到 Visual Studio Team Services 并打开工作项,Web 浏览器中会显示工作项窗体(图 37)。When you connect to Visual Studio Team Services from Visual Studio 2017 and open a work item, the work item form will appear in your web browser (Figure 37). 不过,如果你连接到的是 Team Foundation Server 2015 或更早版本,则看到的是旧版工作项窗体。However, if you connect to Team Foundation Server 2015 or earlier, you will see the legacy work item forms.

Work Item Form in Team Explorer
(图 37)团队资源管理器中的工作项表单(Figure 37) Work Item Form in Team Explorer

增强的 Visual Studio 反馈工作流 Enhanced Visual Studio Feedback Workflow

Visual Studio 2017 包括升级反馈体验,可改善信息跟进和协作。Visual Studio 2017 includes an upgraded feedback experience for better follow-up and collaboration. 作为此次升级的一部分,你将注意到 Visual Studio 中“问题报告”体验的协作性增强,且补充了复合式 Web 门户,形成完全端对端反馈解决方案。As part of this upgrade, you will notice a more collaborative Report-a-Problem experience in Visual Studio supplemented by a comprehensive web portal for a complete end-to-end feedback solution. 现在,可以搜索、关注、投票并获取之前通过 Visual Studio IDE 的“报告问题”功能提供的所有反馈的最新更新。You can now search, follow, vote, and get the latest updates on all feedback you have provided via Visual Studio IDE’s Report a Problem feature. 这些增强的体验针对我们收到的众多用户反馈,且让用户能够与我们的团队进行双向交流。These enhanced experiences address much of the feedback we received from you and enable bidirectional communication between our teams and you.


Visual Studio 扩展性 Visual Studio Extensibility

新的扩展性格式New Extensibility Format

借助 Visual Studio 2017 中新的安装程序技术,用户可更好地掌控所安装的工具。The new installer technology in Visual Studio 2017 gives you greater control over the tools that are installed. 一些用户可能仅安装核心 Visual Studio 编辑器,而另一些可能安装若干工作负荷。Some users may install just the core Visual Studio editor while others may install several workloads. 现在,扩展作者可在清单中指定扩展所需的单独组件,以便确保安装了扩展所需的必备功能。To ensure that the prerequisite features and extensions required are installed, extension authors will now be able to specify the individual components required by their extension in the manifest.

如果扩展不是使用新的 VSIX 格式生成的,用户在尝试安装此扩展时,将会收到警告。Users will be warned when trying to install an extension that was not built using the new VSIX format. 旧的 VSIX 格式不会指定所需实现的先决条件,因此当 Visual Studio 2017 中不具备这些先决条件时,该格式可能无法正常工作。The old VSIX format does not specify prerequisites needed and may fail to work if those prerequisites are unavailable in Visual Studio 2017. 新的 VSIX 格式是向后兼容的,适用于 Visual Studio 2012 及之前的所有版本。The new VSIX format is backwards compatible and can target past versions of Visual Studio up until Visual Studio 2012.

更新了 VSIX 清单设计器,以反映对清单的更改。The VSIX manifest designer has been updated to reflect the changes to the manifest. 在先决条件选项卡*(图 38)*中,扩展开发人员可找到用于指定为扩展先决条件的已安装组件的列表。In the prerequisite tab (Figure 38), extension developers can find a list of installed components to specify as a prerequisite for their extension.

Prerequisite tab
(图 38)先决条件选项卡(Figure 38) Prerequisite tab

在扩展安装期间,VSIX 安装程序*(图 39)*将指示缺少哪些组件,并会将其与扩展一并安装。During the installation of the extension, the VSIX installer (Figure 39) will indicate which components are missing and will install them alongside the extension.

VSIXInstaller
(图 39)VSIXInstaller(Figure 39) VSIXInstaller

批量修改扩展Modify Extensions in Bulk

在“扩展和更新”对话框(图 40)中,现可计划在需要重新启动 Visual Studio 之前,要进行安装、更新和卸载的多个扩展。In the Extensions and Updates dialog (Figure 40), you can now schedule multiple extensions for installation, update, and uninstallation before needing to restart Visual Studio. 右下角有一个计划任务的摘要。In the lower right corner, there is a summary of the scheduled tasks. 若要删除计划内修改,请单击当前计划安装的扩展旁边的 X 符号。To remove a scheduled modification, click the X next to an extension that is currently scheduled to install.

Extensions and Updates Dialog
(图 40)“扩展和更新”对话框(Figure 40) Extensions and Updates Dialog

当 VSIX 安装程序检测到所有 Visual Studio 窗口已关闭后,便会启动以完成计划的修改*(图 41)*。Once the VSIX Installer has detected that all Visual Studio windows are closed, it will start to complete the scheduled modifications (Figure 41).

Batched Modification Installer
(图 41)批量修改安全程序(Figure 41) Batched Modification Installer

Ngen 支持Ngen Support

现可选择使用 Ngen *(图 42)*安装程序集。You can now choose to install assemblies using Ngen (Figure 42).

NGEN Properties
(图 42)NGEN 属性(Figure 42) NGEN Properties
  • Ngen - 是否对程序集使用 Ngen。Ngen - Whether or not to use Ngen on the assembly.
  • Ngen 应用程序 - 经由 /ExeConfig 切换传递到 Ngen 的应用程序。Ngen Application - The application to pass into Ngen via the /ExeConfig switch.
  • Ngen 体系结构 - 本机映像的目标体系结构。Ngen Architecture - The target architecture for the native image. 选项有:x86、x64 以及全部。Options are: x86, x64, and all.
  • Ngen 优先级 - Ngen 优先级别。Ngen Priority - Ngen priority level.

在扩展目录外安装文件Install Files Outside of Extension Directory

现在,可选择将文件安装到位于扩展目录之外的一系列所选文件夹*(图 43)*。You can now choose to install files to a select list of folders that are outside of the extension directory (Figure 43).

VSIX Properties
(图 43)VSIX 属性(Figure 43) VSIX Properties
  • 包括在 VSIX 中 - 将文件包括在 VSIX 中。Include in VSIX - Include the file in your VSIX.
  • 安装根目录 - 要将文件安装在其中的根目录。Install Root - The root directory to install the file. 选项包括:默认(安装在扩展目录内)、PublicAssemblies、ReferenceAssemblies、MSBuild、Schemas、Licenses、RemoteDebugger 和 VSTargets。Options are: Default (install inside the extension directory), PublicAssemblies, ReferenceAssemblies, MSBuild, Schemas, Licenses, RemoteDebugger, and VSTargets.
  • 目标路径 - 要安装在用户计算机上的文件的名称。Target Path - The name of the file to be installed on the user's machine.
  • VSIX 子路径 - 根目录下安装文件时所用的子路径。VSIX Sub Path - The sub path under the Install Root where the file will be installed.

漫游扩展管理器 Roaming Extension Manager

在新的 Visual Studio 2017 中,漫游扩展管理器可帮助跟踪开发环境中你喜欢的所有扩展。New in Visual Studio 2017, the Roaming Extension Manager helps you keep track of your favorite extensions across all of your development environments. 漫游扩展可在云中创建同步列表,从而跟踪已安装的扩展。Roaming your extensions keeps track of the extensions you have installed by creating a synchronized list in the cloud.

登录到 Visual Studio 时,从“工具”>“扩展”和“更新”,单击“漫游扩展管理器”可快速查看扩展列表(图 44)。When you sign into Visual Studio, you can quickly see a list of your extensions from Tools > Extensions and Updates, and click Roaming Extension Manager (Figure 44). 它可跟踪已安装的扩展,并让你选择要添加到漫游列表的扩展。It tracks which extensions you have installed and lets you choose which ones are added to your Roaming list. 库中的新扩展与日俱增,此工具可让你快速轻松地使用钟爱的扩展设置每个开发环境。With new extensions appearing in the gallery every day, this tool makes it quick and easy to set up each dev environment with your favorite extensions.

The new Roaming Extension Manager in the Visual Studio IDE
(图 44)Visual Studio IDE 中的全新漫游扩展管理器(Figure 44) The new Roaming Extension Manager in the Visual Studio IDE

使用此功能时将注意到 3 种图标类型:When using this feature, you will notice 3 icon types:

  • “漫游”图标“漫游”图标 - 表示存在于漫游列表中、但未在此计算机上安装的扩展。Roamed Icon Roamed Icon - Denotes an extension that is part of your Roaming List, but not installed on this machine. 可通过“下载”按钮安装这些扩展。You can install these via the "Download" button.
  • “漫游且已安装”图标“漫游且已安装”图标 - 表示存在于漫游列表中且已在此环境中安装的所有扩展。Roamed and Installed Icon Roamed & Installed Icon - Denotes all extensions that are part of your Roaming List and installed in this environment. 如果你确定不希望漫游,可通过“停止漫游”按钮删除它们。If you decide you do not want to roam, you can remove these via the "Stop Roaming" button.
  • “已安装”图标“已安装”图标 - 表示此环境中已安装、但不属于漫游列表的所有扩展。Installed Icon Installed Icon - Denotes all extensions that are installed in this environment, but are not part of your Roaming List. 扩展可通过“开始漫游”按钮添加到漫游列表。Extensions can be added to roaming list via the "Start Roaming" button.

这些图标将显示列表当前的状态。These icons will show you the current status of your list. 可使用处于任何状态的任何扩展,因此可自定义你心中所想的内容!You can have any extension in any state, so customize to your heart's content! 或者,让我们为你代劳!Or let us do it for you! 登录时下载的所有扩展都将作为“漫游且已安装”的内容添加到列表,因此将包含在漫游列表中,使你可在任意计算机上进行访问!Any extension downloaded while you are signed in will be added to your list as Roamed & Installed and will therefore be part of your Roaming list, giving you access to it from any machine!

发现项目和项模板 Discovery of Project and Item Templates

自 Visual Studio 2017 起,突破性地改进了 Visual Studio 使用项目和项模板的方式,提升了模板发现的性能。Starting in Visual Studio 2017, there is a breaking change with how Visual Studio consumes project and item templates to improve the performance of template discovery. 新的发现机制现在要求所有项和项目模板均遵循模板清单文件中定义的以下“vstemplate”架构。The new discovery mechanism now requires all item and project templates following "vstemplate" schema to be defined in template manifest files. 模板清单文件中未定义的 Visual Studio 模板在“新建项目”或“新建项”对话框中将不再可见。Visual Studio templates that you do not define in a template manifest file will no longer be visible in New Project or New Item dialogs. 新的扩展性工具将在 VSIX 生成期间生成清单;如果你具备随附 MSI 包发布的 Visual Studio 模板,则必须为这些模板手动生成模板清单文件。While the new extensibility tooling will generate a manifest during VSIX build time, if you have Visual Studio templates released as part of an MSI package, you must manually generate template manifest files for those templates. 有关详细信息,请参阅 Upgrading Custom Project and Item Templates for Visual Studio 2017(升级 Visual Studio 2017 的自定义项目和项模板)MSDN 页面。For more information, see the Upgrading Custom Project and Item Templates for Visual Studio 2017 MSDN page.


.NET Core 和 ASP.NET Core .NET Core and ASP.NET Core

这包含新的基于 MSBuild 的 .NET Core 工具的 1.0 最终版本。This contains the 1.0 final release of the new MSBuild based .NET Core Tools. 使用 Visual Studio 2017 可创建 .NET Standard 库、.NET Core 应用/库和使用新 csproj 格式的 ASP.NET web 项目。Using Visual Studio 2017, you can create .NET Standard libraries, .NET Core apps/libraries and ASP.NET web projects that use the new csproj format.

在安装程序中,.NET Core 工具自动包含在“ASP.NET 和 Web 开发”工作负载中,且在“.NET 桌面开发”工作负载中作为可选组件。.NET Core tooling is automatically included in the “ASP.NET and web development” workload and an optional component in the “.NET desktop development” workload in the installer. 如果仅要开发跨平台使用的 .NET Core 应用程序,可使用安装程序的“其他工具集”部分中的“.NET Core 跨平台开发”工作负载来仅安装 .NET Core 和 ASP.NET Core 工具。If you only want to develop .NET Core applications for cross platform use, you can install just the .NET Core and ASP.NET Core tools using the “.NET Core cross-platform development” workload from the “Other Toolsets” section of the installer.

此版本中的高级功能包括:High-level features in this release include the following:

  • .NET Core 项目的 MSBuild 支持和简化的 csproj 项目格式,使用该格式可轻松实现手动编辑,而无需卸载项目。MSBuild support for .NET Core projects, with a simplified csproj project format that makes it easier to edit by hand, without the need to unload the project.
  • 编辑 .NET Core .csproj 文件非常简单,只需在解决方案资源管理器中右键单击项目然后选择“编辑”即可。Editing .NET Core .csproj file is as simple as a right click on project in Solution Explorer and choosing “Edit”.
  • 支持项目文件中的文件通配符,可无需枚举所有源代码文件名,从而使 csproj 文件大小保持精简。Support for file wildcards in project file, where you don’t have to enumerate all the source code file names, which keeps the csproj file compact in size.
  • NuGet 包引用现在是 csproj 文件的一部分,这样可将所有项目引用合并在一个文件中。NuGet package references are now part of the csproj file, consolidating all project references in one file.
  • NET Core、.NET Standard 和 .NET Framework 项目之间的互操作。Interop between .NET Core, .NET Standard and .NET Framework projects. 例如,.NET Core 项目可向 .NET Standard 项目添加项目到项目引用。For example, a .NET Core project can add a project-to-project reference to a .NET Standard project.
  • 一个项目中跨目标的多个目标框架。Cross-target multiple target frameworks in one project.
  • 现有 project.json .NET Core 项目在 Visual Studio 中打开时会自动迁移到 csproj,或者可使用 .NET 命令行接口 (CLI) 手动迁移Existing project.json .NET Core projects will automatically migrate to csproj when opened in Visual Studio, or you can manually migrate them using the .NET Command Line Interface (CLI).
  • 轻松配置 ASP.NET Core 应用程序与 Docker 支持的持续生成集成和配置从 Visual Studio IDE 内部到 Azure 容器服务的持续生成交付。Easily configure continuous build integration for your ASP.NET Core application with Docker support and continuous build delivery to your Azure Container Services from within the Visual Studio IDE.

请参阅 .NET 博客以了解更多详细信息。See the .NET blog for more details.


通用 Windows 应用开发工具 Tools for Universal Windows App Development

更新了 .NET Native 工具链Updated .NET Native Toolchain

此更新的 .NET Native 工具链添加了好几个优化功能,可提高 Visual Studio 中托管的 UWP 应用的运行时性能。This updated .NET Native toolchain adds several optimizations to improve runtime performance for managed UWP apps in Visual Studio. 此版本包含 600 多个 bug 修复和功能,不仅解决了客户的主要反馈问题,而且还提高了工具链的总体质量。The release includes more than 600 bug fixes and features to address key customer feedback and improve the overall quality of the toolchain.

5.3.0 Microsoft.NETCore.UniversalWindowsPlatform 包5.3.0 Microsoft.NETCore.UniversalWindowsPlatform Package

.NET Core NuGet 框架库的此次更新解决了客户报告的许多关键问题。This update to the .NET Core NuGet framework libraries addresses a number of key issues reported by customers. 现有的 UWP 项目可以使用 NuGet 引用管理器更新到此新版本。Existing UWP projects can use the NuGet reference manager to update to this new version. 此外,新的 .NET Core 包中包含 .NET Native 工具链。In addition, the new .NET Core package includes the .NET Native toolchain.

Windows 10 周年更新 SDK 和仿真器Windows 10 Anniversary Update SDK and Emulator

此版本中包括 Windows 10 周年更新的 Windows SDK 和 Windows Phone 仿真器。The Windows SDK and Windows Phone emulator for the Windows 10 Anniversary Update are included in this release.

  • 现可使用较少的 XAML 标记从工具箱创建 UI 元素,让 XAML 更简洁、更易读。UI Elements created from the Toolbox will now be created with fewer XAML Tags, resulting in cleaner, more readable XAML.
  • 通过 XAML 设计器上的新选项工具,开发人员可选择要在设计图面上预览的 UI 主题和高对比度设置。A new options tool on the XAML Designer allows the developer to select the UI theme and High Contrast settings to be previewed on the design surface.
  • “属性”窗口中的值编辑器现接受简单的数学公式,如“60 + 20”。The value editors in the Properties window now accept simple mathematical equations, such as "60+20". 将立即计算公式(本例中等于 80),生成的值放入 XAML。The equations will be immediately evaluated (in this case, 80) and their resulting value put into the XAML.

用于创建视觉资产的清单设计器功能Manifest Designer Capability for Creating Visual Assets

清单设计器(图 45)进行了可视化刷新,现还可生成 UWP 应用的视觉资产。The Manifest Designer (Figure 45) has undergone a visual refresh, and now has the added capability of generating visual assets for your UWP apps. 现可使用单个源映像创建各种尺寸的磁贴、徽标、图标和初始屏幕,以适合应用针对的每种设备的大小。You can now use a single source image to create tiles, logos, icons, and splash screens at any or all scales to fit every type of device your app targets.

Manifest Visual Asset Generator
(图 45)清单视觉资产生成器(Figure 45) Manifest Visual Asset Generator

UI 分析UI Analysis

现在,通用 Windows 平台工具可检测一些与辅助功能和性能相关的常见问题。The Universal Windows platform tooling now has the ability to detect common accessibility and performance related issues. 通过在“诊断工具”窗口的“选择工具”菜单中启用“UI 分析”工具,可报告这些问题,并随附有关阐释问题原因和解决方法的有用文章的链接。By enabling the "UI Analysis" tool in the Select Tools menu of the Diagnostic Tools window, these issues will be reported along with links to helpful articles explaining how and why the issues should be addressed. 开发时启用 UI 分析可使 UI 性能和辅助功能处于应用程序开发前沿。Developing with UI Analysis enabled brings UI performance and accessibility to the forefront of your application development.


Xamarin Xamarin

Visual Studio 2017 中包括 Xamarin 4.4。Xamarin 4.4 is included in Visual Studio 2017. 有关更多信息,请参阅 Xamarin 发行说明For more information, see the Xamarin release notes.

此 Xamarin for Visual Studio 4.4 发布版本更新了 Xamarin.iOS 10.8Xamarin.Android 7.2 版本。This Xamarin for Visual Studio 4.4 release updates Xamarin.iOS 10.8 and Xamarin.Android 7.2 releases.

Bug 修复Bug fixes

此版本包括以下修复:This release includes the following fixes:

  • iOS Extension 应用未能构建,出现“无法读取授权数据”错误。(4.4.0.31)iOS Extension apps fail to build with error "cannot read Entitlements data".(4.4.0.31)
  • 包括针对 Watson 报告的符号。(4.4.0.6)Includes symbols for Watson reports.(4.4.0.6)
  • 如果解决方案还包含 Wix 项目,则 Android 部署失败。(4.3.1.39)Android deployment fails if solution also contains a Wix project.(4.3.1.39)
  • 打开某些 iOS 项目时出现死锁。(4.3.1.39)Deadlock opening some iOS projects.(4.3.1.39)
  • 断点不会命中第二层 PCL 引用。(4.3.1.39)Breakpoints won't hit on second-level PCL references.(4.3.1.39)
  • 解决因缺少 CodeSignNativeLibraries 任务而导致的 iOS 问题。(4.3.1.39)Fixes iOS issue due to missing CodeSignNativeLibraries task.(4.3.1.39)
  • 连接到 Mac 服务器后打开情节提要时出错。(4.3.1.39)Error opening storyboard after connecting to Mac server.(4.3.1.39)
  • Android 类库项目的属性页面上应仅包含“使用 Android 版本编译”。(4.3.1.39)Android class library project should only include "Compile using Android Version" on Property page.(4.3.1.39)
  • 转到“工具”->“选项”->“Xamarin”->“其他”选项卡时,Visual Studio 挂起。(4.3.1.39)Visual Studio hangs when going to the "Tools->Options->Xamarin->Other" tab.(4.3.1.39)
  • 在某些环境中加载跨平台解决方案时,Visual Studio 挂起。(4.3.1.1)Visual Studio hangs loading a cross-platform solution in some environments.(4.3.1.1)
  • VS 项目模板中未引用 Microsoft.Csharp。(4.3.1.1)Microsoft.Csharp not referenced in VS Project Templates.(4.3.1.1)
  • 若配置的用户 Shell 没有使用 bash 语法,则无法连接到 Mac 服务器。(4.3.1.1)Cannot connect to Mac server if configured User Shell doesn't use bash syntax.(4.3.1.1)
  • 缺少“提交到测试云”选项(已在 VS2013 和 VS2015 中修复)。(4.3.1.1)Submit to Test Cloud option missing (fixed on VS2013 and VS2015).(4.3.1.1)
  • 变量/属性名称与其他内容的类名称相同时,调试程序开始混淆。(4.3.1.1)Debugger gets confused when Variable/Property name is same as Class name of something else.(4.3.1.1)
  • 无法重命名从资产目录中设置的映像。(4.3.1.1)Image set from asset catalog can't be renamed.(4.3.1.1)
  • 监视扩展项目中强制隐藏了“资源”文件夹。(4.3.1.1)The 'Resources' folder is being forcibly hidden in watch extension projects.(4.3.1.1)
  • 对 tvOS 项目而言,“资源”中的“Assets.xcasset”文件夹不会隐藏。(4.3.1.1)"Assets.xcasset" folder within "Resources" is not being hidden for tvOS projects.(4.3.1.1)

Visual Studio 用于 Apache Cordova 的工具 Visual Studio Tools for Apache Cordova

此 Visual Studio 2017 版包括以下改进:This Visual Studio 2017 release includes the following improvements:

  • Cordova 模拟 - 基于浏览器的新模拟器可实现快速编码并即时在浏览器中查看结果(图 46)。Cordova simulate - A new browser-based simulator enables you to code fast and see the results immediately in the browser (Figure 46). 实时重新加载、插件模拟和 Ionic 框架支持使 Visual Studio 拥有市场中最快的开发人员工作流。Live reload, plugin simulation, and support for Ionic Framework give Visual Studio the fastest developer workflow on the market.
Cordova simulate
(图 46)Cordova 模拟(Figure 46) Cordova simulate
  • 对 iOS 10 和 XCode 8 的支持 - 用于 iOS 开发的 remotebuild 服务器代理的更新现包括 XCode 8 支持。Support for iOS 10 & XCode 8 - An update of the remotebuild server agent for iOS development now includes support for XCode 8.

  • 错误着色 - 诊断生成故障经常需要开发人员通读生成输出,因此我们开始在生成输出窗格中将错误着色,让读取变得更轻松(图 47)。Error colorization - Because diagnosing build failures often requires developers to read through build output, we have started to colorize errors in the build output pane for easier reading (Figure 47). 此外,还添加了标头来描述生成进度中的步骤,帮助开发人员识别生成进度中出现故障的位置。Moreover, we have added headers to delineate steps in the build process to help developers identify where in the build process the failure occurred.

Colorized Errors
(图 47)着色错误(Figure 47) Colorized Errors
  • 产品内获取 - 除了用于加速 Cordova 应用构建的轻量级安装,现在添加了来自 Visual Studio 内的路径以在开发过程中获取额外的生成块*(图 48)*。In-product acquisition - In addition to the new light-weight installation to get you building Cordova apps faster, we have now added pathways from within Visual Studio to acquire additional build pieces as your development continues (Figure 48). 如果未安装 Android 或 Windows 组件,可通过部署栏获取它们,部署栏将启动 Visual Studio 安装程序,在安装过程中为用户提供指导。If you have not installed Android or Windows components, you can get them through the deploy bar, which will launch Visual Studio setup and guide you through the installation process.
In-product acquisition
(图 48)产品随附(Figure 48) In-product acquisition
  • 快速、可靠的生成 - 新的 Visual Studio 安装程序,结合经过完全验证的第三方组件工具链的脱机安装,可加快生成速度,且这些生成更易于进行故障排除和修复。Fast, reliable builds - The new Visual Studio Installer, combined with offline installation of a fully validated toolchain of 3rd party components, provides for faster builds that are also easier to troubleshoot and fix.

重要

适用于 Android 和 Windows 的生成工具和仿真程序现在是可选的。Build tools and emulators for Android and Windows are now optional. 可通过生成/部署菜单栏动态获取它们。You can acquire them dynamically through the build/deploy menu bar. 此版本的 Visual Studio 不支持 Windows Store 8.1 项目。This release of Visual Studio does not support Windows Store 8.1 projects. 建议你以 Windows 10 为目标来更新 Cordova 项目。We recommend that you update your Cordova projects to target Windows 10. 最低的受支持 Cordova 版本提升至 6.0.0。Minimum supported Cordova version is raised to 6.0.0. 面向低于 6.0.0 的 Cordova 版本的项目只有在 config.xml 中升级其项目才能在 Visual Studio 2017 中进行生成和部署。Projects targeting a Cordova version lower than 6.0.0 will need to upgrade their project in config.xml to build and deploy in Visual Studio 2017.


适用于 Visual Studio 的 Node.js 工具 Node.js Tools for Visual Studio

适用于 Visual Studio 的 Node.js 工具将 Visual Studio 变成功能强大的 Node.js 开发环境。Node.js Tools for Visual Studio turns Visual Studio into a powerful Node.js development environment. 此版本侧重稳定性、性能和总体产品质量,包括:This release focuses on stability, performance, and overall product quality, including:

  • 优化了与新的 Salsa JavaScript 语言服务之间的集成。Better integration with the new Salsa JavaScript language service.
  • 降低了内存和 CPU 使用率,缩短了项目加载时间。Reduced memory and CPU usage, and shorter project load times.
  • Pug 模板文件支持。Support for Pug template files.
  • 更多最新式的项目模板。More up-to-date project templates.
  • Mocha 3.x 测试框架支持。Support for Mocha 3.x test framework.
  • 大量 Bug 修复。Numerous bug fixes.

感谢你与所有参与者们为此版适用于 Visual Studio 的 Node.js 工具的推出所做出的积极贡献。Thank you to all the amazing contributors who made this release of Node.js Tools for Visual Studio possible. 有关详细信息,请查看开放源 GitHub 上的 Node.js 工具项目For more information, check out the open source Node.js Tools project on GitHub.


适用于 Unity 的 Visual Studio 工具 Visual Studio Tools for Unity

使用 Visual Studio 编写和调试适用于所有平台的 Unity 游戏。Use Visual Studio to write and debug Unity games for all platforms. Visual Studio Tools for Unity 3(图 49)现已可通过新的 Visual Studio 2017 安装程序中的“使用 Unity 的游戏开发”工作负载进行安装。Visual Studio Tools for Unity 3 (Figure 49) is now available to be installed with the "Game Development with Unity" workload in the new Visual Studio 2017 installer. Visual Studio Tools for Unity 3 侧重于改进 Unity 开发人员的代码编辑和调试体验,以及总体产品质量,包括:Visual Studio Tools for Unity 3 focuses on improving the code editing and debugging experience for Unity developers as well as overall product quality, including:

  • Unity 消息的 Intellisense 支持。IntelliSense support for Unity messages.
  • Unity 消息的代码着色。Code colorization of Unity messages.
  • 改进了 Unity 调试器中的表达式计算。Improved expression evaluation in the Unity debugger.
  • 改进了 Unity 消息向导,支持所有可接收消息 Unity 类型。Improved Unity message wizards to support all Unity types able to receive messages.
  • 大量 Bug 修复和优化。Numerous bug fixes and optimizations.
Code completion session for Unity messages
(图 49)Unity 消息的代码完成会话(Figure 49) Code completion session for Unity messages

RedgateRedgate

Visual Studio 随附 Redgate 数据工具Redgate Data Tools Included with Visual Studio

为了将 Visual Studio 2017 DevOps 功能扩展到 SQL Server 数据库开发,Redgate 数据工具(包含 Redgate SQL Prompt Core、Redgate SQL 搜索和 Redgate ReadyRoll Core)现可用于数据存储和处理工作负荷。To extend Visual Studio 2017 DevOps capabilities to SQL Server database development, Redgate Data Tools, comprising Redgate SQL Prompt Core, Redgate SQL Search, and Redgate ReadyRoll Core, are now available in the Data Storage and Processing workload.

  • Visual Studio Enterprise 2017 中包含的 Redgate ReadyRoll Core 有助于开发迁移脚本、使用源控件管理数据库更改,并安全地自动部署 SQL Server 数据库更改和应用程序更改。Redgate ReadyRoll Core, included with Visual Studio Enterprise 2017, helps you develop migration scripts, manage database changes using source control, and safely automate deployments of SQL Server database changes alongside applications changes.
  • 利用 Visual Studio Enterprise 2017 附带的 Redgate SQL Prompt Core,可在智能代码完成功能的帮助下更快、更准地编写 SQL。Redgate SQL Prompt Core, included with Visual Studio Enterprise 2017, helps you write SQL more quickly and accurately with the help of intelligent code completion. SQL Prompt 可自动完成数据库、系统对象和关键字,并在你键入时提供列建议。SQL Prompt autocompletes database and system objects and keywords, and offers column suggestions as you type. 无需记住每个列名或别名,因此代码更简洁,错误更少。This results in cleaner code and fewer errors because you don’t need to remember every column name or alias.
  • Visual Studio 2017 各个版本中包含的 Redgate SQL 搜索可帮助用户在多个数据库之间快速找到 SQL 片段和对象,从而提高工作效率。Redgate SQL Search, included with all editions of Visual Studio 2017, increases your productivity by helping you quickly find SQL fragments and objects across multiple databases.

NuGet NuGet

Visual Studio 2017 包括 NuGet 4.0。Visual Studio 2017 includes NuGet 4.0. 此版本侧重于支持大多数项目类型的包引用、质量改进和性能改进:This release is focused on supporting package reference for the majority project types, quality improvements, and performance improvements:

  • 在 WPF、WindowsForms 和 UWP 项目中,现可使用包引用对包进行管理。In WPF, WindowsForms, and UWP projects, packages can now be managed using package references.
  • 已改进轻量级解决方案还原的 NuGet 还原支持。NuGet restore support has been improved for Lightweight Solution Restore. 现在无需加载任何项目即可执行还原。Restores can now be performed without needing to load any projects.
  • 在 .NET Core 和 ASP.NET Core 项目中,现使用包引用管理包。In .NET Core and ASP.NET Core projects, packages are now managed using package references.
  • 在 Visual Studio 2017 及更高版本中,计算机范围内的 NuGet.config 现位于 %PROGRAMFILES(X86)%\NuGet\Config\NuGet.config。今后 nuget.exe v4.0.0 + 也将考虑为计算机范围内的配置使用新位置。In Visual Studio 2017 and above, the machine-wide NuGet.config is now located at %PROGRAMFILES(X86)%\NuGet\Config\NuGet.config. Going forward, nuget.exe v4.0.0 + will also consider the new location for the machine-wide configuration. 将不再隐式引用程序数据中的 NuGet.config 或考虑将其用于 nuget.config 的层次结构合并。NuGet.config in program data will no longer be implicitly referenced or considered for the hierarchical merging of nuget.config.

用于 XAML 应用的工具 Tools for XAML Apps

XAML 编辑和继续XAML Edit & Continue

Visual Studio 中现在允许在运行 WPF 或通用 Windows 应用的同时编辑 XAML。Visual Studio now allows you to edit XAML while your WPF or Universal Windows App is running. 在 Visual Studio 中调试应用时,可在 XAML 代码编辑器中对标记作出更改,且所做的更改会反应在运行的应用中,而无需重新进行编译。While debugging your app in Visual Studio, you can make a change to the markup in the XAML code editor and the change will be reflected in the running app without having to recompile.

增强 XAML 编辑器的生产力XAML Editor Productivity Enhancements

  • IntelliSense 筛选 - 键入 XAML 时,完成列表将仅显示匹配的类型,且选中匹配度最高的项。IntelliSense filtering - When typing XAML, the completion list will only display types that match and the closest match will be selected.
  • IntelliSense for x:Bind - 绑定到路径和事件时对 x:Bind 启用了 IntelliSense 完成。IntelliSense for x:Bind - We have enabled IntelliSense completion for x:Bind when binding to Path and Events.
  • 命名空间完成 - 如果不存在命名空间引用(图 50),则在键入时不会获得 IntelliSense 支持。Namespace completion - If the reference to the namespace does not exist (Figure 50), you will not get IntelliSense support while typing. 键入完成后会获得灯泡建议支持,可为键入内容生成和插入前缀并在 XAML 文档中添加命名空间定义。When you have finished typing, you will get light bulb suggestion support to generate & insert the prefix for the type and add the namespace definition in your XAML document.
Code completion session for IntelliSense_without_namespace
(图 50)IntelliSense_without 命名空间(Figure 50) IntelliSense_without namespace
* <span data-ttu-id="8a42e-966">对于需要前缀的类型,如果已存在对命名空间的引用,IntelliSense 将自动完成前缀。</span><span class="sxs-lookup"><span data-stu-id="8a42e-966">For types that require a prefix, IntelliSense will offer to auto-complete the prefix if the reference to the namespace already exists.</span></span>

  • 命名空间前缀重命名重构 - 可从上下文菜单或在光标位于前缀上时使用键盘快捷方式 Ctrl+R+R 调用重命名操作(图 51)。Namespace prefix rename refactoring - You can invoke the rename action (Figure 51) from the context menu or using the keyboard shortcut Ctrl+R+R when the cursor is on the prefix. 还可在应用更改之前预览更改。You can also preview changes before applying them.
Namespace prefix rename
(图 51)命名空间前缀重命名(Figure 51) Namespace prefix rename

  • 删除命名空间和对其进行排序 - 现可从上下文菜单或通过键盘快捷方式 Ctrl+R+G 删除不必要的命名空间(图 52)并对其进行排序。Remove and sort namespaces - You can now remove unnecessary namespaces (Figure 52) and sort them from the context menu or by using the keyboard shortcut Ctrl+R+G. 如果 XAML 文档具有不必要的命名空间,还将看到一个可用于删除这些命名空间的灯泡标记。If your XAML document has unnecessary namespaces, you will also see a light bulb that will give you the option to remove them.
lightbulb_remove unnecessary namespace
(图 52)lightbulb_remove 不必要的命名空间(Figure 52) lightbulb_remove unnecessary namespace

  • 对 XAML 编辑器的 .editorconfig 支持 - 可在 .editorconfig 文件中定义 indent_style、indent_size 和 tab_width 的设置,将用此设置替代“工具”>“选项”中定义的设置。.editorconfig support for XAML editor - You can define settings for indent_style, indent_size, and tab_width in the .editorconfig file which will be used instead of the settings defined in Tools > Options.

  • 用于 XAML 编辑器的结构可视化工具 - 结构可视化工具(即缩进参考线)(图 53)现已内置到 Visual Studio 中,无需单独扩展。Structure Visualizer for XAML editor - The structure visualizer (i.e. indent guides) (Figure 53) is now built into Visual Studio, and a separate extension is not required. 此功能提供当前所处理的代码块的上下文,一眼便能看到,无需滚动。This feature provides the context of the block of code you are working on at a glance, without scrolling.

Structure Visualizer for XAML editor
(图 53)用于 XAML 编辑器的结构可视化工具(Figure 53) Structure Visualizer for XAML editor

XAML 性能改进XAML Performance Improvements

  • 改进了 XAML 选项卡切换性能:XAML 选项卡切换性能得到显著改进。Improved XAML Tab Switch performance - XAML Tab Switch performance has improved significantly. 在示例客户项目中,我们已看到切换时间缩短了超过 90%。In sample customer projects, we have seen switching time reduce by over 90%.
  • 解决 XAML 编辑器键入延迟问题 - 现在,XAML 键入变得前所未有的快速。Addressing XAML editor typing delays - XAML typing is now faster than ever. 我们在降低 XAML 编辑器键入延迟方面作出了许多努力,现在大多数开发人员会发现 XAML 编辑器和 XAML IntelliSense 响应性更高。We have made several investments to reduce XAML editor typing delays, and most developers should find the XAML editor and XAML IntelliSense to be more responsive. 在使用第三方控件或大型控件库的项目中编辑 XAML 文件时,这一点非常明显。This will be most apparent when editing a XAML file in projects that consume third party controls or large control libraries.

Data Tools 和 SQL Server Data Tools and SQL Server

SQL Server Data ToolsSQL Server Data Tools

Visual Studio 2017 包含了 SQL Server Data Tools 的最新更新,该更新支持 Azure SQL 数据库SQL Server 2016 的最新功能。The latest update of SQL Server Data Tools has been included in Visual Studio 2017, which enables support for the latest features in Azure SQL Database and SQL Server 2016.

此版本通过使用 Visual Studio,在所有 SQL Server 支持版本和数据库平台上(本地和云),汇集开发、测试和部署数据库的简便性于一体。This release brings together the ease of developing, testing, and deploying a database on all supported versions of SQL Server and database platforms - both on-premises and cloud - by using Visual Studio. 版本还包括了数据库可编程性外围应用增强功能,并改善了 SQL Server Data Tools 中的 SQL 连接体验。现在只需轻松地单击一下,即可自动发现可连接到的 SQL Server 和 Azure SQL 数据库。The release also includes database programmability surface area enhancements, and it improves the SQL connection experience in SQL Server Data Tools, which now automatically discovers SQL Server and Azure SQL Databases that you can connect to with a simple click.

此外,Visual Studio 2017 解决了新的 Azure SQL Database 身份验证类型、Azure Active Directory 集成和密码身份验证问题。Additionally, Visual Studio 2017 addresses new Azure SQL Database authentication types, as well as Azure Active Directory Integrated and Password authentication.


开发人员分析工具 Developer Analytics Tools

Visual Studio 2017 包括开发人员分析工具 v8.6,其中包含以下改进:Visual Studio 2017 includes Developer Analytics Tools v8.6, with the following improvements:

  • 现在 CodeLens 可显示将数据发送到 Application Insights 资源的项目中的调试和实时遥测数据。CodeLens now shows both debug and live telemetry data in projects that send data to an Application Insights resource.
  • 异常的 CodeLens 链接到应用程序分析,可显示异常对用户的影响。CodeLens for exceptions links to Application Analytics to show user impact of an exception.
  • 在使用 Application Insights SDK 的项目中,CodeLens 可显示来自本地调试会话的请求。CodeLens shows requests from local debug sessions, in projects with the Application Insights SDK.
  • 现在 Visual Basic 项目可提供请求和异常的 CodeLens。CodeLens for requests and exceptions are now available from Visual Basic projects.
  • 从 Visual Studio 发布应用后,实时指标现在会显示在消息条通知中。Live Metrics are now shown in a toast notification after you publish your app from Visual Studio.
  • “配置”窗口中现在可显示 Application Insights 定价的信息。Application Insights pricing information is now shown in the Configuration window.
  • “搜索和趋势”工具现在可显示可用性事件。Availability events are now shown in the Search and Trends tools.
  • “搜索和诊断”工具中的“事件”现在可基于 SDK 中的自适应采样显示事件发生频率的计数。Events in the Search and Diagnostic Tools now show counts for how often they occurred based on adaptive sampling in the SDK.
  • CodeLens 显示使用 Application Insights SDK 本地调试项目的会话期间所发生的异常。CodeLens shows exceptions that have occurred during local debug sessions for projects with the Application Insights SDK.
  • “Application Insights 配置”窗口的新设计。New design for the Application Insights Configuration window.
  • CodeLens 发现的异常现在有一个指向 Application Analytics 的链接,可查看异常已对用户产生的影响。CodeLens for exceptions now has a link to Application Analytics to see the impact an exception has had on users.
  • 将 Application Insights 添加到项目时,现在会添加用于收集页面视图遥测的 Application Insights JavaScript SDK。The Application Insights JavaScript SDK for collecting page view telemetry is now added when Application Insights is added to a project.
  • 从 Visual Studio 发布应用时,发布注释现在会发送到 Application Insights 资源中。Publish annotations are now sent to your Application Insights resource when you publish your app from Visual Studio.
  • 现在会对红色和黄色 Application Insights CodeLens 指示器显示滚动条标记。Scrollbar markers are now shown for red and yellow Application Insights CodeLens indicators.

有关 Application Insights 的详细信息,请参阅 Microsoft Azure 文档Learn more about Application Insights in the Microsoft Azure documentation.


Visual Studio 的 Office 开发工具 Office Developer Tools for Visual Studio

此版包含了附带最新功能和更新的 Office 开发人员工具,具体如下:This release includes Office Developer Tools with the latest features and updates, as follows:

  • 新增了特定于 Excel、Word、PowerPoint 和 Outlook 的新 Office 外接程序模板。New Office Add-in templates specific to Excel, Word, PowerPoint, and Outlook.
  • 支持新增的 Office 外接程序功能,如外接程序命令、Fabric UI 和 Office.js 的新版本。Support for new Office Add-in features such as add-in commands, Fabric UI, and a new version of Office.js.
  • 模板中新增了起始代码,用于展示如何开始使用新的 Office 外接程序功能。New starter code in the templates that will showcase how to get started with new Office Add-in features.
  • 支持 SharePoint 解决方案中的 SharePoint 2016 和外接程序模板。Support for SharePoint 2016 in SharePoint solutions and add-in templates.

体系结构依赖关系的实时验证 Live Architecture Dependency Validation

如果在 Visual Studio Enterprise 中设置了依赖关系验证关系图(又称层关系图),则在代码编辑器中键入代码时可实时获得体系结构依赖关系规则的任何违反行为的通知(图 54)。If you have setup Dependency Validation diagrams (aka Layer diagrams) in Visual Studio Enterprise, you now get real-time notifications (Figure 54) of any violations of the architectural dependency rules as you type your code in the Code Editor. “错误列表”中显示错误,文本编辑器中的波形曲线显示此违反行为的精确位置。Errors appear in the Error List and squiggles will appear in the text editor showing you the precise location of the violation. 现在降低了引入非必需依赖关系的可能性。You are now less likely to introduce unwanted dependencies.

Live Architecture Dependency validation
(图 54)体系结构依赖关系的实时验证(Figure 54) Live Architecture Dependency validation

开发人员命令提示符 Developer Command Prompt

重构了 Visual Studio 2017 开发人员命令提示符脚本,支持新的安装体验:The Visual Studio 2017 Developer Command Prompt scripts have been refactored to support the new installation experience:

  • 环境变量仅影响已安装的工作负载。Environment variables will reflect installed workloads only.
  • Visual Studio 开发人员命令提示符快捷方式应与以前的版本兼容。The Visual Studio Developer Command Prompt shortcut should be compatible with previous releases.
  • 现在,你可以通过命令行参数来配置开发人员命令提示符脚本:You can now configure Developer Command Prompt scripts via command line arguments:
    • 在命令提示符处,调用 common7\tools\vsdevcmd.bat -help(从 Visual Studio 安装目录)以获取详细信息。In a command prompt, call common7\tools\vsdevcmd.bat -help (from the Visual Studio installation directory) for details.

用于 .NET 的 Azure SDK Azure SDK for .NET

现可使用新的 Visual Studio 安装程序安装 Azure SDK for .NET Visual Studio。The Azure SDK for .NET Visual Studio is now available to be installed with the new Visual Studio installer. 如果以前已使用 Web 平台安装程序安装 Azure SDK for .NET,现则可使用新的 Visual Studio 安装程序安装 Azure 工作负荷以获取相同组件。If you previously installed the Azure SDK for .NET using the Web Platform Installer, you can now get the same components by installing the Azure workload using the new Visual Studio Installer. 安装的包与 SDK 2.9.5 版本具有相同的功能级别。The packages that are installed are at the same feature level as the 2.9.5 version of the SDK. 对于此版本和所有未来版本的 Visual Studio,只能通过 Visual Studio 安装程序获得 Azure SDK for .NET。For this version of Visual Studio and all future versions, the Azure SDK for .NET will only be available from the Visual Studio installer.


Visual Studio 2017 发行说明历史记录Visual Studio 2017 Release Notes History

请参阅 Visual Studio 2017 发行说明历史记录页面。Please see the Visual Studio 2017 Release Notes History page.


返回首页
Top of Page