Visual Studio 2017 for Mac Visual Studio 2017 for Mac


开发人员社区 | 系统要求 | 兼容性 | 可分发代码 | Xamarin | 博客 | 维护Developer Community | System Requirements | Compatibility | Distributable Code | Xamarin | Blogs | Servicing


备注

如果正在从一个非英语的语言版本访问此页,并想要查看最新内容,请访问此“发行说明”页(英文版)。If you are accessing this page from a non-English language version, and want to see the most up-to-date content, please visit this Release Notes page in English.

可以通过转到页面底部的页脚切换语言设置。You can switch your language setting by going to the footer at the bottom of the page. 单击 图标,然后选择所需语言。Click on the icon and select your desired language.


本文包含有关 Visual Studio 2017 for Mac(版本 7.0)最新发布的信息。This article contains information about the newest release for Visual Studio 2017 for Mac version 7.0.

使用 Visual Studio 2017 for Mac,通过 Xamarin 和 .NET Core 生成移动应用、Web 应用和云应用,以及通过 Unity 生成游戏。Use Visual Studio 2017 for Mac to build apps for mobile, web, and the cloud with Xamarin and .NET Core, as well as games with Unity.

Download Visual Studio 2017 for Mac

若要了解 Visual Studio 2017 for Mac 的详细信息,请参阅 Mac 系统要求Mac 平台目标及兼容性To learn more about Visual Studio 2017 for Mac, see Mac System Requirements and Mac Platform Targeting and Compatibility.

若要了解有关其他相关下载的详细信息,请参阅下载页。To learn more about other related downloads, see the Downloads page.

反馈Feedback

我们期待你的宝贵意见和建议!We’d love to hear from you! 可通过 Visual Studio for Mac IDE 右上角的“报告问题”选项报告问题。You can report a problem via the Report a Problem option in the upper right hand corner of the Visual Studio for Mac IDE itself. 可在开发人员社区门户中跟踪自己的反馈。You can track your feedback in the Developer Community portal. 如有任何建议,请通过 UserVoice 告知我们。For suggestions, let us know through UserVoice.


发布日期:2017 年 6 月 2 日 - Visual Studio for Mac 7.0.1.24Release Date: June 02, 2017 - Visual Studio for Mac 7.0.1.24

此版本修复了一些 bug 和内存泄漏问题。This release fixes a number of bugs and memory leaks.

Android SDK 管理器Android SDK Manager

  • 已修复:SDK 许可证未正确包装。Fixed: SDK License is not wrapping correctly.
  • 已修复:“取消”按钮不会将标签更改回“安装更新”。Fixed: Cancel Button does not change label back to Install Updates.
  • 已修复:卸载最新版 SDK 工具后,所有 SDK 工具都会被卸载。Fixed: On uninstalling latest build of SDK Tools, all SDK tools are uninstalled.
  • 已修复:能够在更新过程中修改组件。Fixed: Able to modify components while updates are in progress.
  • 已修复:由于权限问题,无法使用独立安装程序下载的 SDK 工具。Fixed: Cannot use downloaded SDK tools from standalone installer due to permission issues.
  • 已修复:无法安装先前删除的组件。Fixed: Not possible to install a previously removed component.
  • 已修复:SDK 工具 25.2.5 无法安装问题。Fixed: SDK Tools 25.2.5 fail to install.

