Is there a way to easily add many existing files to an asp.net project?

R

Robert Jones

I have an asp.net web site that I want to develop further, but I don't have
the Visual Studio project files for the site.

I have all the source files for the site (aspx, cs etc) and the site itself
is running quite happily on my development web server, however within Visual
Studio the only way to add an existing file has two problems:

1. You can only add one file at a time
2. You don't appear to be able to navigate into subfolders where all of my
existing project files are.

I can see from investigating the visual studio project files that the files
appear to be held in the .csproj file, so I assume it would be possible to
write something to generate the <files> section:

<Files>
<Include>
<File
RelPath = "AssemblyInfo.cs"
BuildAction = "Compile"
/>
<File
RelPath = "Global.asax"
SubType = "Component"
BuildAction = "Content"
/>
<File
RelPath = "Global.asax.cs"
DependentUpon = "Global.asax"
SubType = "Code"
BuildAction = "Compile"
/>

However I am looking for either a utility that can already do this (and of
course it would have to be able to calculate the "DependentUpon" entries
too) or some way for Visual Studio to "import" a web site.
 
K

Ken Cox [Microsoft MVP]

Hey Robert,

Maybe this is too simplistic, but I don't think you're right about the
capabilities of adding files.

1. Open a VS.NET project on your machine.
2. Map a drive to the development Web server and location of the files.
3. Using Windows Explorer, select the files and folders you want to add.
4. Drag and drop the files and folders into the project in the Solution
Explorer pane.

That adds them en masse.

Ken
 

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,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top