OpenTK GLControl problems

1

I have recently updated the nuget package of OpenTK to the version 3.2.0 and I have the version 3.1.0 in the OpenTK.GLControl package. Since then I been having seriuos problems to run my app. I´ve tried everything but when I try to add a Glcontrol to the form it dissapears from the toolbox (with the 3.2 and 3.1 versions). I´ve also tried to go back and put the version 3.1.0 to the OpenTK package and now I can add the GLControl to the form but when I try to run it show a message saying:

" System.IO.FileLoadException: 'Unable to load file or assembly' OpenTK, Version = 3.2.0.0, Culture = neutral, PublicKeyToken = bad199fe84eb3df4 'or one of its dependencies. The definition of the assembly manifest does not match the reference to the assembly. (Exception from HRESULT: 0x80131040) "

Inner Exception FileLoadException: Unable to load file or assembly 'OpenTK, Version = 3.1.0.0, Culture = neutral, PublicKeyToken = bad199fe84eb3df4' or one of its dependencies. The definition of the assembly manifest does not match the reference to the assembly. (Exception from HRESULT: 0x80131040)

winforms
nuget
opentk
asked on Stack Overflow Apr 17, 2020 by Tormund

1 Answer

0

I had the same problem. When I removed the sentences below in App.config, the problem was solved.

<dependentAssembly>
    <assemblyIdentity name="OpenTK.GLControl" publicKeyToken="bad199fe84eb3df4" culture="neutral" />
    <bindingRedirect oldVersion="0.0.0.0-3.2.0.0" newVersion="3.2.0.0" />
</dependentAssembly>

enter image description here

answered on Stack Overflow Aug 16, 2020 by VD D • edited Aug 16, 2020 by David Buck

User contributions licensed under CC BY-SA 3.0