[英]How to use #load in scriptcs for an Azure function
I downloaded the code of an Azure Function created in the portal. 我下载了在门户中创建的Azure功能的代码。 Now I'm tryng to load a class in the main file (run.csx) using in the first line:
现在,我尝试在第一行中使用以下方法在主文件(run.csx)中加载类:
#load "..\shared\data.csx"
but i get the error: 但是我得到了错误:
"run.csx(1,7): error CS1504: Source file '..\shared\data.csx' could not be opened -- Could not find file."
I added in the host.json: 我在host.json中添加了:
"watchDirectories": [ "Shared" ]
I tried with uppercase, lowcase, put the class in the same folder of the run.csx but it doesn't work. 我尝试使用大写,小写字母,将类放在run.csx的同一文件夹中,但是它不起作用。 I miss something?
我想念什么吗?
Double check that your "Shared" folder is under D:\\home\\site\\wwwroot\\Shared
. 仔细检查您的“共享”文件夹是否位于
D:\\home\\site\\wwwroot\\Shared
。 Note that the root of your function app is at D:\\home\\site\\wwwroot
. 请注意,功能应用程序的根目录位于
D:\\home\\site\\wwwroot
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.