其他问题Other issues

  • 已修复:使用并排显示文档窗口还原文档的问题。Fixed: Issue with restoring documents with side by side document windows.
  • 已修复:当前带 .NETStandard/new csproj 格式可移植库的上下文中不存在名称“InitializeComponent”。Fixed: The name 'InitializeComponent' does not exist in the current context with .NETStandard/new csproj format portable library.
  • 已修复:Android 部署在发布模式下无法静默。Fixed: Android deployment is failing silently in release mode.
  • 已修复:“快速修复”不执行任何操作。Fixed: Quick Fix doesn't do anything.
  • 已修复:无法在“编辑引用”对话框中移除引用。Fixed: Removing a Reference in the Edit References Dialog does not work.
  • 已修复:将 iOS Forms PCL 应用上传到“测试云”时无法生成步骤,显示“未知 MSBuild 故障”。Fixed: Uploading iOS Forms PCL app to Test Cloud fails build step with "Unknown MSBuild Failure”.
  • 已修复:无法检查 .Net core 应用程序中的变量。Fixed: Can not inspect variables in .Net core applications.
  • 已修复:所有文件中显示 F# 调试命令。Fixed: F# debugging commands show up in all files.
  • 已修复:F # Xamarin 窗体模板不还原程序包。Fixed: F# Xamarin Forms template doesn't restore packages.
  • 已修复:调试 .NET Core 应用程序期间进行线程选择时调用堆栈消失。Fixed: Call Stack disappears when a thread selection is made while debugging .NET Core application.
  • 已修复:按住 shift 键和向下键连续选择通过视区的文本。Fixed: Holding the shift and the down keys continues to select text past the viewport.
  • 已修复:还原程序包时 UI 锁定。Fixed: UI lockup while restoring packages.
  • 已修复:编辑器不呈现完整文本。Fixed: Editor doesn't render the full text.
  • 已修复:使用 Apple 事件打开文件时,解决方案加载之后文档打开的排序问题。Fixed: File open ordering issue after solution load when using Apple events to open files.
  • 已修复:重命名文件以匹配文件中删除的类名称。Fixed: Renaming a file to match class name deleted the file.
  • 已修复:FooButton_Clicked 处理程序完成不生成方法存根。Fixed: FooButton_Clicked handler completion does not generate method stub.
  • 已修复:分割屏幕会导致菜单项被禁用。Fixed: Split screen causes menu items to become disabled.

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

核心功能Core Functionality

Visual Studio for Mac 能够满足你对现代 IDE 的所有期望,包括功能完整的源代码编辑器、代码搜索和导航、功能强大的调试器、可自定义的工作区、Git 集成和丰富的扩展系统。Visual Studio for Mac has everything you would expect from a modern IDE, including a full-featured source editor, code search and navigation, a powerful debugger, a customizable workspace, Git integration, and a rich extension system.

其他功能包括:Other features include:

  • 基于 Roslyn 的 C# IntelliSense、重构、分析器和代码修复。Roslyn-based C# IntelliSense, refactoring, analyzers, and code fixes.
  • 基于 NuGet 的程序包管理。NuGet-based package management.
  • Visual Studio 兼容的项目格式。Visual Studio compatible project format.
  • MSBuild 生成引擎。MSBuild build engine.
  • 集成单元测试。Integrated unit testing.
  • 对 F# 的支持。Support for F# out-of-the-box.

.NET Core 支持.NET Core Support

.NET Core 平台用于创建在可 Windows、Linux 和 Mac 上运行的应用程序。.NET Core is a platform for creating applications that you can run on Windows, Linux, and Mac. Visual Studio for Mac 提供对加载、创建、运行和调试 .NET Core 项目的支持。Visual Studio for Mac provides you with support for loading, creating, running, and debugging .NET Core projects.

若要运行 .NET Core 项目,应该下载和安装 .NET Core SDK。In order to run .NET Core projects the .NET Core SDK should be downloaded and installed.

.NET Core 支持包括:.NET Core support includes:

  • C# 和 F# IntelliSense。C# and F# IntelliSense.
  • 控制台、库和 Web 应用程序的 .NET Core 项目模板。.NET Core project templates for console, library, and web applications.
  • 完整的调试支持,包括断点、调用堆栈、监视窗口等。Full debugging support, including breakpoints, call stack, watch window, etc.
  • NuGet PackageReferences 和基于 MSBuild 的还原。NuGet PackageReferences and MSBuild-based restore.
  • 集成单元测试支持使用 .NET Core SDK 附带的 Visual Studio 测试平台进行运行和调试测试。Integrated unit testing support for running and debugging tests with the Visual Studio Test Platform that is included with the .NET Core SDK.
  • 从旧的 project.json 格式迁移。Migration from old project.json format.

Web 工具Web Tooling

Visual Studio for Mac 添加了针对 HTML、CSS 和 JSON 文件的新的 Web 工具支持。Visual Studio for Mac adds new web tooling support for HTML, CSS and JSON files.

