I have installed PnP.Framework NuGet package to read files from the SharePoint portal in my Excel Addin project (.Net Framework 4.6.1). When I debug my project locally, my Addin related code is working fine. I have bundled the entire deployment files as an executable file by using Visual Studio Setup project (.msi file). After installing the Excel Addin, I am getting below error. I have tried various approaches to resolve this issue. There is no luck still now. Could you please help me to resolve this issue?

PnP.Framework Version: 1:13.0

System.Text.Json Version: 4.7.2

Stack Trace:

Message: Could not load file or assembly 'System.Buffers, Version=4.0.2.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) StackTrace: at System.Text.Json.JsonSerializer.Deserialize(String json, Type returnType, JsonSerializerOptions options) at System.Text.Json.JsonSerializer.Deserialize[TValue](String json, JsonSerializerOptions options) at PnP.Framework.Utilities.TokenHelper.GetMetadataDocument(String realm) at PnP.Framework.Utilities.TokenHelper.GetStsUrl(String realm) at PnP.Framework.Utilities.TokenHelper.GetAppOnlyAccessToken(String targetPrincipalName, String targetHost, String targetRealm) at PnP.Framework.Utilities.ACSTokenGenerator.GetToken(Uri siteUrl) at PnP.Framework.AuthenticationManager.b__62_0(String site) at PnP.Framework.AuthenticationManager.<>c__DisplayClass78_0.b__0(Object sender, WebRequestEventArgs args) at Microsoft.SharePoint.Client.ClientRuntimeContext.OnExecutingWebRequest(WebRequestEventArgs args) at Microsoft.SharePoint.Client.ClientContext.GetWebRequestExecutor()
at Microsoft.SharePoint.Client.ClientContext.d__37.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.SharePoint.Client.ClientContext.d__36.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.SharePoint.Client.ClientContext.d__28.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
at GoSystem_Extension_Automation.Dialogs.SettingsDialog.d__36.MoveNext() Source: System.Text.Json TargetSite: System.Object Deserialize(System.String, System.Type, System.Text.Json.JsonSerializerOptions)

0

There are 0 best solutions below