Infamous assembly binding error

后端 未结 10 871
星月不相逢
星月不相逢 2020-12-07 20:20

I really need help on this because I lost my hopes to correct the problem.

I am using Office Communications Server 64bit libraries. There are 3 dlls I use in the pro

相关标签:
10条回答
  • 2020-12-07 20:43

    Try setting Copy Local in solution explorer for those assemblies and make sure they are being dropped into the folder's specified in the binding log.

    Also, they were probably built using the V2 CLR. If they were, you'll have to enable Mixed Mode binding by adding this to your web/app config

    <configuration>
       <startup  useLegacyV2RuntimeActivationPolicy="true">
           <supportedRuntime version="v4.0"/>
      </startup>
    </configuration> 
    
    0 讨论(0)
  • 2020-12-07 20:45

    In my case I had some crap in my web.config, specifically a half-commented out httpHandler that once I cleaned that up, my binding issue disappeared.

    0 讨论(0)
  • 2020-12-07 20:50

    This is an old question, but was still the top result when I had this same issue today. I had switched my project compilation in Visual Studio to target x64 instead of 'All CPUs' (it's on a 64-bit machine). As per the other answers, there would be two ways to fix it - either change everything to 32-bit or everything to 64-bit. In this case, I needed 64-bit.

    KabanaSoft's answer worked perfectly for me. Still correct as of Visual Studio 15.6.6.

    0 讨论(0)
  • 2020-12-07 20:52

    I was getting the error when trying to run the web application from Visual Studio, but in my case the answer was simple. When I read the exception carefully I could see that the assembly in question was no longer used by the application but a copy was still in the bin folder. After the offending assembly was removed, the error vanished.

    0 讨论(0)
提交回复
热议问题