At last, my friend provide me the answer, you have to load the dll first before get the directory path with code
private string[] GetAllResourcePath()
{
Assembly assembly = Assembly.Load("ImageDLL");
string resName = "ImageDLL.g.resources";
using (var stream = assembly.GetManifestResourceStream(resName))
{
using(var reader = new ResourceReader(stream))
{
return reader.Cast<DictionaryEntry>().Select(x => (string)x.Key).ToArray();
}
}
}
From this func, it will return all the resource directory path, and you can just filter out by using .Where() linq to get the directory you want.