Failed to Load file or assembly problem, failed to load File
In. net applications, "failed to Load file or assembly 'xxx. dll 'or one of its dependencies is often encountered. The system cannot find the specified file. First, let's talk about the solution. First, check whether the dll file is referenced in your project. If not, add the dll file. Then, check whether the reference path of the Project property is correct. If not, finally, you can use the Assembly registration tool that comes with VS to register this assembly.
1. Add it to the Reference Directory of the project and view the rebuild operation
2. If 1 cannot solve the problem, you can select your project, right-click and select Properties
Under the reference path, check whether the reference path on the right is correct. If it is incorrect, remove it and add it again. Run rebuild.
3. If the above two steps still do not solve the problem, you need to register your Assembly for a long time.
Enter the CMD command prompt box as an administrator and press cd \ to return to the C directory,
Find the tool for VS to register the Assembly. If it is installed by default, it is in this directory:
C: \ Windows \ Microsoft. NET \ Framework \ v2.0.50727
RegAsm
Enter the tool path in the CMD command box, enter the Tool Name regasm, and press the space to write the dll path of your program
Rebuild run to view.
Finally, check whether your IIS is an application pool issue or a permission issue (preferably an Administrator Account). The problem can be basically solved through the above steps.
File or assembly not loaded
Use TFS! Search online !!! Many materials
File or assembly not loaded? What is the problem? What should I do?
Software errors, file loss, or anti-virus software restrictions. Try the next software again!