.Net MVC Tip Could not load file or assembly

In a recent development .Net MVC program, suddenly Could not load file or assembly errors,

Error 1

 

Error 2

 

  Because when speculation cited Swagger, Swagger cause dependent component version and the existing version conflict (we have yet to determine the reason), wasted a long time to find the cause. The final time to see someone find information referred to Web.config, try to rely on existing 5.2.3.0 version added to the Web.config file at the time, and ultimately solve the first problem.

  After seeing the Web.config bindingRedirect node ( before addition to the reasons configure the database connection and custom parameters, no in-depth understanding of Web.config, and this is such a long time does not solve the problem ), the second problem will solved with . In the configuration file, bindingRedirect Redirects binding, meaning that if there are references between 0.0.0.0 to 5.2.3.0, 5.2.3.0 eventually redirected to is newVersion version specified. This is the official bindingRedirect explanation node.

  Summarize, I do not know my personal problem or what, but fortunately, when the normal development process, a point a little problem we need to find a very long time, ultimately most are not the cause of the code. In the final analysis, or lazy, just to understand what frequently used. That there is no independent look carefully. This is sick! We have changed! Please enjoy, record this lesson.

Guess you like

Origin www.cnblogs.com/-lyl/p/AssemblyError.html