"Could not load file or assembly" when trying to enter design mode

nope no 65 Reputation points
2023-03-08T16:31:56.28+00:00

The full error is "could not load file or assembly dotnetbridgelib, version= 1.4.8424.31115, culture = neutral publickekey = null or one of its dependencies. The system cannot find the file specified."

I'm focusing on the last part. It notes it cannot find the file, but i can both build, and run the application (and the form in question displays) just fine. So it can clearly find the file, but some other configuration within visual studio 2022 is set incorrectly.

I have verified that the reference in the running application refers to this dll, who has the same version number. Suggestions? Thank you.

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
5,142 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Tianyu Sun-MSFT 30,821 Reputation points Microsoft Vendor
    2023-03-09T08:03:23.9766667+00:00

    Hello @nope no ,

    Welcome to Microsoft Q&A forum.

    Please first try to right-click your project > Unload Project > right-click it again > Reload Project and check if this error disappears.

    I guess the dotnetbridgelib is your custom assembly?

    Does removing the assembly, readding it and cleaning the solution then rebuilding the solution work?

    Besides, is this assembly stored in your project folder? If not, could you try to move it to your project folder and add its reference then rebuild your solution and check again?

    Please feel free to let us know if it works.

    Sincerely,

    Tianyu


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.