HTMLHTML

  • 新的 HTML 模板。New HTML template.
  • 改进的智能缩进和格式设置。Improved smart indent and formatting.
  • 改进的着色处理功能。Improved colorization.
  • 改进的 Intellisense。Improved Intellisense.
  • 代码折叠(必须启用)。Code folding (must be enabled).
  • Unminify 命令。Unminify command.
  • 改进的代码模板(片段)。Improved Code Templates (snippets).
  • 使用 <div> 环绕选定内容。Surround selection with <div>.
  • 可以将选定文本向上/向下移动的向上/向下选项。Option up/down moves selected text up/down.

CSSCSS

  • 改进的智能缩进和格式设置。Improved smart indent and formatting.
  • 改进的着色处理功能。Improved colorization.
  • 改进的 IntelliSense。Improved IntelliSense.
  • 代码折叠。Code folding.
  • 多个代码模板(片段)。Many Code Templates (snippets).
  • 可以将选定文本向上/向下移动的向上/向下选项。Option up/down moves selected text up/down.

JSONJSON

  • 有权访问 schemastore.org 的架构选择器。Schema picker with access to schemastore.org.
  • 从架构进行验证。Validation from schema.
  • 从架构进行 IntelliSense。IntelliSense from schema.
  • 改进的智能缩进和格式设置。Improved smart indent and formatting.
  • 改进的着色处理功能。Improved colorization.
  • 注释/取消注释。Comment/uncomment.
  • 引号注入和大括号匹配。Quote injection and brace matching.
  • 可以将选定文本向上/向下移动的向上/向下选项。Option up/down moves selected text up/down.

XamarinXamarin

通过对 Xamarin 的卓越支持,可以开发适用于 Android、macOS、iOS、tvOS 和 watchOS 的丰富本机体验。First-class support for Xamarin allows you to develop rich native experiences for Android, macOS, iOS, tvOS, and watchOS. 使用 Xamarin.Forms 跨平台应用程序可以在 Android、iOS 和 macOS 之间共享基于 XAML 的 UI 代码,而不会限制对本机功能的访问。Xamarin.Forms cross-platform applications help you share XAML-based UI code between Android, iOS, and macOS without limiting access to native functionality.

这包括:This includes:

  • 构建、部署、调试和分析。Building, deployment, debugging, and profiling.
  • 适用于 iOS 和 Android 的拖放式 UI 设计器。Drag-and-drop UI designers for iOS and Android.
  • Xamarin.Forms 的实时预览。Live preview for Xamarin Forms.
  • 兼容 .NET 标准的框架。.NET Standard compatible framework.
  • 对本机 API 的绑定。Bindings to native APIs.

多平台应用模板Multiplatform App Templates

现在,使用多平台 Xamarin.Forms 应用本机应用项目模板可以快速创建多平台移动应用及其云后端。The Multiplatform Xamarin.Forms App and the Native App project templates now provide you a quick way to create a multiplatform mobile app and its cloud backend.

这些模板可以创建多个项目:通过共享的项目共享代码的 Xamarin.iOS 应用项目和 Xamarin.Android 应用项目,以及实现应用后端服务的 .NET Core Web API 项目(图 1)。These templates create multiple projects: a Xamarin.iOS app project and a Xamarin.Android app project that share code via a shared project, and a .NET Core Web API project that implements a back-end service for the apps (Figure 1).

Debugging with .NET Core

*(图 1)使用 .NET Core 调试*
Debugging with .NET Core
*(Figure 1) Debugging with .NET Core*

将 ASP.NET Core Web 应用发布到 Azure 应用服务Publishing ASP.NET Core Web Apps to Azure App Services

可以将 ASP.NET Core Web 应用发布到 Azure 应用服务(图 2)。It is possible to publish your ASP.NET Core web apps to Azure App Services (Figure 2).

Publish to Azure content menu

*(图 2)发布到 Azure 内容菜单*
Publish to Azure content menu
*(Figure 2) Publish to Azure Content Menu*

