Failed to Load file or assembly problem, failed to load File

Source: Internet
Author: User

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!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.