I've made a C# dll file that uses RestSharp V110.2.0 so it requires System.Runtime.CompilerServices.Unsafe V6.0.0 to work so getting rid of it is out of the question. I made a little test UI for the dll and it works fine. In the project properties, "Auto-generate binding redirects" is on and there is a bindingRedirect section in the app.config file.

And this is the app.config file.
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
Openedge reads the dll file but whenever I try to use methods that use RestSharp (which is pretty much every method in the dll), I get this error message. The V6.0.0.0 dll is already in my assemblies folder so I can't add the version it's asking for.
Putting the version it asks for in the GAC does solve the problem on my end but it's not something I can do for other people who cannot GAC dlls as the project is meant to be built and exported as an msi file so it's expected you just install the msi and it works and not faff about getting dlls working. Is there any other solution for this problem?

Assembly redirects are in %dlc%\bin\prowin.exe.config or %dlc%\bin\prowin32.exe.config (64 bit or 32 bit).