0

I have a DLL which require a little bit config block inside App.config.

 <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="System.Net.Http.Primitives" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-4.2.18.0" newVersion="4.2.18.0" />
      </dependentAssembly>
    </assemblyBinding>
  </runtime>

If I put the above config block my DLL stops executing in the middle and releases all the resources which is weird. On the other hand, if I try to do the same with a console app, it properly executes. Any suggestion please?

poke
  • 369,085
  • 72
  • 557
  • 602
Ammar Khan
  • 346
  • 1
  • 9
  • 27
  • How are you running your dll in first case? – Andrei Feb 27 '14 at 13:19
  • I simply put the reference of my dll in winform app and add config block inside app.config and when I execute my form, It stop executing – Ammar Khan Feb 27 '14 at 13:19
  • Does your main app also reference System.Net.Http.Primitives? – Uwe Hafner Feb 27 '14 at 13:31
  • No error, It just stop execute further. If I remove the config block getting error related to the assembly "Could Load file or assembly System.Net.Http.Primitives version 1.5.0.0.... – Ammar Khan Feb 27 '14 at 13:32
  • Can you remove the reference from the main app or is it required? If required is it incompatible to the dll-needed version? – Uwe Hafner Feb 27 '14 at 13:34
  • This might help:http://stackoverflow.com/questions/18370360/could-not-load-file-or-assembly-system-net-http-primitives-located-assemblys-m – Matt Feb 27 '14 at 13:37
  • @Uwe That's why I added the config block but it stops execution in the middle. – Ammar Khan Feb 27 '14 at 13:56
  • @Matt I already checked that post, that's why I added the config block. The error which is mentioned there, previously I was getting that one. But not stuck into this weird issue. Any idea? – Ammar Khan Feb 27 '14 at 13:57
  • I am trying to resolve this issue from last night. Please help me to fix out this issue – Ammar Khan Feb 27 '14 at 14:14
  • keep waiting for someone who can help me to get rid of this issue. – Ammar Khan Feb 27 '14 at 16:43

0 Answers0