473,320 Members | 1,612 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Problem with Resources

OK, for a number of reasons I have needed to begin experimenting with
resources sooner than I had planned (I had avoided it for now).

Step 1: I built the 'reseditor' application that is in the SDK
sub-directory, as instructed by the MSDN.

Step 2: I used the 'reseditor' to create a file named
"MyResources.resources" that contains only some string resources.

Step 3: I added this resource file to my existing test assembly (does not do
anything other than test the use of the string resources to generate
altername 'names' for enumerated values).

Step 4: In the class definition (for my form since that is all there is in
this test code), I added "ResourceManager _Resources;".

Step 5: In the constructor for this form I added "_Resources = new
ResourceManager("MyResources", Assembly.GetExecutingAssembly());" (I
actually wrapped this in a try/catch block just in case, but the code does
not cause an exception).

Step 6: In my code I generate the name of the resource string I want and
attempt to retrieve it: "result.Append("[Retrieved] " +
_Resources.GetString(resourceName));" -- I have checked that the name I am
passing is the name of one of the strings in the resource file.

Step 7: I get a MissingManifestResourceException reporting that it "Could
not find any resources appropriate for the specified culture (or the neutral
culture) in the given assembly."

Step 8: This fails for any string I attempt to read.

Step 9: If I examine the binary of the resource file (which is in the
assembly), the contents indicate that it is for the neutral culture.

What am I doing wrong?

-Ken
Nov 16 '05 #1
7 1731
Hello Ken,

Examine the assembly with the ILDASM tool to find out the real name of the
resource file. It will most likely be prefixed with the default namespace
name.
Therefore, on Step 5, you should specify the name of the resource file as:

"MyNamespace.MyResources"

"Ken Allen" <ke******@sympatico.ca> wrote in message
news:Oc*************@TK2MSFTNGP12.phx.gbl...
OK, for a number of reasons I have needed to begin experimenting with
resources sooner than I had planned (I had avoided it for now).

Step 1: I built the 'reseditor' application that is in the SDK
sub-directory, as instructed by the MSDN.

Step 2: I used the 'reseditor' to create a file named
"MyResources.resources" that contains only some string resources.

Step 3: I added this resource file to my existing test assembly (does not do anything other than test the use of the string resources to generate
altername 'names' for enumerated values).

Step 4: In the class definition (for my form since that is all there is in
this test code), I added "ResourceManager _Resources;".

Step 5: In the constructor for this form I added "_Resources = new
ResourceManager("MyResources", Assembly.GetExecutingAssembly());" (I
actually wrapped this in a try/catch block just in case, but the code does
not cause an exception).

Step 6: In my code I generate the name of the resource string I want and
attempt to retrieve it: "result.Append("[Retrieved] " +
_Resources.GetString(resourceName));" -- I have checked that the name I am
passing is the name of one of the strings in the resource file.

Step 7: I get a MissingManifestResourceException reporting that it "Could
not find any resources appropriate for the specified culture (or the neutral culture) in the given assembly."

Step 8: This fails for any string I attempt to read.

Step 9: If I examine the binary of the resource file (which is in the
assembly), the contents indicate that it is for the neutral culture.

What am I doing wrong?

-Ken


Nov 16 '05 #2
Hmmm. Using ILDASM I can see the file names in the manifest, but it is not
listed in the assembly itself -- at the top level I see MANIFESZT and
"EnumerationNaming" (the name of my assembly/solution), and inside
"EnumerationNameing" all I see is Form1 and the publuc enum "MyStates",
which are all that were defined in the Form1.cs file! In the manifest I see
these lines:

..mresource public EnumerationNaming.MyResources.resources
{
}
..mresource public EnumerationNaming.Form1.resources
{
}

I added the reopsurce file by copying the MyResources.resources file to the
same directory as the Form1.cs file and then performed an "Add Existing..."
function to add the file -- and it appears in the solution explorer!

I do not understand!

-Ken

