Windows Develop Bookmark and Share   
 index > Windows Forms Sample Applications > Inclusion of "content" files in build... HOWTO?
 

Inclusion of "content" files in build... HOWTO?

I've been trying to accomplish something that it looks like TV is doing in the source.  I have numerous "content" files, things like XSL, XML, RTF, and *.exe.manifest files.  I'd like to include these in my project/solution, and when I build it, these files are simply copied (NOT BUILT or INCLUDED in the DLL/EXE) into the target directory.  Currently, I'm doing this manually when there's a new file.  The problem really comes into play when I want to use an assembly (DLL) in my application... I've been including the entire project for that assembly in the solution and just establishing a reference to the DLL from the dependent project, something I know is wrong.

Can someone please point out how to go about this?  Looks like TV did this with the /obj directory and /bin directory, but I can't determine exactly how they did it.

Thanks!
MigrationUser 1  Monday, February 17, 2003 3:25 PM
Select the file in Solution Explorer, change the Properties entry <b>Build Action</b> to <u>Embedded Resource</u>, and compile. It is interesting to look at the compiled assembly with <b>ILDASM</b>. You will see the full name of your resource.

Use the <b>Assembly.GetManifestResourceStream()</b> method to read the file resource into a stream. 
MigrationUser 1  Tuesday, February 18, 2003 9:38 AM

You can use google to search for other answers

Custom Search

More Threads

• how does issue vision "redraw" screen when spitter is dragged ?
• Has anyone got this working via mobile phone?
• Username and password
• Working of Check Box in DataGridView.
• install IssueVision on client
• Problem with merging assemblies using ILmerge
• Programically selecting an item in DataGridComboBoxCell
• More than 1 creature per Solution
• Receiving Cretaures
• form data refresh