Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Better error handling when DLL cannot be loaded due to missing reference #2566

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
zarif98 opened this issue Mar 19, 2025 · 0 comments
Open

Comments

@zarif98
Copy link

zarif98 commented Mar 19, 2025

We recently added a couple of new references to our DLL which caused one of our DLLs to stop loading. We were really confused as to why since nothing has really changed other than the references. And we have generally not had to add reference previously either.

Image

And this ModuleNotFoundError is really vague as to why it's failing. I would also say it's misguiding the user on what the actual issue which is the lack of references to a missing module that it has no access to and needs to be added.

Let's say I have a .csproj DLL that I'm referencing called HelloWorld.csproj and has references reference1 and reference2.

Since I didn't add a reference to import reference1.dll and reference2.dll it is failing to load my HelloWorld.csproj giving me a ModuleNotFoundError.

I think the best thing to do in this scenario is to highlight the fact that the DLL is unable to be loaded because of the missing modules since if we manually add the references the issue is fixed like clr.addReference(reference1) and clr.addReference(reference2).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant