Thursday, August 30, 2012

Adding the contents of an entire folder into a Visual Studio 2010 project

If you'd like to bulk add the contents of an entire folder into the structure of a Visual Studio 2010 project (i.e. JQuery libraries are a perfect example), you'll soon discover that the Add -> Existing Item... route is not the way you want to go.  A quick solution for bulk adding a folder is to do the following actions:

  1. Open Windows Explorer and navigate to the folder you wish to copy
  2. Right-click on the folder and select Copy
  3. Open the applicable Visual Studio 2010 solution
  4. Select the project you wish to copy the folder to
  5. Navigate to the proper location in the project and right-click on the parent location of the folder
  6. Select Paste
The folder and all of it's sub-folders and files will now be copied into the specified location.  I know this seems like it would be obvious, but I seem to experience a moment of "how did I do that last time?" whenever it's been a while since I've created a solution that requires me to do this.  Good stuff!

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.