"Dmitriy Lapshin [C# / .NET MVP]" <x-****@no-spam-please.hotpop.com> wrote
in message news:uU**************@TK2MSFTNGP12.phx.gbl...
Hello Ken,

Examine the assembly with the ILDASM tool to find out the real name of the
resource file. It will most likely be prefixed with the default namespace
name.
Therefore, on Step 5, you should specify the name of the resource file as:

"MyNamespace.MyResources"

"Ken Allen" <ke******@sympatico.ca> wrote in message
news:Oc*************@TK2MSFTNGP12.phx.gbl...
OK, for a number of reasons I have needed to begin experimenting with
resources sooner than I had planned (I had avoided it for now).

Step 1: I built the 'reseditor' application that is in the SDK
sub-directory, as instructed by the MSDN.

Step 2: I used the 'reseditor' to create a file named
"MyResources.resources" that contains only some string resources.

Step 3: I added this resource file to my existing test assembly (does not
do
anything other than test the use of the string resources to generate
altername 'names' for enumerated values).

Step 4: In the class definition (for my form since that is all there is

in this test code), I added "ResourceManager _Resources;".

Step 5: In the constructor for this form I added "_Resources = new
ResourceManager("MyResources", Assembly.GetExecutingAssembly());" (I
actually wrapped this in a try/catch block just in case, but the code does not cause an exception).

Step 6: In my code I generate the name of the resource string I want and
attempt to retrieve it: "result.Append("[Retrieved] " +
_Resources.GetString(resourceName));" -- I have checked that the name I am passing is the name of one of the strings in the resource file.

Step 7: I get a MissingManifestResourceException reporting that it "Could not find any resources appropriate for the specified culture (or the

neutral
culture) in the given assembly."

Step 8: This fails for any string I attempt to read.

Step 9: If I examine the binary of the resource file (which is in the
assembly), the contents indicate that it is for the neutral culture.

What am I doing wrong?

-Ken

Nov 16 '05 #3
> .mresource public EnumerationNaming.MyResources.resources
{
}
This is the one you need. Therefore, you should change Step 5 to the
following:

_Resources = new ResourceManager("EnumerationNaming.MyResources",
Assembly.GetExecutingAssembly());

I really cannot explan why VS .NET appends the name of the namespace to the
name of the resource file itself,
it just works this way.
"Ken Allen" <ke******@sympatico.ca> wrote in message
news:%2***************@TK2MSFTNGP11.phx.gbl... Hmmm. Using ILDASM I can see the file names in the manifest, but it is not
listed in the assembly itself -- at the top level I see MANIFESZT and
"EnumerationNaming" (the name of my assembly/solution), and inside
"EnumerationNameing" all I see is Form1 and the publuc enum "MyStates",
which are all that were defined in the Form1.cs file! In the manifest I see these lines:

.mresource public EnumerationNaming.MyResources.resources
{
}
.mresource public EnumerationNaming.Form1.resources
{
}

I added the reopsurce file by copying the MyResources.resources file to the same directory as the Form1.cs file and then performed an "Add Existing..." function to add the file -- and it appears in the solution explorer!

I do not understand!

-Ken

"Dmitriy Lapshin [C# / .NET MVP]" <x-****@no-spam-please.hotpop.com> wrote
in message news:uU**************@TK2MSFTNGP12.phx.gbl...
Hello Ken,

Examine the assembly with the ILDASM tool to find out the real name of the
resource file. It will most likely be prefixed with the default namespace name.
Therefore, on Step 5, you should specify the name of the resource file as:
"MyNamespace.MyResources"

"Ken Allen" <ke******@sympatico.ca> wrote in message
news:Oc*************@TK2MSFTNGP12.phx.gbl...
OK, for a number of reasons I have needed to begin experimenting with
resources sooner than I had planned (I had avoided it for now).

Step 1: I built the 'reseditor' application that is in the SDK
sub-directory, as instructed by the MSDN.

Step 2: I used the 'reseditor' to create a file named
"MyResources.resources" that contains only some string resources.

Step 3: I added this resource file to my existing test assembly (does
not
do
anything other than test the use of the string resources to generate
altername 'names' for enumerated values).

