-
Notifications
You must be signed in to change notification settings - Fork 252
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
Graph SDK v5 referring to Microsoft.Kiota.Abstractions, Version=1.2.1.0 #2177
Comments
Thanks for raising this @kyzhangZao Any chance you can confirm the version of the SDK you are using as well as the dotnet runtime as well when you experience this? |
We're using .NET Framework 4.7.2 |
MSGraph 5.30.0 depends on graph core 3.X which at the time of the issue resolved to 3.0.11. We've just released graph 5.31.0 and graph core 3.1.0 which aligns all dependencies. Would you mind trying with those new versions? Also do you have any other kiota client in your code base? |
We do not have any explicit reference to kiota client. Per my understanding, we just introduced this when try to use newer version of graph sdk.
While when I try to explicitly adding dependency of Microsoft.Kiota.Abstractions, Version=1.3.1.0 to our unit test (which I suppose we should not directly adding that dependency), gets the below error
|
Is it possible you have multiple references to graph or graph core in your project structure? |
Can you run the dotnet list package command to try to understand which dependency is bringing the older version of abstractions? |
Thanks for the additional information:
|
I'm experiencing the same issue and have cleared nuget cache, the issue still exists |
@A-Lynch are you also developing an application using .net framework (4.X)? or are you on dotnet core? (5/6/7) |
Hi 4.8 |
thanks for the additional information. And are you using the dotnet cli to build or visual studio? |
Visual studio
Sent from Outlook for Android<https://aka.ms/AAb9ysg>
…________________________________
From: Vincent Biret ***@***.***>
Sent: Wednesday, October 25, 2023 5:41:49 PM
To: microsoftgraph/msgraph-sdk-dotnet ***@***.***>
Cc: A-Lynch ***@***.***>; Mention ***@***.***>
Subject: Re: [microsoftgraph/msgraph-sdk-dotnet] Graph SDK v5 referring to Microsoft.Kiota.Abstractions, Version=1.2.1.0 (Issue #2177)
thanks for the additional information. And are you using the dotnet cli to build or visual studio?
—
Reply to this email directly, view it on GitHub<#2177 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AELHPW5L57ENPWMTZDUUW2TYBE6M3AVCNFSM6AAAAAA6MJZUMWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONZZGY3DINRWGA>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
@A-Lynch @kyzhangZao Any chance you are able to replicate the issue with the latest release?https://www.nuget.org/packages/Microsoft.Graph/5.32.0 |
Hi Ive updated, however I now have an issue with Azure Core Tried the usual - Clean, Delete obj & bin folders TypeInitializationException: The type initializer for 'Azure.Core.ClientOptions' threw an exception. FileNotFoundException: Could not load file or assembly 'System.Memory, Version=4.0.1.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. The system cannot find the file specified. |
I tried the same, also tried to use graph 5.32.0, still seeing
|
Sorry Further testing has reviled an issue with Microsoft.Identity.Client 4.57 is installed as part of adding package, yet it references Microsoft.Identity.Client 4.56 === Pre-bind state information === |
@baywet I tried to ask my teammates to run on their end as you suggested offline, but they're getting the same exception as the ones on my end. |
Thanks everyone for the additional information. |
Hi Im using Microsoft Visual Studio Professional 2022 (64-bit) - Current |
Thanks for the additional information. |
@A-Lynch as a recap from the internal discussions: the problem was solved for the internal service by switching to CPM which helps resolve any conflict. |
Hi @baywet , just to provide an update there, using CPM tool as mentioned above actually removed some of our setup configs. Ans when I try to add back those config, new conflicts showed up.
I'm currently on sdk 5.34.0 |
For everybody else involved: we're working with the dotnet team to understand whether or not CPM can be used in combination with assembly binding redirection. Also to understand whether CPM can be used for some projects and not others. |
@baywet , I'm experiencing similar issues with kiota packages and Graph. What's the outcome for this? Found conflicts between different versions of "Microsoft.Kiota.Abstractions" that could not be resolved. |
Thanks for the nudge here. The gist of the conversation was that CPM and assembly binding redirections can be used in combination, but it's easy to get things wrong. To investigate which project pulls what (at dev time), make heavy use of the new On our side we've taken a few steps to make this easier:
Start by making sure you're on the latest version of the Graph SDK, and that you don't have any direct dependency on outdated graph core/kiota dependencies. And investigate further with dotnet nuget why if needed. Let us know if you have any additional comments or questions. |
Thanks Vincent, I’ll have a look into this.
I sometimes feel like we are back in dll-hell from the nineties… 😉
|
Hi Vincent,
I’m totally missing out on something here.
When I build a project (COMplanEF.vbroj) I get warnings about kiota packages:
41>------ Rebuild All started: Project: COMplanEF, Configuration: Debug x86 ------
41>C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(2412,5): warning MSB3277: Found conflicts between different versions of "Microsoft.Kiota.Abstractions" that could not be resolved.
41>C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(2412,5): warning MSB3277: There was a conflict between "Microsoft.Kiota.Abstractions, Version=1.13.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" and "Microsoft.Kiota.Abstractions, Version=1.14.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35".
41>C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(2412,5): warning MSB3277: "Microsoft.Kiota.Abstractions, Version=1.13.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" was chosen because it was primary and "Microsoft.Kiota.Abstractions, Version=1.14.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" was not.
41>C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(2412,5): warning MSB3277: References which depend on "Microsoft.Kiota.Abstractions, Version=1.13.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" [C:\Users\WilldeHaan\.nuget\packages\microsoft.kiota.abstractions\1.13.0\lib\netstandard2.0\Microsoft.Kiota.Abstractions.dll].
41>C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(2412,5): warning MSB3277: C:\Users\WilldeHaan\.nuget\packages\microsoft.kiota.abstractions\1.13.0\lib\netstandard2.0\Microsoft.Kiota.Abstractions.dll
41>C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(2412,5): warning MSB3277: Project file item includes which caused reference "C:\Users\WilldeHaan\.nuget\packages\microsoft.kiota.abstractions\1.13.0\lib\netstandard2.0\Microsoft.Kiota.Abstractions.dll".
So I run nuget why against the project’s assets file:
PS C:\Users\WilldeHaan\Source\Repos\PLANproducten501\COMplanEF\obj> dotnet nuget why project.assets.json Microsoft.Kiota.Abstractions
Project 'COMplanEF' does not have a dependency on 'Microsoft.Kiota.Abstractions'.
PS C:\Users\WilldeHaan\Source\Repos\PLANproducten501\COMplanEF\obj>
So, what’s the warning about?
What am I missing?
Thanks for any hints and tricks…
|
To make the confusion complete:
When running the application I get
System.IO.FileLoadException: 'Kan bestand of assembly Microsoft.Kiota.Abstractions, Version=1.12.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 of een van de afhankelijkheden hiervan niet laden. De manifestdefinitie van de gevonden assembly komt niet overeen met de assembly-verwijzing. (Uitzondering van HRESULT: 0x80131040)'
This exception was originally thrown at this call stack:
Microsoft.Graph.GraphServiceClient.GraphServiceClient(Azure.Core.TokenCredential, System.Collections.Generic.IEnumerable<string>, string)
PLANemailSender.Sender.VerzendEmail(string, string, string, string, string) in Sender.cs<navigate-to-context:1>
I’m lost….
|
The error messages you've provided refer to 3 different versions: 1.12.3, 1.13.0, 1.14.0. |
This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. |
I'm trying to upgrade our service to use graph sdk v5.
However, mock GraphServiceClinet using this new sdk causing:
per my understanding, graph sdk5 and graph.core sdk3, should be using Microsoft.Kiota.Abstractions, Version=1.3.1.0, not 1.2.1.0
I'm not sure why Microsoft.Kiota.Abstractions, Version=1.2.1.0 would be involved here. Also, this error is not occuring when using graph sdk4+graph.core sdk2.
Any idea why this happen and how to fix?
The text was updated successfully, but these errors were encountered: