Visual Studio tries to add parent directory files to a project located in a subfolder

Hi guys, I am having trouble getting code to build and debug in VS2008. Basically, the project is in a subfolder and tries to access the .ascx files in a folder with two folders in the hierarchy, that is: the project is in // website / source / current / project file and tries to access the file in // web website / usercontrols.

How can I get these files in my workspace in the solution folder, and therefore the application can really build? Also, is there a way to do this by adding the entire usercontrols folder instead of file by file?

Thanks guys,

+4
source share
1 answer

You cannot add an existing folder, but you can add several existing items at the same time. When you select "Add Existing Elements", you can select multiple files in the dialog box. By default, this will copy the item to the project directory if it is outside of it.

If you do not want to add the actual files to your project as a copy, you can add them as a link.

Add a new folder to your project. Then select "Add an existing item ...", go to the folder with several levels up, select all the files in the folder that you want to add, and click the small drop-down button on the "Add" button. Then select "Add as link."

alt text http://img19.imageshack.us/img19/4343/9132009103548pm.png

Files will be associated with your project, but will not be physically copied. Make sure your namespaces are correct.

+5
source

All Articles