How put source files in sub folder?

  • Thread starter Thread starter Brett Romero
  • Start date Start date
B

Brett Romero

I've created a sub folder named Source. I then removed my CS files
from the project/solution, moved them into Source and added them back.
After building, they are again in the root folder. I don't see a place
in the configurations to keep this from happening.

Any suggestions?

Thanks,
Brett
 
Brett said:
I've created a sub folder named Source. I then removed my CS files
from the project/solution, moved them into Source and added them back.
After building, they are again in the root folder. I don't see a place
in the configurations to keep this from happening.

I'm not sure what you are asking. You can simply create a new folder
in the project, if you want to put files in it. Right click on the
project,
select Add | New Folder and it will create a folder for you in the
project.
Then just add the files from that folder into your project folder.

Does that answer your question?

Matt
 
Yes - that works. You just can't add an existing folder or reference
files in an existing folder that isn't in the project and expect those
files to remain in the folder.

Thanks,
Brett
 
Brett,
Actually I think you can. If you click the "Show All Files" icon at the top
of solution explorer, you can right-click on your externally created folder
and choose "Include in project".
Peter
 
Brett -
Click Add Existing file from the project right-click menu. When you
select your file, click on the little drop-down next to the Open/Add
button (don't click the Open/Add button yet) and choose "Add as Link".
That way it will not copy the file from its current location to your
project folder, but it will still be included when you build your project.

Joshua Flanagan
http://flimflan.com/blog
 
Back
Top