Minu Mathews

Minu Mathews

  • NA
  • 2
  • 687

Referencing an embedded resource

Jul 31 2019 8:24 PM
HI all,
 
I am new to c# so excuse my ignorance. I have compliled my exe and it is working correctly, now I wan tto combine my refernced DLL's into the exe. I have found Fody Costura and Ilmerge to do this for me, my problem is once I do this and run my application I get errors about file not being found, I think it is because I have static path refernces like so:
 
string directory = Path.Combine(assemblyDirectory, "lib", "NetworkConnections");
using (AssemblyCatalog assemblyCatalog = new AssemblyCatalog(typeof(NetworkConnectionsManager).Assembly))
using (DirectoryCatalog directoryCatalog = new DirectoryCatalog(directory))
using (AggregateCatalog aggregateCatalog = new AggregateCatalog(assemblyCatalog, directoryCatalog))
 
How could I change this code to work with an embedded file?

Answers (2)