I'm testing my extension on VS2015, VS2017 and VS2019. On 2019 version all works fine, but for 2015 and 2017 it throw an error
System.IO.FileNotFoundException: Could not load file or assembly 'System.Runtime.CompilerServices.Unsafe, Version=4.0.4.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. Не удается найти указанный файл.
File name: 'System.Runtime.CompilerServices.Unsafe, Version=4.0.4.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
at System.Span`1..ctor(T[] array)
at System.Text.Json.JsonSerializer.Deserialize[TValue](String json, Type returnType, JsonSerializerOptions options)
at System.Text.Json.JsonSerializer.Deserialize[TValue](String json, JsonSerializerOptions options)
at Common.Json.Deserialize[T](String json)
at Extension.Service.ApiService.<GetSastSettingsAsync>d__5.MoveNext() in C:\Projects\VisualStudio.Extension\ApiService.cs:line 50
--- 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`1.GetResult()
at Extension.Service.ApiService.<IsCodeEnabledAsync>d__6.MoveNext() in C:\Projects\VisualStudio\Extension\Service\ApiService.cs:line 69
I tried to add this in my app.config file
<bindingRedirect oldVersion="0.0.0.0-4.0.4.1" newVersion="4.0.4.1"/>
But it doesnt help.
Maybe some one can suggest solution/fix?
Thanks!