So the people who make Microsoft.CodeAnalysis.CSharp had a bug in its last release (3.4.0.0). It causes a problem when you try to generate code. I'm able to get around the bug by dropping back to a previous release. When I run it from a console program, it works fine.
Then I attempt to package it up (it's a code generator) into a Visual Studio Package. Because this library is part of Visual Studio, I get the new version of this library that comes with Visual Studio (Version 16.4.2), which has this offensive bug in it. I've tried creating an app.config with the following instructions:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Microsoft.CodeAnalysis.CSharp" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="3.4.0.0" newVersion="3.2.1.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
But the package doesn't seem to honor it as I hit the same bug no matter what version of Microsoft.CodeAnalysis.CSharp I have installed it in my VS package.
Any ideas on how to get around this?