Step 4: In the class definition (for my form since that is all there is in this test code), I added "ResourceManager _Resources;".

Step 5: In the constructor for this form I added "_Resources = new
ResourceManager("MyResources", Assembly.GetExecutingAssembly());" (I
actually wrapped this in a try/catch block just in case, but the code does not cause an exception).

Step 6: In my code I generate the name of the resource string I want
and attempt to retrieve it: "result.Append("[Retrieved] " +
_Resources.GetString(resourceName));" -- I have checked that the name
I am passing is the name of one of the strings in the resource file.

Step 7: I get a MissingManifestResourceException reporting that it "Could not find any resources appropriate for the specified culture (or the

neutral
culture) in the given assembly."

Step 8: This fails for any string I attempt to read.

Step 9: If I examine the binary of the resource file (which is in the
assembly), the contents indicate that it is for the neutral culture.

What am I doing wrong?

-Ken



Nov 16 '05 #4
Yep, that did it. Basically this indicates that all of the MSDN examples are
wrong! One should use the following as the 'name' of the resource 'file'
that is embedded within the assembly:

_Resources = new
ResourceManager(Assembly.GetExceutingAssembly().Ge tName().Name +
".MyResources", Assembly.GetExecutingAssembly());

-Ken

"Dmitriy Lapshin [C# / .NET MVP]" <x-****@no-spam-please.hotpop.com> wrote
in message news:Om**************@tk2msftngp13.phx.gbl...
.mresource public EnumerationNaming.MyResources.resources
{
}
This is the one you need. Therefore, you should change Step 5 to the
following:

_Resources = new ResourceManager("EnumerationNaming.MyResources",
Assembly.GetExecutingAssembly());

I really cannot explan why VS .NET appends the name of the namespace to

the name of the resource file itself,
it just works this way.
"Ken Allen" <ke******@sympatico.ca> wrote in message
news:%2***************@TK2MSFTNGP11.phx.gbl...
Hmmm. Using ILDASM I can see the file names in the manifest, but it is not
listed in the assembly itself -- at the top level I see MANIFESZT and
"EnumerationNaming" (the name of my assembly/solution), and inside
"EnumerationNameing" all I see is Form1 and the publuc enum "MyStates",
which are all that were defined in the Form1.cs file! In the manifest I see
these lines:

.mresource public EnumerationNaming.MyResources.resources
{
}
.mresource public EnumerationNaming.Form1.resources
{
}

I added the reopsurce file by copying the MyResources.resources file to

the
same directory as the Form1.cs file and then performed an "Add

Existing..."
function to add the file -- and it appears in the solution explorer!

I do not understand!

-Ken

"Dmitriy Lapshin [C# / .NET MVP]" <x-****@no-spam-please.hotpop.com> wrote in message news:uU**************@TK2MSFTNGP12.phx.gbl...
Hello Ken,

Examine the assembly with the ILDASM tool to find out the real name of the resource file. It will most likely be prefixed with the default namespace name.
Therefore, on Step 5, you should specify the name of the resource file as:
"MyNamespace.MyResources"

"Ken Allen" <ke******@sympatico.ca> wrote in message
news:Oc*************@TK2MSFTNGP12.phx.gbl...
> OK, for a number of reasons I have needed to begin experimenting with > resources sooner than I had planned (I had avoided it for now).
>
> Step 1: I built the 'reseditor' application that is in the SDK
> sub-directory, as instructed by the MSDN.
>
> Step 2: I used the 'reseditor' to create a file named
> "MyResources.resources" that contains only some string resources.
>
> Step 3: I added this resource file to my existing test assembly (does not
do
> anything other than test the use of the string resources to generate
> altername 'names' for enumerated values).
>
> Step 4: In the class definition (for my form since that is all there is
in
> this test code), I added "ResourceManager _Resources;".
>
> Step 5: In the constructor for this form I added "_Resources = new
> ResourceManager("MyResources", Assembly.GetExecutingAssembly());" (I
> actually wrapped this in a try/catch block just in case, but the
code does
> not cause an exception).
>
> Step 6: In my code I generate the name of the resource string I want

