This project has moved and is read-only. For the latest updates, please go here.

New Python console project, existing sources

Apr 22, 2011 at 8:01 AM


I currently have a project written in python, and wanted to add it to VS. 

I however cannot figure out how to add all my files to the solution, while keeping them in a seperate directory, is this even possible? I've previously used netbeans and eclipse and they have been able to do so.

Basically, i want my source code and its directory structure be stored elsewhere, as this is how it is setup in the source control system, i have /src/core, /src/plugins/ and /src/ directories with code in them.


I have tried to set this this up in VS by doing the following

New Solution -> New Python console application -> Add new folder (src) -> new folder (core) -> new folder (plugins) -> add existing items (all items from /src/core) -> add existing items (all items from /src/plugins), and so on.


The problem with this is that VS copies all the files into the project folder, which is not what i want... I hope this is clear enough, and hopefully im not missing something blatantly obvious. 



May 4, 2011 at 4:51 AM

You can probably accomplish this by editing the .pyproj file to have the correct relative paths to your files in source control.  In general VS is pretty based upon having the files at or below the same level as the project (e.g. in /src or multiple projects in each dir) so you can't really do it from the UI.

May 4, 2011 at 5:00 AM

I should of updated my post, but yes this is exactly what i did to sort out the issue. Editing the project file was the only way i managed to get it to work. 


Thanks for the reply.