若要发布 Web 应用,请在“Solution Pad”或“项目”菜单中选择“发布|发布到 Azure”命令。To publish your web app, select the Publish | Publish to Azure command from the Solution Pad or from the Project menu. 然后选择要部署到的应用服务,或者新建一个 Azure 应用服务(图 3)。Then choose the App Service you wish to deploy to, or create a new Azure App Service (Figure 3). 发布的输出将记录到“发布”输出板,并且将在项目中的“属性”>“PublishProfiles”下创建发布配置文件。Output from the publishing will be logged to a Publish output pad and a publishing profile will be created under Properties > PublishProfiles in the project.

Publish a new app service

*(图 3)发布新的应用服务*
Publish a new app service
*(Figure 3) Publish a New App Service*

在项目中定义的所有发布配置文件都将显示为“发布”菜单中的选项,所以无需再次选择“应用服务”即可对其进行部署。All publish profiles defined in the project will be shown as options within the Publish menu so that you can deploy again without having to select the App Service a second time.

多进程调试Multi-Process Debugging

项目具有“项目运行配置”,可以指定运行项目的选项和参数。Projects have Project Run Configurations which specify options and arguments for running your project. 在工具栏中的下拉列表中可以查看和更改当前活动的“运行配置”。A dropdown in the toolbar lets you view and change the current active Run Configuration.

在 Visual Studio for Mac 的“解决方案运行配置”窗口中可以同时启动多个项目。Visual Studio for Mac's Solution Run Configurations window allows multiple projects to be launched at once. 可以在“解决方案选项”对话框中创建解决方案运行配置。You can create solution run configurations in the Solution Options dialog. 调试移动应用与其后端服务的交互方式时,此功能非常有用。This is very useful for debugging how a mobile app interacts with its backend service.

TextMate 包TextMate Bundles

Visual Studio for Mac 支持 TextMate 语言包,可使用此语言包添加:Visual Studio for Mac has support for TextMate language bundles, which you can use to add:

  • 编辑器颜色主题。Editor color themes.
  • 代码片段。Code snippets.
  • 新语言的语法,启用突出显示以及基本 IntelliSense。Grammars for new languages, enabling highlighting, and basic IntelliSense.

可以在“首选项”>“文本编辑器”>“语言包”中添加 TextMate 包。You can add TextMate bundles in Preferences > Text Editor > Language Bundles.

iOSiOS

音频设备向导Audio Unit Wizard

新的音频设备扩展向导(图 4)增添了 3 个选项,可用于自定义音频设备项目模板的 plist。The new Audio Unit Extension wizard (Figure 4) adds 3 options to customize the Audio Unit project template's plist.

  • 音频设备类型Audio Unit Type
    • 乐器Instruments
    • GeneratorGenerator
    • 效果Effect
    • 音乐效果Music effect
  • 子类型代码:必须正好是 4 个字符。Subtype Code: has to be 4 characters exactly.
  • 制造商代码:必须正好是 4 个字符。Manufacturer Code: has to be 4 characters exactly.

Audio Unit Wizard

*(图 4)音频设备向导*
Audio Unit Wizard
*(Figure 4) Audio Unit Wizard*
watchOS 扩展向导watchOS Extension Wizard

在 Xcode 8.3 中,Apple 引入了 watchOS 扩展(与 iOS 扩展类似),第一个引入的是 Intents 扩展 (Siri)。In Xcode 8.3, Apple introduced watchOS extensions (similar to the iOS ones), starting with the Intents Extension (Siri).

已更新 watchOS 扩展向导(图 5)以支持 watchOS 扩展,且现提供专用的 Intents 扩展模板。The watchOS Extension wizard (Figure 5) has been updated to support watchOS extensions, and we now have a dedicated Intents Extension template.

watchOS extension wizard

*(图 5)watchOS 扩展向导*
watchOS extension wizard
*(Figure 5) watchOS Extension Wizard*
其他改进和 Bug 修复Other Improvements and Bug Fixes
  • 现可在自动完成窗口中处理 DeprecatedObsoleted 属性。We now handle Deprecated and Obsoleted attributes in autocompletion window. 这使得过时的 Xamarin.iOS 和已弃用的 API 显示为删除线。This allows Xamarin.iOS obsoleted and deprecated APIs to be shown as struck through.
  • 部署到设备时会显示进度栏。We show a progress bar when deploying to device. 此功能对 watchOS 非常有用。This is especially useful for watchOS. (需要 Xamarin.iOS 10.5.0.323+)。(Requires Xamarin.iOS 10.5.0.323+).
  • 使用 Xamarin.iOS 中已知的 OS 版本来填充部署目标下拉列表。We use known OS versions from Xamarin.iOS to populate the deployent target dropdowns.
    这样操作有两个优点:我们可以提供每个应用扩展类型的准确最低版本,并且可以避免显示 OS 版本(基于 Xcode,Xamarin.iOS 尚不支持)。Two advantages are that we can give you the exact minimum version for each App Extensions type, as well as avoid showing OS versions, based on Xcode, that Xamarin.iOS does not yet support.

