❔ How would I have a compiled Class Library look for necessary reference in a folder other than ./
I am creating a game mod via Melon Loader, and I want to have the compiled .dll look for its references in a different folder than where the .dll is in. How do I do this?
7 Replies
I know there's an official MS docs page that describes this, but I found this blog first
Michael's Coding Spot
Understanding How Assemblies Load in C# .NET
We are constantly dealing with libraries and NuGet packages. These libraries depend on other popular libraries and there are a lot of shared dependencies. With a large enough web of dependencies, you'll eventually get into conflicts or hard situations. The best way to deal with such issues is to understand how the mechanism works internally.
specifically, item #5, under "Assemblies Binding in .NET"
ah, here we go
How the Runtime Locates Assemblies - .NET Framework
Learn how the common language runtime (CLR) locates and binds to the assemblies that make up your application in .NET.
My advice would be: don't. What do you gain by this setup?
Cleaner mods folder and a centralized location for mod reference dlls.
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.