A set of .NET Framework managed libraries for developing graphical user interfaces.
Hello @McDonald, Gregor ,
Thanks for your question.
The Could not load file or assembly error may occur even when the file is present because the system is struggling to read it, rather than find it.
You can refer to these following workarounds:
- Older versions of Visual Studio (2019 and below) run as 32-bit processes. If the DLL is compiled strictly as 64-bit (x64), the designer may fail to load it. You might consider changing the
Platform Targetin your project's Build properties toAny CPUorx86. - Windows sometimes blocks external files for security reasons. You can check this by right-clicking the DLL in File Explorer, selecting
Properties, and looking for anUnblockcheckbox at the bottom of the General tab. - The error may indicate that a secondary file your custom DLL relies on is missing. It is worth verifying that all required background libraries are included in the same directory.
- Visual Studio may be trying to read an older, broken copy of the file. It could be helpful to close Visual Studio, delete the
binandobjfolders in your project directory, and rebuild the solution.
I hope this addresses your question. If this response was helpful, please consider following the guidance to provide feedback. Thank you.