How to open an existing azure function in visual studio?(如何在 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 中创建新的函数应用程序时,它将生成一个 预编译 函数项目 - 一个带有 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 功能?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:如何在 Visual Studio 中打开现有的 azure 功能?
基础教程推荐
- 如果条件可以为空 2022-01-01
- C# 9 新特性——record的相关总结 2023-04-03
- 重新排序 WPF TabControl 中的选项卡 2022-01-01
- Mono https webrequest 失败并显示“身份验证或解密失败" 2022-01-01
- 在 VB6 或经典 ASP 中使用 .NET 2022-01-01
- 更新 Visual Studio 中的 DataSet 结构以匹配新的 SQL 数据库结构 2022-01-01
- 将数据集转换为列表 2022-01-01
- SonarQube C# 分析失败“不是指针的有效行偏移" 2022-01-01
- 从 C# 控制相机设备 2022-01-01
- 获取C#保存对话框的文件路径 2022-01-01
