Managing resources across desktop and CF?

G

google.com

I see that resource files cannot be shared between the desktop and the
CF, so I'm not trying to do that. I am, however, just trying to manage
my resource files and am having trouble. How are others doing this?

I've got my c# source files in one directory, and they are shared
across the 2 platforms. Some of my classes are forms, so VS.Net
automatically generates a resource file for those classes. I can't
seem to figure out how to stop this behavior or to customize it.

If I could tell VS to look for my resources in a subdirectory, for
example, i could put resx files for the CF in one subdirectory, for
the desktop in another. I'd have two project files - one for each
platform - that indicated which subdirectory to use. Alternatively, if
I could tell VS to use a certain naming scheme (for example,
"<name_of_c#_file> + <project-defined_extension> + .resx", i'd be okay
too. Or if I could prevent the auto-generation of resx files
altogether, I could create and manage my own resources files.

Do these options exist in VS.Net? or maybe there's another approach
that I'm missing. any thoughts?

thanks,
ken
 
J

Jan Yeh [MVP]

Hello, Ken

I am not sure that I really understand your situation, but some
suggestions for you. Hope that help..

You can link your resource files in your project, instead of adding
them. Try right-click in the solutin explorer, choose "add.." -
"Add existing items..", select the files your want and change Open
to Link these files. They will be added in your project as linked files,
but not copied to your project folder.

If you do not want VS.NET to generate .resx files of forms, you may
write your code as Class files, instead of Windows Forms. You can
copy all codes in Form1.cs, and delete Form1.cs and Form1.resx,
and then add a Class file as Form1.cs. Just paste codes back and run it.
It still works!!

Anyway, hope these hints helps...

--
Best Regards,
Jan Yeh

eMVP, MCAD, .NETcf Developer
Mobile Mind Company @ Taiwan
http://blog.mvpcn.net/janyeh
 

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