Auto-add files & folders to VS.Net project?

J

Jon Maz

Hi All,

I'm in a possibly unusual situation, that is working alternately on an
ASP.NET web site from two dev computers, one of which has VS.Net installed
on it, the other of which does not. As you can imagine, this is sometimes a
pain in the ...

When I go back to working on the computer with VS.Net installed, I copy any
newly created files and folders from the live server onto the local machine
for further dev work.

However to get them into the now out-of-date VS.Net project I have to use
the Solution Explorer to manually (a) create new folders via "Add -- New
Folder" and (b) add any new files via "Add -- Add Existing Item".

The ideal solution would be that if I place any new files / sub-folders into
a nominated folder that VS.Net "auto-adds" these files / sub-folders to the
existing project.

I'm hoping (but, frankly, not expecting) that someone out there can tell me
how this could be done!

TIA,

JON
 
S

Sahil Malik

It cannot be done (as you might have expected) in VStudio.
Whidbey on the other hand reads it off the file system.

However, you could very easily write a little routine to do this. The
project file is a very simple xml based structure. (open it in notepad and
check it out). You could use a FileSystemWatcher object to monitor the
changes and update the project file as necessary. Cool huh? :)

- Sahil Malik
You can reach me thru my blog at
http://www.dotnetjunkies.com/weblog/sahilmalik
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top