How to fix differences on call Microsoft.Graph.Calendar between .NET Core and .NET Framework

旧街凉风 提交于 2021-01-29 05:12:25

问题


I have a strange problem with conversion from .NET Core 3.1 to .NET Framework 4.7.2. It should be compatible in base area, but not always.

var calendars = _graphClient.Users[$"{userId}"].Calendars.Request().GetAsync().Result;

This function work fine in .Net Core, but not in .Net Framework makes error with following exception:

NotSupportedException: The collection type 'Microsoft.Graph.IUserCalendarsCollectionPage' is abstract, an interface, or is read only, and could not be instantiated and populated. The unsupported member type is located on type 'System.Collections.Generic.List`1[Microsoft.Graph.Calendar]'. Path: $.value | LineNumber: 0 | BytePositionInLine: 123.

Have you any idea how fix it?

来源:https://stackoverflow.com/questions/62530532/how-to-fix-differences-on-call-microsoft-graph-calendar-between-net-core-and-n

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!