Quantcast
Channel: Active questions tagged nuget-package - Stack Overflow
Viewing all articles
Browse latest Browse all 3183

Could not load file or assembly ‘Microsoft.IdentityModel.Abstractions, Version=6.35.0.0. Nuget version mismatch Microsoft.IdentityModel.Abstractions

$
0
0

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 -

<ItemGroup><PackageReference Include="Microsoft.Graph"><Version>5.67.0</Version></PackageReference><PackageReference Include="Microsoft.Identity.Client"><Version>4.66.2</Version></PackageReference><PackageReference Include="Microsoft.Windows.Compatibility"><Version>9.0.0</Version></PackageReference><PackageReference Include="Newtonsoft.Json"><Version>13.0.1</Version></PackageReference><PackageReference Include="Std.UriTemplate" Version="2.0.1.0" /><PackageReference Include="Microsoft.CSharp"><Version>4.7.0</Version></PackageReference></ItemGroup>

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 -

"Microsoft.Graph/5.67.0": {"type": "package","dependencies": {"Microsoft.Graph.Core": "3.2.1"        },"Microsoft.Graph.Core/3.2.1": {"type": "package","dependencies": {"Microsoft.IdentityModel.Protocols.OpenIdConnect": "8.2.0","Microsoft.IdentityModel.Validators": "8.2.0","Microsoft.Kiota.Abstractions": "1.15.2","Microsoft.Kiota.Authentication.Azure": "1.15.2","Microsoft.Kiota.Http.HttpClientLibrary": "1.15.2","Microsoft.Kiota.Serialization.Form": "1.14.0","Microsoft.Kiota.Serialization.Json": "1.15.2","Microsoft.Kiota.Serialization.Multipart": "1.14.0","Microsoft.Kiota.Serialization.Text": "1.14.0","System.Net.Http.WinHttpHandler": "6.0.0"        },"Microsoft.Identity.Client/4.66.2": {"type": "package","dependencies": {"Microsoft.IdentityModel.Abstractions": "6.35.0","System.Diagnostics.DiagnosticSource": "6.0.1"        },

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.Please advise me how to fix this error

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.Please advise me how to fix this error


Viewing all articles
Browse latest Browse all 3183

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>