Visual Studio managing my project files
-
Dear Sirs, I need my project files to go to the right place. I currently have three projects. Project A depends on Projects B and C, both Class Libraries. Project B has a database file (MDB) in it, which copies properly to Project A's output (either Release or Debug \data) directory. Project C, however, the rogue, has a file in it and it copies to project C (!!)'s output folder. How do I get Project C to cooperate, and send its file (an XNA font file) to Project A working directory? I wouldn't mind so much Project C copying its Content files to its own directory, but it can't find them from there: when the program runs, Project C uses Project A's active directory, so Project C complains, I can't find my file. I look around, and in Project C's directory, there it is, but the Exception says that it's looking in Project A's active directory. I hope I have been clear enough. Thanks in advance for your help. In Christ, Aaron Laws
In Christ, Aaron Laws http://ProCure.com
-
Dear Sirs, I need my project files to go to the right place. I currently have three projects. Project A depends on Projects B and C, both Class Libraries. Project B has a database file (MDB) in it, which copies properly to Project A's output (either Release or Debug \data) directory. Project C, however, the rogue, has a file in it and it copies to project C (!!)'s output folder. How do I get Project C to cooperate, and send its file (an XNA font file) to Project A working directory? I wouldn't mind so much Project C copying its Content files to its own directory, but it can't find them from there: when the program runs, Project C uses Project A's active directory, so Project C complains, I can't find my file. I look around, and in Project C's directory, there it is, but the Exception says that it's looking in Project A's active directory. I hope I have been clear enough. Thanks in advance for your help. In Christ, Aaron Laws
In Christ, Aaron Laws http://ProCure.com
In Project C's properties, go to Build Events tab and use a post-build event command to copy the files to the necessary location.
only two letters away from being an asset
-
In Project C's properties, go to Build Events tab and use a post-build event command to copy the files to the necessary location.
only two letters away from being an asset
Dear Mr. Nischalke, Thank you for your prompt reply. I noticed, however, that Project B (the working project which properly copies its database) doesn't have what you described. Why can Project B work and not Project C?? I'll try your suggestion.
In Christ, Aaron Laws http://ProCure.com
-
Dear Mr. Nischalke, Thank you for your prompt reply. I noticed, however, that Project B (the working project which properly copies its database) doesn't have what you described. Why can Project B work and not Project C?? I'll try your suggestion.
In Christ, Aaron Laws http://ProCure.com
I can only assume that VS know to copy the file as a dependency when you add a reference to the project. The properties of the file are probably set to copy to output.
only two letters away from being an asset
-
Dear Mr. Nischalke, Thank you for your prompt reply. I noticed, however, that Project B (the working project which properly copies its database) doesn't have what you described. Why can Project B work and not Project C?? I'll try your suggestion.
In Christ, Aaron Laws http://ProCure.com
Hi, Dll files may be copied to the output directory by setting the Copy Local property of the reference (right click the appropriate reference in solution explorer). In general any file may be copied by right clicking, selecting properties and setting the Copy to Output Directory property. Alan.
-
Hi, Dll files may be copied to the output directory by setting the Copy Local property of the reference (right click the appropriate reference in solution explorer). In general any file may be copied by right clicking, selecting properties and setting the Copy to Output Directory property. Alan.
All well and good but this doesn't help his problem. This will place the files in the bin folder of the project, not copy them to another location, such as another project's output folder.
only two letters away from being an asset
-
I can only assume that VS know to copy the file as a dependency when you add a reference to the project. The properties of the file are probably set to copy to output.
only two letters away from being an asset
Dear Mr. Nischalke, Thanks for you help. In both projects, B and C, the files in question are set to
Build action | Content
Copy to output directory | TrueIn Christ, Aaron Laws http://ProCure.com
-
Hi, Dll files may be copied to the output directory by setting the Copy Local property of the reference (right click the appropriate reference in solution explorer). In general any file may be copied by right clicking, selecting properties and setting the Copy to Output Directory property. Alan.
Dear Mr. N, I was very hopeful when I read this message, however, the problem-project is already marked
True
at the property in question. Thanks! I'll keep working on it.In Christ, Aaron Laws http://ProCure.com
-
Dear Mr. Nischalke, Thanks for you help. In both projects, B and C, the files in question are set to
Build action | Content
Copy to output directory | TrueIn Christ, Aaron Laws http://ProCure.com
If you want further help, drop the Mr. ;P I've used commands like this to move files within my project folder structure
copy "$(TargetDir)$(TargetFileName)" "../../../Common/$(TargetFileName)"
only two letters away from being an asset