无法将文件添加到Blob触发Azure功能而不会使其消失在门户中 [英] Can’t Add a File to Blob trigger Azure Function Without Making it Disappear in Portal

查看:88
本文介绍了无法将文件添加到Blob触发Azure功能而不会使其消失在门户中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想将文件添加到我的Blob触发器Azure函数中,但是当我这样做时,该文件将从门户中消失.

重现问题的方法如下:
创建一个Function App并添加作为Blob触发器的Azure Function.您可以保留名称和详细信息为默认值.然后将任何文件添加到该Azure函数.我所有的测试都表明新文件的名称和内容似乎无关紧要.亲身, 我想添加一个"function.proj"文件.刷新后,您应该会看到Function应用程序仍然存在,但是Azure Function Blob触发器突然不存在.

当我进入Kudu控制台并查看我的Function应用程序时,我看到我的Blob触发器Azure函数仍然存在,包括我添加的新文件. Azure函数仍然存在并且仍然可以运行.据我所知,它是功能齐全的.如果我尝试 删除新文件后,Azure功能会再次出现在门户中,但现在它已损坏.这是我看到的错误:

I want to add a file to my Blob trigger Azure Function, but when I do, it disappears from the portal.

Here’s how to recreate the problem:
Create a Function App and add an Azure Function that is a Blob trigger. You can leave the name and details as defaults. Then add any file to that Azure Function. All of my testing shows that the name and contents of the new file don't seem to matter. Personally, I want to add a "function.proj" file. After refreshing, you should see your Function app still there but the Azure Function Blob trigger is suddenly absent.

When I go to the Kudu console and look at my Function app, I see that my Blob trigger Azure Function is still there including the new file I added. The Azure function still exists and is still able to run. As far as I can tell it is fully functional. If I try deleting the new file, the Azure Function reappears in the portal but now it is broken. Here is the error I see:

错误:

Error:

函数(BlobTriggerCSharp2)错误:无法确定主要功能脚本.尝试将入口点脚本重命名为运行"(或索引") (对于Node),也可以通过在函数元数据中添加'scriptFile'属性来显式指定入口点脚本的名称.

Function (BlobTriggerCSharp2) Error: Unable to determine the primary function script. Try renaming your entry point script to 'run' (or 'index' in the case of Node), or alternatively you can specify the name of the entry point script explicitly by adding a 'scriptFile' property to your function metadata.

会话ID:c6f205257e2547c1847e34da8a1dc7bc

时间戳:2018-10-10T18:31:50.414Z

现在我的功能将无法运行.我尝试通过重命名主文件"BlobTriggerCSharp.csx"来跟踪错误.到"run.csx"但没有任何变化.即使这样做,也无法解决我的问题,因为我想向Azure函数添加文件.

奇怪的是,当我尝试添加新文件时,队列触发器Azure功能没有此问题.

总结一下:我想向我的Blob触发器Azure函数中添加一个文件,但是当我这样做时它会消失在门户中.

Now my function won't run. I have tried following the error by renaming my main file "BlobTriggerCSharp.csx" to "run.csx" but nothing changes. Even if it did that would not solve my problem because I want to add a file to my Azure Function.

Strangely I don't have this problem for a Queue trigger Azure Function when I try adding a new file.

To summarize: I want to add a file to my Blob trigger Azure Function but it disappears in the portal when I do that.


这仅在C#,Blob触发器,运行时2.x​​中的Azure函数中发生

This is only happening for C#, Blob trigger, Azure Functions in run-time 2.x

这是指向github https://github.com/Azure/azure-functions-ux/issues/3289

EDIT 2: Here is a link to the issue on github https://github.com/Azure/azure-functions-ux/issues/3289

推荐答案

文件名必须始终为run.csx.另外,请确保在同一目录中有一个function.json文件.假设满足了这些约束,是否可以通过重新启动功能应用程序来解决问题?
The file name must always be run.csx. Also, make sure there is a function.json file in the same directory. Assuming that these constraints are satisfied, is it possible to resolve the problem by restarting your function app?


这篇关于无法将文件添加到Blob触发Azure功能而不会使其消失在门户中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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