Bill,
Not sure of your setup and why you get those errors.
I can tell you the way I use resources - see whether it works for you.
- In your dll set BuildAction for the files to "Embedded Resource"
- inside your dll define a function that would return the resource,
something similar to the following:
using System;
using System.IO;
using System.Reflecti on;
....
public class MyDllClass{
....
private static Assembly _asm = Assembly.GetExe cutingAssembly( );
private static Type _localType = typeof(MyDllCla ss);
....
public static Stream GetResource(str ing location, string name)
{
return _asm.GetManifes tResourceStream (_localType, location + "." + name);
}
if your resource files are grouped in a folder - you would specify the
folder name in location parameter, otherwise pass empty string. Note that
resource name is case-sensitive.
If you program in VB, I believe that you do not specify the location - it
does not create a namespace for folders.
To get a string from your Stream, use
new StreamReader(st ream).ReadToEnd ();
Hope this helps
"Bill Mell" wrote:
I would like to use compiled resource files in my web application that are
not related to localization.
The idea is to have a dll with resources that can be accessed by the
website.
I have no problem making the dll.
I am running into problems using it.
I am attempting to use the resource manager to get the values from the dll
and update the controls appropriately.
When I try to use it, I get a MissingManifest ResourceExcepti on error saying
Could not find any resources appropriate for the specified culture (or the
neutral culture) on disk.
How can I avoid this?
Thanks,
Bill Mell