Reputation: 4038
I'm currently trying to embed a DLL (as a resource) in another dll, but I'm having a slight little problem.
Where is DLL entry point located? I mean, in a WPF I would have an app.xaml.cs file, but what if my project is a library itself?
Where should I, let's say, program AppDomain.CurrentDomain.AssemblyResolve
so it picks it from resources instead? I don't have a program class to do that.
Upvotes: 0
Views: 2328
Reputation: 887451
DLLs don't have entry points.
Instead, classes are loaded and used as necessary.
Instead of handling AssemblyResolve
, you should simply call Assembly.Load
in static initializers before using any type from the other assembly.
Upvotes: 2