-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Could not load file or assembly ‘Microsoft.IdentityModel.Abstractions, Version=6.35.0.0. Nuget version mismatch Microsoft.IdentityModel.Abstractions #110865
Comments
Tagging subscribers to this area: @dotnet/area-infrastructure-libraries |
NuGet versioning and assembly versioning are different systems. .NET Framework requires exact assembly version match. You need to ensure binding redirect is properly generated for the entry application. |
@huoyaoyuan , can you please tell me how to check if binding redirects are properly generated. |
For your entry exe application, the ApplicationName.exe.config file should contain If you are using the old .NET Framework project, you need to manually enable the auto generation following the documentation by setting |
@huoyaoyuan , And below is the dll.config file -
It is referring to the latest version of "Microsoft.IdentityModel.Abstractions" version 8.2.0.0 but Microsoft.Identity.Client v4.66.2.0 is referring to version 6.35.0. And I am still getting the error |
I am developing a C# dll based on .NET framework 4.8.2 which will use Microsoft Graph API to send email through outlook.
For this I have added the latest Nuget packages for “Microsoft.Graph” v5.67.0 and "Microsoft.Identity.Client" v4.66.2 . This is my csproj -
The build is successfull but I am getting this runtime error -
### System.IO.FileLoadException: Could not load file or assembly ‘Microsoft.IdentityModel.Abstractions, Version=6.35.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35’ or one of its dependencies. The located assembly’s manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
File name: ‘Microsoft.IdentityModel.Abstractions, Version=6.35.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35’
Now, “Microsoft.Graph” v5.67.0 is dependent upon latest 'Microsoft.IdentityModel.Abstractions, Version=8.2.0.0 but I am not able to figure out which module is dependent upon 6.35.0.0.
Upon further looking, it is found out that, in obj/project.asset.json file there is a mismatch between 'Microsoft.IdentityModel components. “Microsoft.Graph.Core/3.2.1” is referring to “Microsoft.IdentityModel.Validators”: “8.2.0” but "Microsoft.Identity.Client/4.66.2"is referring to old 6.35.0 version.
Here is the obj/project.asset.json file -
In Microsoft.Identity.Client/4.66.2 release note it is mentioned that it will work with “Microsoft.IdentityModel.Abstractions” >= 6.35.0 but in reality it is not.
app.config -
packages.config -
csproj -
Please advise me how to fix this error
The text was updated successfully, but these errors were encountered: