I have a web application project. I generated the DLL and import it in another project. I implemented VirtualPathProvider
.
I followed this web site: http://support.microsoft.com/kb/910441/en-us?spid=8940&sid=global, and everything works until I add another site master.
site_export.master
and changed its Build Action to Embedded Resource.GetManifestResourceStream()
returns null
when I load site_export.master
.GetManifestResourceNames()
to check if site_export.master
exists in the DLL and it does. It's in the list. All of the name spaces match. I didn't list the name space out here.Why can't GetManifestResourceStream()
load my new site_export.master
? It loads site.master
just fine. I know my DLL is loaded because I can see other files in the DLL.
Remember the following issues...
Step 1. Build action set to embedded resource see
C#’s GetManifestResourceStream Gotcha
Step 2. Use namespace.resourcename
see GetManifestResourceStream() returns null ?
Actually, this method returns null if a private resource in another assembly is accessed and the caller does not have ReflectionPermission
with the ReflectionPermissionFlag.MemberAccess
flag.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With