c# - How to get EmbeddedResource from different assembly? -


i have assembly, mainlib.dll, resource retrieve with:

string resourcepath = string.format("mainlib.{0}", "embeddedresource.txt"); var assembly = assembly.getexecutingassembly(); stream inputstream = assembly.getmanifestresourcestream(resourcepath); 

this works fine. need move embeddedresource.txt it's own lib, resourcelib.dll.

how retrieve resourcelib.dll , use in mainlib.dll in separate dll?

you need resourcelib assembly embedded resource -

var assembly = assembly.getassembly(typeof(classnameinthatassembly)); 

or

var assembly = assembly.loadfrom("resourcelib"); 

Comments

Popular posts from this blog

html5 - What is breaking my page when printing? -

html - Unable to style the color of bullets in a list -

c# - must be a non-abstract type with a public parameterless constructor in redis -