This project is read-only.

Creating New Project Folders

Nov 11, 2011 at 2:00 AM

On twitter, Shane asked:

Is it possible to create a folder in a VS project using StudioShell?

Yes, it is; the example code below adds a new folder named MyFolder to the project named MyProject:

new-item -path dte:/solution/projects/MyProject -name MyFolder -type folder

The example assumes the following:

  • Your currently open solution has a project named "MyProject"
  • The project does not already contain a folder named "MyFolder"
Nov 11, 2011 at 2:06 AM

I've added this to the examples documentation page as well (

Nov 11, 2011 at 5:44 AM

Awesome, thanks for helping with this - I figured out the difference. I am able to create a folder at the top level of a project using the example you've provided, but I can't create a folder inside of another folder using that syntax. How would I do that?

Nov 11, 2011 at 1:49 PM

Verified - looks like a bug.  I've opened an issue here [workitem:23] and will try to get this in the upcoming 1.2 release.