Resource folders

  • Thread starter Thread starter fhunter
  • Start date Start date
F

fhunter

This is a bit more of a Visual Studio question, but it is
still related to PocketPC and Smartphone development
specifically.

I would like to store my resources inside folders. I know
how to add a resource to the project and set the Build
Action to Content. I know I can add folders to the
project and place the resources inside this folders. But
these folders are not "packaged" to the actual
application. All the resources are stored at the same
level regardless of what folder they come from. How can I
store my resources inside folders? Any ideas?

Thank you in advance.
 
One workaround is to have multiple projects within your solution, each with
a separate destination folder. However this becomes difficult when you want
to create a cab for the project as you will need to set the inf file (used
to generate the cab files) up manually to add these files and their correct
destination locations.

For debugging you can write a method in your application which checks for
the existence of the content files and if not found copies them to the
correct location from the application directory - using the standard
System.IO.File methods.

Peter
 
Thanks so much for the answer Peter,
Looks like the right answer for me is to turn the
resources into build type "Embeded resources". Which
makes sense. That solved my problems.

Thanks
 
Back
Top