c# - Azure Function App - 引用外部库

标签 c# azure azure-functions

我在使用 C# 脚本编写的 Azure 门户功能应用程序中遇到错误。

错误CS0103:名称“ZipFile”在当前上下文中不存在

我尝试使用 nuget.exe 安装 System.IO.Compression.FileSystem.dll,但我也无法添加该包。错误如下。

D:\home\site\wwwroot 找不到包 'System.IO.Compression.FileSystem.dll'

请帮助我。

谢谢。

最佳答案

添加程序集并导入命名空间,如下所示。它在我这边有效。

#r "System.IO.Compression.FileSystem"

using System.IO.Compression;

关于c# - Azure Function App - 引用外部库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50442673/

相关文章:

c# - 获取字符串数组中匹配元素的所有索引

c# - FlagsAttribute 枚举问题

azure - 4 SSL 证书文件 : what are the differences betwen them? 我应该使用哪一个?

.net - 如何检查用.NET编写的Azure函数的日志和使用情况(CPU/RAM/DB)?

azure - 如何在 Azure Functions 中禁用 Application Insights

c# - 以编程方式启用(安装)IIS

C# 迁移到 Java,只需要知道一些事情

azure - Azure Devops Pipelines 中的循环和数组

python - Azure Python SDK 获取使用详细信息-UsageDetailsOperations 类

function - Azure功能应用程序日志不显示