-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
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
Also I have added binding redirect in app.config file like below.
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Buffers" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
</dependentAssembly>
</assemblyBinding>
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)