Click here to Skip to main content
15,893,644 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I'm using Visual Studio 2010 Ultimate and I have audio files inside of my Resources folder and I'd like to add this file to application (exe) install directory/path. How do I go about having this folder added the install path during installation?

Thanks in advance.
Posted
Comments
OriginalGriff 13-Nov-13 10:55am    
Don't post the same question twice - I have deleted the spare.

The Resources folder in your project does not get deployed with your .EXE. It normally contains the various files that are compiled into your .EXE as resources. Adding this folder to your installer is meaningless as the .EXE will not do anything with it unless you've coded something to specifically look in that folder for various files. You can NOT just add files to the folder on a deployed machine and expect the .EXE to treat those files as resources as you normally treat and access resources in your code.
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 13-Nov-13 13:20pm    
Correct, a 5. I added some extra explanation in Solution 2, please see.
—SA
I would add to the Solution 1:

The build step for a file included in the project is controlled by the Properties page for the corresponding node. When a file is added to an embedded resource, it is marked as "resource" and "do not copy" (to the output directory). If you want a file to be copied to output directory, you should load the property page and modify it appropriately. But of course, it would be totally pointless to have the same file put in the resource embedded in the executable module, and a copy of it in the output directory. You need chose one or another way. One benefit of the embedded resource is: the user won't be able to modify it.

As to the installation, it should only deal with files placed as a result of the build in the output directory. All other files are considered as source code (of course, only if the project is put together correctly) and should be invisible to the installation. That is, installation should never use any source code files.

—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