how to move resource file from one project to another?

J

jerryxu7509

Hello,

I am resource files embeded in a web project, in which I can use for
example:
string a=Resources.labels.edit

I am writing a windows app with very similar function, I copied over
the resource files and included them in my windows project, and trying
to use:
string a=Resources.labels.edit. But it complains Resources can't be
found.
I add System.Resources as reference, but it says can't find
Resources.labels.edit.

So I am thinking I can't just simply copy the resource file over? But
I am not sure what is the next step I should do.

Can someone help me?

Many Thanks

Jerry
 
I

Ignacio Machin ( .NET/ C# MVP )

Hello,

I am resource files embeded in a web project, in which I can use for
example:
string a=Resources.labels.edit

I am writing a windows app with very similar function, I copied over
the resource files and included them in my windows project, and trying
to use:
string a=Resources.labels.edit. But it complains Resources can't be
found.
I add System.Resources as reference, but it says can't find
Resources.labels.edit.

So I am thinking I can't just simply copy the resource file over? But
I am not sure what is the next step I should do.

Can someone help me?

Many Thanks

Jerry

Hi,

When ever I have problem finding a named resource I simply iterate on
them using GetManifiestResourceNames and look for it, remember that
the resource name has the namespace as part of the name
 
I

Ignacio Machin ( .NET/ C# MVP )

Hello,

I am resource files embeded in a web project, in which I can use for
example:
string a=Resources.labels.edit

I am writing a windows app with very similar function, I copied over
the resource files and included them in my windows project, and trying
to use:
string a=Resources.labels.edit. But it complains Resources can't be
found.
I add System.Resources as reference, but it says can't find
Resources.labels.edit.

So I am thinking I can't just simply copy the resource file over? But
I am not sure what is the next step I should do.

Can someone help me?

Many Thanks

Jerry

Hi,

When ever I have problem finding a named resource I simply iterate on
them using GetManifiestResourceNames and look for it, remember that
the resource name has the namespace as part of the name
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top