3

Is it possible to utilize a NuGet package with runtime compilation?

I have to compile an EXE at runtime, and want to embed referenced .dll into my final .EXE to end up with a single file.

There is a NuGet package that does this at build time: https://github.com/Fody/Costura

I briefly read through the documents but it appears my use case would be an undocumented one. I was hoping someone here had experience with something similar.

Eli Arbel
  • 22,391
  • 3
  • 45
  • 71
stoXe
  • 313
  • 6
  • 13
  • You just need to add a reference to the DLL in your Compilation / Project. – SLaks Jul 14 '16 at 17:22
  • @SLaks I don't think you follow the requirement. Adding the reference to the DLL at runtime does not produce an .exe with the embedded DLL. – stoXe Jul 14 '16 at 19:01
  • You can embed the DLL as a resource like any other file. – SLaks Jul 14 '16 at 19:46
  • And reference it in the code and call it's contained methods? It's not that simple. At least not what I have read. – stoXe Jul 14 '16 at 20:13

0 Answers0