and > attempt to retrieve it: "result.Append("[Retrieved] " +
> _Resources.GetString(resourceName));" -- I have checked that the

name I
am
> passing is the name of one of the strings in the resource file.
>
> Step 7: I get a MissingManifestResourceException reporting that it

"Could
> not find any resources appropriate for the specified culture (or the
neutral
> culture) in the given assembly."
>
> Step 8: This fails for any string I attempt to read.
>
> Step 9: If I examine the binary of the resource file (which is in

the > assembly), the contents indicate that it is for the neutral culture.
>
> What am I doing wrong?
>
> -Ken
>
>


Nov 16 '05 #5
As I noted, this resolved the problem, but now I am confused on how the
hierarchy of resource files work when one wishes to support more than one
language or dialect (e.g., culture). How do I use a single ResourceManage
that will search all cultures? Particularly, which constructor do I use? Do
I always reference the embedded resource file? Can I have more than one
embedded resource file? If so, how do I use them?

The information in MSDN is very sparse and, as I have discovered, very
misleading.

-Ken

"Dmitriy Lapshin [C# / .NET MVP]" <x-****@no-spam-please.hotpop.com> wrote
in message news:Om**************@tk2msftngp13.phx.gbl...
.mresource public EnumerationNaming.MyResources.resources
{
}
This is the one you need. Therefore, you should change Step 5 to the
following:

_Resources = new ResourceManager("EnumerationNaming.MyResources",
Assembly.GetExecutingAssembly());

I really cannot explan why VS .NET appends the name of the namespace to

the name of the resource file itself,
it just works this way.
"Ken Allen" <ke******@sympatico.ca> wrote in message
news:%2***************@TK2MSFTNGP11.phx.gbl...
Hmmm. Using ILDASM I can see the file names in the manifest, but it is not
listed in the assembly itself -- at the top level I see MANIFESZT and
"EnumerationNaming" (the name of my assembly/solution), and inside
"EnumerationNameing" all I see is Form1 and the publuc enum "MyStates",
which are all that were defined in the Form1.cs file! In the manifest I see
these lines:

.mresource public EnumerationNaming.MyResources.resources
{
}
.mresource public EnumerationNaming.Form1.resources
{
}

I added the reopsurce file by copying the MyResources.resources file to

the
same directory as the Form1.cs file and then performed an "Add

Existing..."
function to add the file -- and it appears in the solution explorer!

I do not understand!

-Ken

"Dmitriy Lapshin [C# / .NET MVP]" <x-****@no-spam-please.hotpop.com> wrote in message news:uU**************@TK2MSFTNGP12.phx.gbl...
Hello Ken,

Examine the assembly with the ILDASM tool to find out the real name of the resource file. It will most likely be prefixed with the default namespace name.
Therefore, on Step 5, you should specify the name of the resource file as:
"MyNamespace.MyResources"

"Ken Allen" <ke******@sympatico.ca> wrote in message
news:Oc*************@TK2MSFTNGP12.phx.gbl...
> OK, for a number of reasons I have needed to begin experimenting with > resources sooner than I had planned (I had avoided it for now).
>
> Step 1: I built the 'reseditor' application that is in the SDK
> sub-directory, as instructed by the MSDN.
>
> Step 2: I used the 'reseditor' to create a file named
> "MyResources.resources" that contains only some string resources.
>
> Step 3: I added this resource file to my existing test assembly (does not
do
> anything other than test the use of the string resources to generate
> altername 'names' for enumerated values).
>
> Step 4: In the class definition (for my form since that is all there is
in
> this test code), I added "ResourceManager _Resources;".
>
> Step 5: In the constructor for this form I added "_Resources = new
> ResourceManager("MyResources", Assembly.GetExecutingAssembly());" (I
> actually wrapped this in a try/catch block just in case, but the
code does
> not cause an exception).
>
> Step 6: In my code I generate the name of the resource string I want

