I’m trying to upgrade the Microsoft.Graph NuGet package to version 5.54 in my .NET 8 project. After the upgrade, I’m encountering errors in my code.I attached screen shot and sample code below.
var graphResponse = await GetGraphServiceClient().Users[FromAddress]
.SendMail(email, true)
.Request()
.PostResponseAsync();
email.Attachments = new MessageAttachmentsCollectionPage();
foreach (var urlAttachment in emailMessage.URLAttachments)
{
var attachment = new FileAttachment();
attachment.ODataType = "#microsoft.graph.fileAttachment";
email.Attachments.Add(attachment);
}
How can I resolve the error for MessageAttachmentsCollectionPage?
How should I modify the SendMail method call to fix the CS1955 error?