您现在访问的是微软AZURE全球版技术文档网站,若需要访问由世纪互联运营的MICROSOFT AZURE中国区技术文档网站,请访问 https://docs.azure.cn.

针对 Service Fabric 网格项目优化 Visual Studio 性能Optimize Visual Studio performance for Service Fabric Mesh projects

重要

Azure Service Fabric 网格的预览已停用。The preview of Azure Service Fabric Mesh has been retired. 不允许再通过 Service Fabric 的网格 API 来进行新的部署。New deployments will no longer be permitted through the Service Fabric Mesh API. 对现有部署的支持将持续到2021年4月28日。Support for existing deployments will continue through April 28, 2021.

有关详细信息,请参阅 Azure Service Fabric 网格预览停用。For details, see Azure Service Fabric Mesh Preview Retirement.

本文展示了如何针对 Service Fabric 网格项目优化 Visual Studio 性能以便首次调试运行 (F5) 更为快速。This article shows you how to optimize Visual Studio performance for Service Fabric Mesh projects so that your first debugging run (F5) is much faster.

更改 Visual Studio 设置Change Visual Studio settings

在 Visual Studio 中的 "工具 > 选项" > Service Fabric "网格工具" " > 常规" 下,可以调整以下设置:In Visual Studio, under Tools > Options > Service Fabric Mesh Tools > General, you can adjust the following settings:

  • “在项目打开时拉取所需的 Docker 映像”可以通过在项目加载时启动映像下载过程使首次调试运行 (F5) 更为快速。Pull required Docker images on project open makes your first debugging run (F5) faster by starting the image download process while the project is loading.
  • “在项目打开时部署应用程序”可以通过在项目打开后启动部署过程使首次调试运行 (F5) 更为快速。Deploy application on project open can make your first debugging run (F5) faster by starting the deploy process once the project is opened.
  • “在项目关闭时删除应用程序”通过在项目关闭时删除网格应用回收分配给该应用的资源(CPU、RAM)。Remove application on project close reclaims resources (CPU, RAM) allocated to the app by removing the Mesh app when the project is closed.

当你在 Service Fabric 工具输出窗口中看到有消息指出 Visual Studio“正在拉取映像”、“正在预热”或“正在删除应用程序”时,说明它引用了上述设置。When you see messages in the Service Fabric Tools output window that Visual Studio is 'pulling images', 'warming up', or 'removing application', it is in reference to the settings above. 可以关闭这些设置。You can turn off these settings.

后续步骤Next steps

通读调试网格应用教程Read through the Debug a Mesh app tutorial