简体   繁体   English

Azure Function异常无法加载ActiveDirectory文件或程序集

[英]Azure Function exception could not load ActiveDirectory file or assembly

I am trying to write an azure timer function that writes files to Azure Datalake, but when I am adding the needed nuGet packages I am getting an error when I start the host 我正在尝试编写一个将文件写入Azure Datalake的Azure计时器函数,但是当我添加所需的nuGet程序包时,启动主机时出现错误

The error is as follows 错误如下

[21/5/2018 8:36:20 AM] Executed 'NWPimFeederFromAws' (Failed, Id=03395101-41a5-44ef-96d8-f69c5d73eca7)
[21/5/2018 8:36:20 AM] System.Private.CoreLib: Exception while executing function: NWPimFeederFromAws. NWPimFeeder: Could not load file or assembly 'Microsoft.IdentityModel.Clients.ActiveDirectory, Version=3.19.5.13701, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. Could not find or load a specific file. (Exception from HRESULT: 0x80131621). System.Private.CoreLib: Could not load file or assembly 'Microsoft.IdentityModel.Clients.ActiveDirectory, Version=3.19.5.13701, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.

The using statements in my class looks as follows 我的课程中的using语句如下所示

using System;
using Microsoft.Azure.WebJobs;
using Microsoft.Azure.WebJobs.Host;
using Amazon;
using Amazon.S3;
using Amazon.S3.Model;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Azure.Management.DataLake.Store;
using Microsoft.IdentityModel.Clients.ActiveDirectory;
using Microsoft.Rest.Azure.Authentication;

I am unable to find why this is occurring, any pointers appreciated 我无法找到为什么会发生这种情况,任何指针表示赞赏

Version of my host is as follows 我的主机的版本如下

Hosting environment: Production
Content root path: C:\Users\MattDouhan\source\repos\NWPimFeeder\NWPimFeeder\bin\Debug\netstandard2.0
Now listening on: http://localhost:7071
Application started. Press Ctrl+C to shut down.
[21/5/2018 8:36:17 AM] Reading host configuration file 'C:\Users\MattDouhan\source\repos\NWPimFeeder\NWPimFeeder\bin\Debug\netstandard2.0\host.json'
[21/5/2018 8:36:17 AM] Host configuration file read:
[21/5/2018 8:36:17 AM] {}
[21/5/2018 8:36:17 AM] Starting Host (HostId=desktop7cks1do-1525525221, InstanceId=8ef074ac-f031-4591-983d-d590041bd1c9, Version=2.0.11651.0, ProcessId=7060, AppDomainId=1, Debug=False, ConsecutiveErrors=0, StartupCount=1, FunctionsExtensionVersion=)

It seems caused by library bug. 似乎是由库错误引起的。

You could downgrade version of Microsoft.IdentityModel.Clients.ActiveDirectory to 3.14.0. 您可以将Microsoft.IdentityModel.Clients.ActiveDirectory版本降级到3.14.0。

This is a similar issue, you could refer to it. 是一个类似的问题,您可以参考它。

暂无
暂无

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

相关问题 无法加载文件或程序集“Microsoft.Azure.ActiveDirectory.Client.Framework”或其依赖项之一 - Could not load file or assembly 'Microsoft.Azure.ActiveDirectory.Client.Framework' or one of its dependencies Azure功能“无法加载文件或程序集” - Azure Function “Could not load file or assembly” 无法加载文件或程序集“ Microsoft.IdentityModel.Clients.ActiveDirectory.Platform” - Could not load file or assembly 'Microsoft.IdentityModel.Clients.ActiveDirectory.Platform' 无法加载文件或程序集“Microsoft.IdentityModel.Clients.ActiveDirectory” - Could not load file or assembly 'Microsoft.IdentityModel.Clients.ActiveDirectory' Azure Function:未处理的异常:System.IO.FileLoadException:无法加载文件或程序集 - Azure Function : Unhandled Exception: System.IO.FileLoadException: Could not load file or assembly 无法加载文件或程序集异常 - Could not load file or assembly exception Azure Function:无法加载文件或程序集 Newtonsoft.Json - Azure Function: Could not load file or assembly Newtonsoft.Json 调用 GetAzureADAppOnlyAuthenticatedContext 时无法加载文件或程序集“Microsoft.IdentityModel.Clients.ActiveDirectory” - Could not load file or assembly 'Microsoft.IdentityModel.Clients.ActiveDirectory when calling GetAzureADAppOnlyAuthenticatedContext 如何修复无法加载文件或程序集异常? - How to fix could not load file or assembly exception? 无法加载文件或程序集... Windows Azure 网站 - Could not load file or assembly… Windows Azure Website
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM