Solved

How do you retrieve the names of embedded resources

Posted on 2012-03-09
3
328 Views
Last Modified: 2012-03-13
Hello

(Language C#, Visual  Studio 2005)

This is driving me nuts because it is something I've done before but can't recreate. I'm trying to:
1. Get the full path to where the embedded resources are.
2. Get the names of the embedded resource files.

using code-
            System.Reflection.Assembly thisExe =
            System.Reflection.Assembly.GetExecutingAssembly();
            string[] resources = thisExe.GetManifestResourceNames();

Almost gets me the names of everything including:
[programname].Properties.Resources.resources

But I can't retrieve the file names that are contained within the ".resources"

Thanks a lot (and please don't forget about question 1)
0
Comment
Question by:KevinBengo
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 96

Expert Comment

by:Bob Learned
ID: 37705024
If you have the full resource name, you might be able to use Assembly.GetManifestResourceStream, and use an appropriate stream reader to get the contents.
0
 
LVL 42

Accepted Solution

by:
sedgwick earned 500 total points
ID: 37713599
try this:

System.Reflection.Assembly.GetExecutingAssembly().GetManifestResourceNames();

here's a tutorial:
http://hajloo.wordpress.com/2009/12/14/%E2%80%AAhow-to-read-embedded-resource-in-c/
0
 

Author Closing Comment

by:KevinBengo
ID: 37716567
Thanks. It was helpful
0

Featured Post

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If your system is showing symptoms of browser hijacks or 'google search redirects' check out my other article (http://rdsrc.us/u3GP7A) first and run the tool TDSSKiller (http://rdsrc.us/GDBBs4) to get rid of the infection. Once done, and if the …
User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question