问题
I'm developing custom local resource provider implementation, which should supply resource values from resources located in App_LocalResources folders, but the resources should be compiled as embedded. So no resx files will stay in web app folder, which default LocalResXResourceProvider expects.
The problem is I need to get to assembly with the embedded resources from virtual path and I'm not able to figure out what ASP.NET class use to translate virtual path to corresponding assembly. I was looking into decompiled sources of LocalResXResourceProvider and BuildManager, but all the things are internal. I wasn't able to get the assembly even using LocalResXResourceProvider.GetLocalResourceAssembly() through reflection - it just returns null when I deployed the application to clear folder without resx files in place. It works when resx files are present though...
来源:https://stackoverflow.com/questions/10533721/asp-net-how-to-get-assembly-from-virtual-path-in-custom-iresourceprovider-impl