Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/334.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 如何从azure函数中引用Cosmos表API?_C#_Azure_Csx - Fatal编程技术网

C# 如何从azure函数中引用Cosmos表API?

C# 如何从azure函数中引用Cosmos表API?,c#,azure,csx,C#,Azure,Csx,我正试图在azure门户中编译一个用C#script编写的项目(无法让任何其他环境工作) 我试图在函数中引用cosmos表API: #r "Newtonsoft.Json" #r "Microsoft.WindowsAzure.Storage" #r "Microsoft.Azure.WebJobs" #r "Microsoft.Azure.WebJobs.Extensions" #r "Microsoft.Azure.WebJobs.Extensions.Storage" #r "Micros

我正试图在azure门户中编译一个用C#script编写的项目(无法让任何其他环境工作)

我试图在函数中引用cosmos表API:

#r "Newtonsoft.Json"
#r "Microsoft.WindowsAzure.Storage"
#r "Microsoft.Azure.WebJobs"
#r "Microsoft.Azure.WebJobs.Extensions"
#r "Microsoft.Azure.WebJobs.Extensions.Storage"
#r "Microsoft.Azure.Cosmos.Table"

using System;
using System.Threading.Tasks;
using Newtonsoft.Json;
using Microsoft.WindowsAzure.Storage;
using Microsoft.WindowsAzure.Storage.Table;
using Microsoft.Azure.WebJobs;
using Microsoft.Azure.WebJobs.Host.Bindings.Runtime;
using Microsoft.Azure.Cosmos.Table;
但它给了我以下错误:

[Error] run.csx(6,1): error CS0006: Metadata file 'Microsoft.Azure.Cosmos.Table' could not be found
2019-09-26T13:50:37.115 [Error] run.csx(14,23): error CS0234: The type or namespace name 'Cosmos' does not exist in the namespace 'Microsoft.Azure' (are you missing an assembly reference?)

如何使azure函数找到引用?

azure函数中不包含此命名空间。您需要自己将dll文件添加到Azure函数应用程序。有关详细步骤,请参阅