Package all dependencies into one DLL (C#)
4 hours ago, FlappyBoobs said:Thats not correct. If you build them as embedded resources then it is possible.
Almost all of the responses in that StackOverflow thread are about dynamic .dll loading, using the CLRs Appdomain.AssemblyResolve event that fires after the CLR is unable to find a dependency.
This requires startup code to work, and may be very slow, both because those solutions only run after the CLR fails to find an assembly (one that the developer already knows for sure it won't find), and because it relies on some serious reflection to load the .dlls in.
23 hours ago, RileyTheFox said:is there any way I can include those dependencies into the DLL so I don't need to distribute loads of other dependencies (and their dependencies, then their dependencies etc)
There is a tool called ILMerge. It is a static linker for dotnet, which is exactly what you are asking for.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now