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

Discussion in 'ASP .Net' started by Robert Jones, Apr 3, 2005.

  1. Robert Jones

    Robert Jones Guest

    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.
     
    Robert Jones, Apr 3, 2005
    #1
    1. Advertising

  2. 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

    "Robert Jones" <> wrote in message
    news:%...
    >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.
    >
     
    Ken Cox [Microsoft MVP], Apr 3, 2005
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. jai hanuman
    Replies:
    0
    Views:
    439
    jai hanuman
    Jun 15, 2004
  2. =?Utf-8?B?TWFya3VzUG9laGxlcg==?=

    Creating ASP.NET projekt within existing ASP project

    =?Utf-8?B?TWFya3VzUG9laGxlcg==?=, Jul 21, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    407
    =?Utf-8?B?TWFya3VzUG9laGxlcg==?=
    Jul 21, 2005
  3. Gunter Hansen
    Replies:
    10
    Views:
    41,839
    Paul Hamaker
    Apr 3, 2006
  4. sin kanti
    Replies:
    2
    Views:
    95
    Wesley J. Landaker
    Apr 10, 2005
  5. Ted Byers
    Replies:
    23
    Views:
    424
    Peter J. Holzer
    Nov 15, 2008
Loading...

Share This Page