Visual Studio 2017无法识别类型为.sfproj的项目 [英] Visual studio 2017 is not recognizing project of type .sfproj

查看:93
本文介绍了Visual Studio 2017无法识别类型为.sfproj的项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试打开使用 Visual Studio 2017 从源代码中首次下载的解决方案.我收到一个错误:

I'm trying to open a solution that I downloaded from a source code for the first time using Visual Studio 2017. I got an error:

此版本的Visual Studio无法打开以下项目.项目类型可能未安装,或者……等等等等.

This version of visual studio is unable to open the following projects. The project types may not be installed or the … blah blah.

我发现VS抱怨的项目类型是 .sfproj 类型,我发现这意味着** Azure Service Fabric **.

I figured out that the type of project VS is complaining about is of type .sfproj, which I found out is means **Azure Service Fabric **.

如文档所述,我已经安装了最新版本的Azure Service Fabric SDK ,但是仍然出现错误.
同样,当我进入菜单->文件->新建-> Projec 时,我没有看到任何Azure Fabric Service作为模板.

I've installed the latest version of Azure Service Fabric SDK, as the documentation says, but I'm still getting the error.
Also when I go to Menu -> file -> New -> Projec, I don't see any Azure Fabric Service as template.

如何使Visual Studio识别Azure Service Fabric类型?除了安装SDK之外,我还需要做更多的事情吗?

How to make visual studio recognize the type Azure Service Fabric? Is there more I need to do besides merely installing the SDK?

感谢您的帮助

推荐答案

之所以会发生这种情况,是因为您尚未安装Visual Studio的Service Fabric工具.

This happens because you haven't installed the Service Fabric Tools for Visual Studio.

要设置开发环境以运行Service Fabric项目,您需要三件事:

To setup a development environment to run Service Fabric projects you required 3 things:

  1. Service Fabric SDK
  2. Service Fabric运行时(随SDK一起安装)
  3. 用于Visual Studio的服务结构工具

根据Visual Studio的版本,您将以其他方式安装它们:

Depending on the version of your visual studio you will install them in a different way:

对于 Visual Studio 2015 ,您可以使用 Web平台安装程序 安装所有3个项目. 只需打开WPI并搜索 Azure Service Fabric SDK和工具v--(VS2015) ,完成设置后,只需重新启动计算机即可.

For Visual Studio 2015 you can install all 3 items using the Web Platform Installer. Just open the WPI and search for Azure Service Fabric SDK and Tools v-- (VS2015), once the setup is completed just restart the computer and it's all done.

对于 Visual Studio 2017 及更高版本,此过程已更改为更轻松",但有点棘手,在VS2017上,该工具随VS Installer一起安装:

For Visual Studio 2017 and later, this is process has changed to be 'easier' but is a bit tricky, on VS2017 the Tools are installed with the VS Installer:

  • 打开Visual Studio
  • 工具(在顶部栏菜单上)
  • 获取工具和功能(安装程序将打开以修改VS功能)
  • 天蓝色开发
  • 选择' 服务结构 '
  • 确认更改和设置.

完成后,您必须继续进行Web Platform Installer并安装SDK,最后是一个不包含(SD2015)的SDK.设置完成后,重新启动计算机即可.

Once completed, you have to go on Web Platform Installer and Setup the SDK, the one that does not contain (VS2015) at the end. After setup is completed, restart the computer and it is done.

在两种情况下,它将设置最新版本的SF,如果您需要较旧的版本,则将面临一些挑战.

In both cases, it will setup the latest version of SF, if you require an older version, you will face some challenges.

VS2017方法的问题在于,您无法选择所需的版本,因此很可能最终会获得最新版本,从而迫使您更新项目文件.

The problem with VS2017 approach is that you can't select the version you want, so is very likely you will end-up with the most recent version, forcing you to update the project file.

对于VS2015,您可以选择版本,首先,您需要发现项目所需的版本,为此,大多数情况下打开原始.sfproj文件并找到元素'ProjectVersion'您需要升级项目版本(在安装工具的新版本时自动完成)或降低sfproj的等级以使用旧工具打开.

For VS2015 you can chose the version, first you need to discover the version your project need, for this, open the raw .sfproj file and find the element 'ProjectVersion', most of the times you need to upgrade the project version(done automaticaly when you install a newer version of the tools) or down grade the sfproj to open with older tools.

要下载工具安装程序,请转到Service Fabric 博客并找到以下版本的发行说明:所需的版本,然后查找链接以下载"Visual Studio 2015 Service Fabric工具" .这不适用于VS2017.

To download the tools installer, go to the Service Fabric blog and find the release notes for the version you want and then look for the links to download 'Visual Studio 2015 Tool for Service Fabric'. This does not work with VS2017.

有关更多信息,请参见文档中的更多详细信息: https://docs.microsoft.com/en -us/azure/service-fabric/service-fabric-get-started

For more information, please see more details on the documentation: https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-get-started

这篇关于Visual Studio 2017无法识别类型为.sfproj的项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