1

I hope this isn't to broad, but I am wondering if the following can be done somehow?

Lets say I have a Nuget-package for Project A and a solution with some projects (Project B, Project C). Now, Project C references Project B. It also has a Nuget-Dependency for Project A (which was developed within a different solution).

When I compile Project C, I get the dll of Project C along with the dll for Project A. Is there a way, the dependencies can be compiled into the dll for Project C, so that i only have one dll which conatains all its dependencies as well as the actual project?

The Reason is that I want to load ProjectC.dll at runtime in a different solution. But when i do so, the dependencies are missing.

How would one usually handle that?

Zafar
  • 3,394
  • 4
  • 28
  • 43
nozzleman
  • 9,529
  • 4
  • 37
  • 58
  • 2
    There's a better solution than ILMerge (which doesn't work well with WPF and has problems with multiple language resources). See [this blog from Jeffrey Richter](http://blogs.msdn.com/b/microsoft_press/archive/2010/02/03/jeffrey-richter-excerpt-2-from-clr-via-c-third-edition.aspx) and [an application of the concept here](http://elegantcode.com/2011/04/02/dynamically-load-embedded-assemblies-because-ilmerge-appeared-to-be-out/) Also see [here](http://www.codingmurmur.com/2014/02/automatically-embed-copy-local.html) for another similar but perhaps better approach. – Matthew Watson Aug 21 '14 at 12:46
  • 1
    Forgot to say: [Here's a NuGet library which does it for you](http://www.nuget.org/packages/Costura.Fody) – Matthew Watson Aug 21 '14 at 12:51

0 Answers0