我正在使用 Graph 将文件夹与远程 Sharepoint 驱动器、.NET 8.0、图形库版本 5.41.0 同步 为了获取驱动器根目录的子级,我正在使用这段代码
DriveItem rootFolder = graphClient.Drives[_localSettings.driveId].Root.GetAsync((requestConfiguration) =>
{
requestConfiguration.QueryParameters.Expand = new string[] { "children" };
}).Result;
当我在 VS 中调试它时它可以工作,事实上,如果我直接从 VS 执行它,我的软件工作得很好,但是当我编译它时,到达这里它给我“发生一个或多个错误。”Property Get 方法不是发现了。”异常。 为什么?这让我抓狂
我不明白为什么当我在VS中测试代码时它工作得很好,但当我编译并执行它时却返回错误
您可以使用以下代码列出儿童
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
com.microsoft.graph.models.termstore.TermCollectionResponse result = graphClient.sites().bySiteId("{site-id}").termStore().sets().bySetId("{set-id}").children().get();