and > attempt to retrieve it: "result.Append("[Retrieved] " +
> _Resources.GetString(resourceName));" -- I have checked that the

name I
am
> passing is the name of one of the strings in the resource file.
>
> Step 7: I get a MissingManifestResourceException reporting that it

"Could
> not find any resources appropriate for the specified culture (or the
neutral
> culture) in the given assembly."
>
> Step 8: This fails for any string I attempt to read.
>
> Step 9: If I examine the binary of the resource file (which is in

the > assembly), the contents indicate that it is for the neutral culture.
>
> What am I doing wrong?
>
> -Ken
>
>


Nov 16 '05 #6
Ken,

I would disagree. The MSDN docs on satellite assemblies and resource
fallback process are pretty consistent.
Take a look at the following:

http://msdn.microsoft.com/library/de...assemblies.asp
http://www.ondotnet.com/pub/a/dotnet.../14/local2.htm
http://msdn.microsoft.com/library/de...calization.asp
http://msdn.microsoft.com/library/de...gresources.asp
"Ken Allen" <ke******@sympatico.ca> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
As I noted, this resolved the problem, but now I am confused on how the
hierarchy of resource files work when one wishes to support more than one
language or dialect (e.g., culture). How do I use a single ResourceManage
that will search all cultures? Particularly, which constructor do I use? Do I always reference the embedded resource file? Can I have more than one
embedded resource file? If so, how do I use them?

The information in MSDN is very sparse and, as I have discovered, very
misleading.

-Ken

"Dmitriy Lapshin [C# / .NET MVP]" <x-****@no-spam-please.hotpop.com> wrote
in message news:Om**************@tk2msftngp13.phx.gbl...
.mresource public EnumerationNaming.MyResources.resources
{
}


This is the one you need. Therefore, you should change Step 5 to the
following:

_Resources = new ResourceManager("EnumerationNaming.MyResources",
Assembly.GetExecutingAssembly());

I really cannot explan why VS .NET appends the name of the namespace to

the
name of the resource file itself,
it just works this way.
"Ken Allen" <ke******@sympatico.ca> wrote in message
news:%2***************@TK2MSFTNGP11.phx.gbl...
Hmmm. Using ILDASM I can see the file names in the manifest, but it is not listed in the assembly itself -- at the top level I see MANIFESZT and
"EnumerationNaming" (the name of my assembly/solution), and inside
"EnumerationNameing" all I see is Form1 and the publuc enum "MyStates", which are all that were defined in the Form1.cs file! In the manifest I
see
these lines:

.mresource public EnumerationNaming.MyResources.resources
{
}
.mresource public EnumerationNaming.Form1.resources
{
}

I added the reopsurce file by copying the MyResources.resources file
to
the
same directory as the Form1.cs file and then performed an "Add

Existing..."
function to add the file -- and it appears in the solution explorer!

I do not understand!

-Ken

"Dmitriy Lapshin [C# / .NET MVP]" <x-****@no-spam-please.hotpop.com> wrote in message news:uU**************@TK2MSFTNGP12.phx.gbl...
> Hello Ken,
>
> Examine the assembly with the ILDASM tool to find out the real name
of the
> resource file. It will most likely be prefixed with the default

