我是 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 中创建新的函数应用程序时,它将生成一个 预编译 函数项目 - 一个带有 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 功能?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!