This project is an "amibroker plugin" developed in C# using kriasoft's amibroker .NET SDK .
I have "build" my plugin and it works fine when I test it in a "Console project". But when I try to debug it with external app (Amibroker.exe) visual studio abruptly closes down and in a few seconds launches a blank visual studio window with an option to "attach" in place of where we usually see "start" for running our project.
I clicked on the attach option and attached to my amibroker application and it successfully displayed "Debug.Writeline()" messages. But none of my breakpoints are hit. My code is not visible in any window either as it would be normally when I was debugging console app.
Upon research in google, i found out that the external application is supposed to be automatically launched by visual studio and should nave stopped at my breakpoint. This is not happening in my case. I have searched a lot and even updated entire vs2019, yet no progress.
It would be great if anybody could help me out.
Note: "Start without Debugging" works fine.
New Information regarding "Could not load file or assembly 'System.Text.Json": Could not load file or assembly 'System.Text.Json, Version=4.0.1.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. The system cannot find the file specified.
Err:510 LOG: DisplayName = System.Text.Json, Version=4.0.1.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51 (Fully-specified) LOG: Appbase = file:///C:/Program Files (x86)/AmiBroker_New_6.0/ LOG: Initial PrivatePath = NULL Calling assembly : (Unknown). Err:510 LOG: This bind starts in default load context. LOG: No application configuration file found. LOG: Using host configuration file: LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config. LOG: Post-policy reference: System.Text.Json, Version=4.0.1.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51 LOG: Attempting download of new URL file:///C:/Program Files (x86)/AmiBroker_New_6.0/System.Text.Json.DLL. LOG: Attempting download of new URL file:///C:/Program Files (x86)/AmiBroker_New_6.0/System.Text.Json/System.Text.Json.DLL. LOG: Attempting download of new URL file:///C:/Program Files (x86)/AmiBroker_New_6.0/System.Text.Json.EXE. LOG: Attempting download of new URL file:///C:/Program Files (x86)/AmiBroker_New_6.0/System.Text.Json/System.Text.Json.EXE.
My packages.config entries:
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="CsvTextFieldParser" version="1.2.1" targetFramework="net461" />
<package id="Microsoft.Bcl.AsyncInterfaces" version="1.1.0" targetFramework="net461" />
<package id="System.Buffers" version="4.5.1" targetFramework="net461" />
<package id="System.Memory" version="4.5.4" targetFramework="net461" />
<package id="System.Numerics.Vectors" version="4.5.0" targetFramework="net461" />
<package id="System.Runtime.CompilerServices.Unsafe" version="4.7.1" targetFramework="net461" />
<package id="System.Text.Encodings.Web" version="4.7.1" targetFramework="net461" />
<package id="System.Text.Json" version="4.7.1" targetFramework="net461" />
<package id="System.Threading.Tasks.Extensions" version="4.5.4" targetFramework="net461" />
<package id="System.ValueTuple" version="4.5.0" targetFramework="net461" />
<package id="UnmanagedExports" version="1.2.7" targetFramework="net461" />
</packages>
app.config
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<probing privatePath="ghyiouys\;Plugins\;plugins;"/>
<dependentAssembly>
<assemblyIdentity name="System.Text.Json" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.1.1" newVersion="4.0.1.1" />
<codeBase version="4.0.1.1" href="Plugins/System.Text.Json.dll"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Numerics.Vectors" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.1.4.0" newVersion="4.1.4.0" />
<codeBase version="4.1.4.0" href="Plugins/System.Numerics.Vectors.dll"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.6.0" newVersion="4.0.6.0" />
</dependentAssembly>
<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>
<dependentAssembly>
<assemblyIdentity name="System.ValueTuple" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>