namespace
> name.
> Therefore, on Step 5, you should specify the name of the resource
file as:
>
> "MyNamespace.MyResources"
>
> "Ken Allen" <ke******@sympatico.ca> wrote in message
> news:Oc*************@TK2MSFTNGP12.phx.gbl...
> > OK, for a number of reasons I have needed to begin experimenting with > > resources sooner than I had planned (I had avoided it for now).
> >
> > Step 1: I built the 'reseditor' application that is in the SDK
> > sub-directory, as instructed by the MSDN.
> >
> > Step 2: I used the 'reseditor' to create a file named
> > "MyResources.resources" that contains only some string resources.
> >
> > Step 3: I added this resource file to my existing test assembly (does not
> do
> > anything other than test the use of the string resources to
generate > > altername 'names' for enumerated values).
> >
> > Step 4: In the class definition (for my form since that is all there is
in
> > this test code), I added "ResourceManager _Resources;".
> >
> > Step 5: In the constructor for this form I added "_Resources = new
> > ResourceManager("MyResources", Assembly.GetExecutingAssembly());"
(I > > actually wrapped this in a try/catch block just in case, but the

code does
> > not cause an exception).
> >
> > Step 6: In my code I generate the name of the resource string I want and
> > attempt to retrieve it: "result.Append("[Retrieved] " +
> > _Resources.GetString(resourceName));" -- I have checked that the name
I
am
> > passing is the name of one of the strings in the resource file.
> >
> > Step 7: I get a MissingManifestResourceException reporting that it
"Could
> > not find any resources appropriate for the specified culture (or

the > neutral
> > culture) in the given assembly."
> >
> > Step 8: This fails for any string I attempt to read.
> >
> > Step 9: If I examine the binary of the resource file (which is in

the > > assembly), the contents indicate that it is for the neutral culture. > >
> > What am I doing wrong?
> >
> > -Ken
> >
> >
>



Nov 16 '05 #7
Perhaps the online MSDN is more accurate. I must confess that I have
depended mostly on the installed MSDN information since I cannot always
access the internet during development. The installed MSDN is terrible for
inaccuracies as these items are not as clearly addressed there.

-Ken

"Dmitriy Lapshin [C# / .NET MVP]" <x-****@no-spam-please.hotpop.com> wrote
in message news:eR**************@tk2msftngp13.phx.gbl...
Ken,

I would disagree. The MSDN docs on satellite assemblies and resource
fallback process are pretty consistent.
Take a look at the following:

http://msdn.microsoft.com/library/de...assemblies.asp http://www.ondotnet.com/pub/a/dotnet.../14/local2.htm
http://msdn.microsoft.com/library/de...calization.asp http://msdn.microsoft.com/library/de...gresources.asp

"Ken Allen" <ke******@sympatico.ca> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
As I noted, this resolved the problem, but now I am confused on how the
hierarchy of resource files work when one wishes to support more than one
language or dialect (e.g., culture). How do I use a single ResourceManage that will search all cultures? Particularly, which constructor do I use? Do
I always reference the embedded resource file? Can I have more than one
embedded resource file? If so, how do I use them?

The information in MSDN is very sparse and, as I have discovered, very
misleading.

-Ken

"Dmitriy Lapshin [C# / .NET MVP]" <x-****@no-spam-please.hotpop.com> wrote in message news:Om**************@tk2msftngp13.phx.gbl...
> .mresource public EnumerationNaming.MyResources.resources
> {
> }

This is the one you need. Therefore, you should change Step 5 to the
following:

_Resources = new ResourceManager("EnumerationNaming.MyResources",
Assembly.GetExecutingAssembly());

I really cannot explan why VS .NET appends the name of the namespace to
the
name of the resource file itself,
it just works this way.
"Ken Allen" <ke******@sympatico.ca> wrote in message
news:%2***************@TK2MSFTNGP11.phx.gbl...
> Hmmm. Using ILDASM I can see the file names in the manifest, but it
is not
> listed in the assembly itself -- at the top level I see MANIFESZT
and > "EnumerationNaming" (the name of my assembly/solution), and inside
> "EnumerationNameing" all I see is Form1 and the publuc enum

