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
 
Joined
Nov 15, 2006
Messages
1
Reaction score
0
auto add files and folders in vs.net

hello
if you want copy files from e:\foledr2 to folder1 in your vs.net projects

first you copy this files from your windows explorer window then (right click->copy) and then
you go to your rrot directory like
c:\my documents\visulstudi2005/websites/foledr1

and paste them

now you click the refresh button on solution explorer in your vs.net project
you see this files.
:tea:
 
Last edited:

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

Members online

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,143
Latest member
SterlingLa
Top