VS 2017中禁用了Compute Engine选项 [英] Compute Engine option is disabled in VS 2017

查看:66
本文介绍了VS 2017中禁用了Compute Engine选项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图在Windows 7 x64上的Visual Studio 2017中使用"Google Cloud Platform上的ASP.NET"模板创建一个简单的.NET Core 2 Web API. 我正在遵循此快速入门指南- https://cloud.google.com/tools /visual-studio/docs/quickstart

I was trying to create a simple .NET Core 2 Web API using "ASP.NET on Google Cloud Platform" template in Visual Studio 2017 on Windows 7 x64. I am following this Quickstart guide - https://cloud.google.com/tools/visual-studio/docs/quickstart

在步骤12中,当我尝试使用发布到Google Cloud ..."进行发布时,计算引擎"选项被禁用.

On step 12 when I was trying to Publish using "Publish to Google Cloud..." the option "Compute Engine" was disabled.

我可以在"Google Compute Engine"下的"Google Cloud Explorer"窗口中看到虚拟机.

I can see the VM listed in "Google Cloud Explorer" window under "Google Compute Engine".

也在appsettings.json中,我可以看到Google.ProjectId正确设置为Project name. 我已经删除并重新创建了VM,但无济于事.

Also in appsettings.json I can see the Google.ProjectId correctly set to Project name. I have already deleted and recreated the VM once to no avail.

如何启用计算引擎"选项?

How do I get "Compute Engine" option enabled?

推荐答案

正如@jonskeet所说,您可能无法将项目部署到Compute Engine,因为您要部署的项目针对的是.Net Core. 我意识到您所遵循的步骤告诉您创建一个.Net Core项目,然后将其部署到VM中,这是不对的,我们将对其进行更改.

As @jonskeet said, you probably can't deploy your project to Compute Engine because the project you are trying to deploy is targeting .Net Core. I realize that the steps you were following are telling you to create a .Net Core project and then deploy it to the VM, that's not right, and we'll change it.

创建一个选择.Net Framework而不是.Net Core的新项目,您应该可以将其部署到VM.

Create a new project selecting .Net Framework instead of .Net Core and you should be able to deploy it to the VM.

下面的图像将是执行创建Asp.Net项目

更新:

截至2018年3月,无法通过Google Cloud Visual Studio扩展在Compute Engine中发布.NET Core应用程序不是一个错误,它正在按预期运行.使用扩展名,您可以将.NET Framework应用程序发布到Compute Engine,将.NET Core应用程序发布到App Engine Flex和容器引擎.您可以在此处看到.

As of March 2018 not being able to publish .NET Core applications in Compute Engine through Google Cloud Visual Studio Extension is not a bug, it is working as intended. Using the extension, you can publish .NET Framework applications to Compute Engine and .NET Core applications to App Engine Flex and to Container Engine. You can see here.

什么是错误,在创建Asp.Net项目"的第7步中使用的图像您正在关注的/docs/quickstart"rel =" nofollow noreferrer>快速入门,因为它显示了创建要在GCE中发布的.NET Core定位应用程序.该问题已经解决.

What is a bug is the image used on Step 7 of Create an Asp.Net project on the Quickstart you were following, since it is showing the creation of a .NET Core targetting application for publication in GCE. That is already being fixed.

如果您想使用Google Cloud Visual Studio扩展程序将.NET Core应用程序部署到App Engine,则可以遵循其他

If you want to deploy a .NET Core application to App Engine using the Google Cloud Visual Studio Extension you can follow this other Quickstart.

这篇关于VS 2017中禁用了Compute Engine选项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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