471,315 Members | 1,913 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,315 software developers and data experts.

How put source files in sub folder?

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

Dec 15 '05 #1
4 1749

Brett Romero wrote:
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

Dec 15 '05 #2
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

Dec 15 '05 #3
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

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Brett Romero" wrote:
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

Dec 15 '05 #4
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
Brett Romero wrote:
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

Dec 16 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Andy | last post: by
6 posts views Thread by Dustan | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.