1

A dll that is referenced via Nuget but not used yet is not available if I query AppDomain.CurrentDomain.GetAssemblies or EntryAssembly.GetReferencedAssembly. How can I load the dll. I want to register some types from it and won't use any compile time solution, but run-time.

Ali
  • 23
  • 6
  • have a look at [this question](https://stackoverflow.com/questions/15816769/dependent-dll-is-not-getting-copied-to-the-build-output-folder-in-visual-studio) maybe you've got the same problem – Alex Buyny May 26 '19 at 23:49
  • very little in common. have already gone through. Putting dummy declaration solves the problem but in my case even that is not applicable – Ali May 27 '19 at 04:38
  • What stops you from adding a dummy reference? – Alex Buyny May 28 '19 at 02:40
  • it just look very unprofessional to add a line that means nothing but to force .net to load the assembly that contains that type. I'm sure there could be a better solution. Moreover the developers using my framework code won't always remember that they they have to add a dummy type. – Ali May 30 '19 at 06:14

0 Answers0