简体   繁体   English

如何在 Visual Studio 中打开现有的 azure 函数?

[英]How to open an existing azure function in visual studio?

I'm pretty new to Azure and using the portal, wrote an Azure Function.我对 Azure 还很陌生,使用门户网站编写了一个 Azure 函数。 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.现在我想继续使用 Visual Studio 2017 处理它。不过,我似乎找不到在 Visual Studio 中打开/编辑此现有函数的方法。

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 函数、复制代码、设置/连接到存储等,然后部署一个新实例并删除当前实例,但我想避免这种情况。

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.理想情况下,希望在 VS 中有某种打开/连接到 Azure 帐户的功能,或者可能是门户中的“在 VS 中编辑”按钮等。

TIA!蒂亚!

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:好吧,尽可能接近该门户,即您的 Function App,然后单击“ Download app content按钮并询问 Visual Studio 解决方案:

下载应用内容

使用 Visual Studio 项目

This will give you a zip file with Functions, including csproj file.这将为您提供一个带有函数的 zip 文件,包括csproj文件。

The problem is that portal functions are C# scripts ( csx files), and Visual Studio isn't great to work with them.问题在于门户函数是 C# 脚本( csx文件),Visual Studio 不适合使用它们。 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.当你在 Visual Studio 2017 中创建一个新的 Function App 时,它会生成一个预编译的函数项目——一个带有cs文件的普通类库。

Unfortunately, there is no automated way to convert script functions to precompiled ones.不幸的是,没有将脚本函数转换为预编译函数的自动化方法。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在 HTTPS 上的 Visual Studio 中本地运行 Azure 函数? - How to run Azure Function locally within Visual Studio on HTTPS? 如何使用Visual Studio在本地调试Azure函数? - How do I debug an Azure Function locally with Visual Studio? 如何在Visual Studio for Mac中打开一个预先存在的.NET Core应用程序? - How do I open a pre-existing .NET Core application in Visual Studio for Mac? Visual Studio中Azure功能中的实体框架 - Entity Framework in Azure Function in Visual Studio 将Azure功能从门户导入Visual Studio - Import Azure Function from portal into Visual Studio 在Visual Studio 2017中架构和管理Azure功能 - Architecture and manage azure function in Visual Studio 2017 无法使用 Visual Studio 2017 调试 Azure 函数 - Cannot debug Azure Function with Visual Studio 2017 如何使用Azure Function CLI的--usehttps(运行主机选项),但使用Visual Studio Tooling for Azure Functions - How to use Azure Function CLI's --usehttps (run host option) but from Visual Studio Tooling for Azure Functions 如何在Visual Studio中创建一个已经存在的数据库? - How to create an already existing database in Visual Studio? 如何为现有的Unity项目设置Visual Studio? - How to setup Visual Studio for existing Unity project?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM