Click here to Skip to main content
15,891,033 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want my windows form program when installed, it will have a folder of files. My windows form program copies these files to a directory. So when making the deployment one click package thing, how do I make it so it takes the folder too?

This folder consist of files for a console program and an XML document.

EDIT:

I might make folders in the resource folder and add files through there. Hope it works. Hope it supports all my files!
Posted
Updated 4-Aug-11 12:09pm
v2

You answered your own question. Add the files as resources in your app, and extract them to the user's data folder.
 
Share this answer
 
Comments
Member 8015046 4-Aug-11 18:30pm    
Hahaha I guessed at that one. But extract them to the user's data folder. I will do that!
Member 8015046 4-Aug-11 18:34pm    
How do I extract them to the user's data folder?
Dr.Walt Fair, PE 4-Aug-11 20:54pm    
If you create a setup project, just add the files and directories you need. When the program is installed, the directories will be created and files placed in them.
You can create a resource *.resx and add files to it; in these case the files will be automatically added to the project as well, in the resource file the referenced to these files will be added. But on the build output, the files won't be copied to output directory (by default, you can change it). The files will be embedded in your executable file as resource, so external files are not needed.

You probably need just to copy some files from project to output directory (or sub-directory of it). For this purpose, you just need to add some external files to the project itself through "Add new item" (in Solution Explorer's project tree). The external files will be copied to the project. On build, the files then will be copied by default. You can go the the Properties of the project node representing the file and specify what to do with the file on build — there are few options. You will see.

—SA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900