如何在Visual Studio中打开现有的Azure功能? [英] How to open an existing azure function in visual studio?

查看:131
本文介绍了如何在Visual Studio中打开现有的Azure功能?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对Azure很陌生,并且使用门户网站编写了Azure功能.现在,我想继续使用Visual Studio 2017对其进行操作.尽管如此,我似乎找不到在Visual Studio中打开/编辑此现有功能的方法.

I'm pretty new to Azure and using the portal, wrote an Azure Function. Now I would like to continue working on it using Visual Studio 2017. I can't seem to find a way to open/edit this existing function in Visual Studio though.

我确定我可以在VS中创建一个新的Azure函数,复制代码,设置/连接到存储等,并部署一个新实例并删除当前实例,但是想避免这种情况.

I'm sure I could create a new Azure Function in VS, copy code over, setup/connect to storage, etc. and deploy a new instance and delete the current instance, but would like to avoid that.

理想情况是,希望在VS中打开/​​连接到Azure帐户,或者门户中的在VS中编辑"按钮等.

Ideally, was hoping there was some kind of open/connect to Azure account in VS, or maybe an "edit in VS" button in the portal, etc.

TIA!

推荐答案

好吧,尽可能接近该门户是您的Function App门户,然后单击Download app content按钮并要求Visual Studio解决方案:

Well, as close as you can get to that is to go to the portal, your Function App, then click Download app content button and ask for Visual Studio solution:

这将为您提供一个包含功能的zip文件,包括csproj文件.

This will give you a zip file with Functions, including csproj file.

问题在于门户网站功能是C#脚本(csx文件),而Visual Studio不适用于它们.当您在Visual Studio 2017中创建新的Function App时,它将创建一个预编译的功能项目-具有cs文件的普通类库.

The problem is that portal functions are C# scripts (csx files), and Visual Studio isn't great to work with them. When you create a new Function App in Visual Studio 2017, it will make a precompiled function project - a normal class library with cs files.

不幸的是,没有自动的方法可以将脚本功能转换为预编译的功能.

Unfortunately, there is no automated way to convert script functions to precompiled ones.

这篇关于如何在Visual Studio中打开现有的Azure功能?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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