"MyStates", > which are all that were defined in the Form1.cs file! In the manifest I
see
> these lines:
>
> .mresource public EnumerationNaming.MyResources.resources
> {
> }
> .mresource public EnumerationNaming.Form1.resources
> {
> }
>
> I added the reopsurce file by copying the MyResources.resources file to the
> same directory as the Form1.cs file and then performed an "Add
Existing..."
> function to add the file -- and it appears in the solution explorer!
>
> I do not understand!
>
> -Ken
>
> "Dmitriy Lapshin [C# / .NET MVP]" <x-****@no-spam-please.hotpop.com> wrote
> in message news:uU**************@TK2MSFTNGP12.phx.gbl...
> > Hello Ken,
> >
> > Examine the assembly with the ILDASM tool to find out the real
name of the
> > resource file. It will most likely be prefixed with the default
namespace
> > name.
> > Therefore, on Step 5, you should specify the name of the resource file as:
> >
> > "MyNamespace.MyResources"
> >
> > "Ken Allen" <ke******@sympatico.ca> wrote in message
> > news:Oc*************@TK2MSFTNGP12.phx.gbl...
> > > OK, for a number of reasons I have needed to begin experimenting with
> > > resources sooner than I had planned (I had avoided it for now).
> > >
> > > Step 1: I built the 'reseditor' application that is in the SDK
> > > sub-directory, as instructed by the MSDN.
> > >
> > > Step 2: I used the 'reseditor' to create a file named
> > > "MyResources.resources" that contains only some string
resources. > > >
> > > Step 3: I added this resource file to my existing test assembly

(does
> not
> > do
> > > anything other than test the use of the string resources to

generate > > > altername 'names' for enumerated values).
> > >
> > > Step 4: In the class definition (for my form since that is all there is
> in
> > > this test code), I added "ResourceManager _Resources;".
> > >
> > > Step 5: In the constructor for this form I added "_Resources = new > > > ResourceManager("MyResources", Assembly.GetExecutingAssembly());" (I
> > > actually wrapped this in a try/catch block just in case, but the

code
> does
> > > not cause an exception).
> > >
> > > Step 6: In my code I generate the name of the resource string I want and
> > > attempt to retrieve it: "result.Append("[Retrieved] " +
> > > _Resources.GetString(resourceName));" -- I have checked that the

name
I
> am
> > > passing is the name of one of the strings in the resource file.
> > >
> > > Step 7: I get a MissingManifestResourceException reporting that
it > "Could
> > > not find any resources appropriate for the specified culture (or

the > > neutral
> > > culture) in the given assembly."
> > >
> > > Step 8: This fails for any string I attempt to read.
> > >
> > > Step 9: If I examine the binary of the resource file (which is
in the
> > > assembly), the contents indicate that it is for the neutral

culture. > > >
> > > What am I doing wrong?
> > >
> > > -Ken
> > >
> > >
> >
>
>


Nov 16 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Frank L | last post by:
Greetings, I am somewhat puzzled by a difference that occurs when I compile my web application out of VS.NET or if I compile it through NAnt. The issue is with how the resources get compiled into...
1
by: Stefan Turalski \(stic\) | last post by:
Hi, What I need to do is adding some support for resources files to my application. What I did is: MyAppMain <- startup project MyAppHelper <- project which has MyAppResourcesClass (al a...
1
by: Ian | last post by:
Hi there, I need some help if anyone can jump in, i know its something easy but i am just going round in circles. I was following a tutorial here...
1
by: Gianmaria I. | last post by:
Hi, i've got a problem woth localized assembly resources. My app namespace is GM, and i heve 3 languages.. en as default, it and es. So i've created 3 text resources called: Messages.txt...
4
by: Arif Çimen | last post by:
Hi to everybody, I have chnged a button text in design mode. But After compiling and executing the program the text of the button do not change to new value. Any Ideas? Thaks for helps.
2
by: Fredrik Rodin | last post by:
All, I'm having problems with my resource manager in ASP.NET 2.0 after conversion from ASP.NET 1.1. Here is a background: In ASP.NET 1.1 All my user controls and aspx pages inherit from...
0
by: Kleanthis | last post by:
I have a problem, when deploying multilingual applications using cab files on Compact Framework 2.0. It seems that something is going wrong with compact framework 2.0 Below I have a description...
0
by: Fabrice | last post by:
Hello, (Alain) Tis is a part of my code to retrieve text from hastable in memory cache, by reading (befor) a resources file. Thanks for your help. /1/ The resources file * I have create a...
1
by: Nathan | last post by:
We have a project that contains a number of DLLs. One DLL is a library containing User Interface utilities that are used in most of our forms. As we plan to localize all our strings, we've added...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.