Mac/iOS API 问题分析器Mac/iOS API Issue Analyzer

  • 触发分析器时修复重复的标记。Fix duplicated marker when analyzer is triggered.
  • 从属性中获取“消息”(框架中解释为什么 API 已弃用/过时的信息),并将该信息附加到不同的可用性消息。Get the "message" (piece of information in the framework explaining why the API is deprecated/obsolete) from the attribute and append that information to the different availability messages.
  • 更新所有可用性消息,以提高清晰度。Updated all availability messages to improve clarity.
  • 通过在可用性消息中使用符号名称来提高清晰度,从:Improved clarity by using the symbol's name in the availability message, changed from:
    API Usage Issue: this API requires iOS 10.0 or later
    更改为:to:
    'MyMethod' is only available on iOS 10.0 or newer

AndroidAndroid

  • 新 SDK 管理器 - Visual Studio for Mac 自带 Android SDK 管理器(图 6)。New SDK Manager - Visual Studio for Mac includes its own Android SDK manager (Figure 6).

Android SDK Manager window

*(图 6)Android SDK 管理器*
Android SDK Manager window
*(Figure 6) Android SDK Manager*
  • 现在是通过 /t:Install msbuild 目标将项目部署到设备或仿真程序。Deploying your project to device or emulator is now done via the /t:Install msbuild target. 以前,Visual Studio for Mac 使用自己的内部逻辑将应用程序部署到设备,现在则使用可从终端利用或在 Windows Visual Studio 中使用的相同公用目标。Previously Visual Studio for Mac would use its own internal logic for deploying applications to devices but now it uses same common targets that you can employ from Terminal, or that are used in Visual Studio on Windows. 这样做的好处之一是现在有更好的日志可用于诊断部署问题。One of the benefits of this is that there are now better logs available to diagnose deployment issues.

  • 新绑定项目的默认值现为 class-parseThe default for new binding projects is now class-parse. 它可以直接分析 Java 字节码而不需要 JVM。It can parse Java bytecode directly wihout the need for a JVM. 现可从包含调试符号的 Java 字节码提取参数名称。You now have the ability to extract parameter names from Java bytecode which contains debug symbols. 例如,使用 javac g 编译的字节码。For example, bytecode compiled with javac -g. class-parse 也不会“跳过”从无法解析的类型继承或者包含无法解析的类型的类。class-parse also doesn't "skip" classes which inherit from, or contain, members of unresolvable types.

可访问性Accessibility

  • 此 Visual Studio for Mac 版本包含对 Voice Over 等辅助技术的支持。This version of Visual Studio for Mac contains support for assistive technologies such as Voice Over. 通过这些技术,可访问用户界面的许多部分,例如编辑器和解决方案资源管理器。Many parts of the user interface, such as the editor and solution explorer, have been made accessible through these technologies. 但是,此功能仍在开发中,将在未来版本中实现进一步改进。However, it is still a work in progress and futher improvements will be made in future releases. 辅助功能可通过“辅助功能”首选项或通过输入以下命令行启用:The accessibility features can be enabled either through the Accessibility preferences or through the commandline by entering:

    defaults write com.microsoft.visual-studio com.monodevelop.AccessibilityEnabled 1


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

Visual Studio 2017 for Mac 版本 7.3 发布说明Visual Studio 2017 for Mac version 7.3 Release Notes

Visual Studio 2017 for Mac 版本 7.2 发布说明Visual Studio 2017 for Mac version 7.2 Release Notes

Visual Studio 2017 for Mac 版本 7.1 发布说明Visual Studio 2017 for Mac version 7.1 Release Notes


返回页首
Top of Page