Packing an external DLL with my own DLL

I've written a library that also uses another external library, packed into a .dll file. When I build my library file, it doesn't pack the external dll in with it. How can I do this? Do I need the source?
15 Replies
Buddy
Buddy9mo ago
You can't.
UnemployedNinja
UnemployedNinjaOP9mo ago
So I have to include the source in my own project in order to do it?
Buddy
Buddy9mo ago
It is a library, not an executable. Avoid doing that even if you could. I would never use a library that unloads something at runtime, suspicious as hell
jcotton42
jcotton429mo ago
@UnemployedNinja wdym "with my dll"? in C# the way you distribute libraries is with a nuget package if that other DLL is a nuget as well, just depend on it, the tooling will sort everything out if it's a native DLL that's not in a nuget, then there's some work you'll have to do @Buddy I don't necessarily think they're referring to like, extracting the other DLL to disk at runtime b/c that would be quite silly
UnemployedNinja
UnemployedNinjaOP9mo ago
I don't mean that lol, no
Buddy
Buddy9mo ago
Ah, I see.
UnemployedNinja
UnemployedNinjaOP9mo ago
But yea, I just gave up for now, I'll deal with two separate DLL files until I have more knowledge
jcotton42
jcotton429mo ago
@UnemployedNinja what's the other DLL? and is this Unity? b/c iirc Unity doesn't play well with nuget
UnemployedNinja
UnemployedNinjaOP9mo ago
One is my library, and the other DLL is a required library No, just C# Visual Studio Nothing else
jcotton42
jcotton429mo ago
yeah but what is that required library?
UnemployedNinja
UnemployedNinjaOP9mo ago
An old AMF library called Fluorine
jcotton42
jcotton429mo ago
like gimme a name? is it ffmpeg? Joe Blow's Amazing DLL You Can't Live Without Or Your Money Back? thank you
UnemployedNinja
UnemployedNinjaOP9mo ago
Sorry sir I started C# like 3 days ago, idk what I'm doing atm lol
jcotton42
jcotton429mo ago
when you get to sharing that library with others (which I assume is what you're getting to) you'll learn about nuget and you can pack the DLL in then but for now, don't worry about it
UnemployedNinja
UnemployedNinjaOP9mo ago
I've crossed paths with it briefly, Fluorine required some a nuget package System.Security.Permissions ty for the info though, appreciate it
Want results from more Discord servers?
Add your server