The scenario is, I want to add a folder which contains several Document files containing instructions. How can I select an entire folder and it's contents to be included when Setup is run.
Asked
Active
Viewed 1.1k times
6

Yan Sklyarenko
- 31,557
- 24
- 104
- 139

Shamim Hafiz - MSFT
- 21,454
- 43
- 116
- 176
-
The links in the answer to this question: http://stackoverflow.com/questions/6839320/how-to-run-a-batch-script-after-installation-is-finished may help. – Donotalo Feb 10 '12 at 11:31
-
Look here: [http://stackoverflow.com/a/4522487/786805](http://stackoverflow.com/a/4522487/786805) Much easier then envisioned. – Dmitry Jul 18 '12 at 20:29
2 Answers
17
You can drag and drop the out side folder to Setup directory structure. Then it will add all files within it WITH FOLDER STRUCTURE.
But, be careful, once you add the folder with sub, folders, large folders added by mistake requires files by folder to folder delete.

Chand Priyankara
- 6,739
- 2
- 40
- 63
-
+1 for the delete hint, it just happened to me and had to start the project from scratch. Ridicuolous lack of functionality... – MazarD Mar 23 '14 at 22:34
-
This correctly answer the question. Creating the folders and subfolders by hand isn't a viable option. – Mar 22 '18 at 12:10
-
What i ended up with to prevent the delete situation, is backup the .vdproj - file before adding the folder, and to remove the folder use winmerge to remove it from the current version (closing visual studio for that process). – fiffy Jan 17 '20 at 09:12
-
After spending an entire month to find a solution, I finally got this! Thanks a ton! This works. – Abhay Bh Mar 22 '21 at 07:39
-
1to delete: open the project file in the text editor. find the node by "Find text" tool. Use notepad++ to collapse the node or Use brace highlight to highlight start and end brace. delete. – Asif Ashraf Nov 10 '21 at 01:03
-
Adding the folder to the setup project directory didn't do anything for me in VS 2019. Edit: Ah, you have to do it in VS. – user2924019 Mar 23 '22 at 09:54
6
You can go to the contents you want in Windows Explorer, copy the items (include sub-folders), then return to visual studio setup project in View->FileSystem and paste these in your desired folder

lupok
- 1,025
- 11
- 15
-
1This was a better solution for me as I run Visual Studio as Admin, so Drag and Drop from Explorer is not supported. – Tom 'Blue' Piddock Dec 19 '16 at 17:08