File Nesting


Automatically nest files based on file name and enables developers to nest and unnest any file manually

(50) Review
Visual Studio
2015, 2013
Download (186,075)
E-mail Twitter Digg Facebook
Add to favorites
Reviews (50)
Q and A (29)
Sign in to write a review
Sort by:

by Steve Wenzel | Tue 1:43 PM

by steveculshaw | September 22 2016

Excellent utility ... yeah, no more manual editing the csproj file :-)

by Maxime Briziarelli | September 15 2016

Requires "Visual Studio MPF 11" to get updated to the last version and not compatible with Node Tools For Visual Studio.

by Michael A. Duncan | August 17 2016

Won't allow .xaml files to be the parent.

by FahadZ | August 07 2016

Best extension ! helped me structure my projects!

by 霍姚远 | July 26 2016

by Jozef Izso (BizSpark member) | June 29 2016

by Miro Jeliaskoff | June 21 2016

by tinnvec | June 07 2016

Used to be great, however there was a bug with VS2013 and instead of fixing it, the author simply dropped support for the 2013 edition. Very poor choices unless the intention was to alienate users.

by MiguelLira | June 02 2016

Great extension! For those running into the "VSPackage" did not load correctly issue. You should either wait until Mads publishes 2.4.59 or download it from here:

by Morilon | May 15 2016

It's excelent, but, it's not working anymore. VSPackage problem.

by erzketis | May 03 2016

I started getting "The 'VSPackage' did not load correctly." message when opening my solution. The worse part is that author used 'VSPackage' name in the .pkgdef which also shows up in the ActivityLog.xml. Had to go through all my extensions and find the one causing problem by GUID. Using correct name would make this way easier.

by PeeVeeGee | April 13 2016

by 柳永法 | April 11 2016


by Selcuk Demir | March 31 2016

This extension is amazing with "Web Application Projects". But it does't work with "Web Site" in Visual Studio 2015. I mean "File>New>Web Site..."

Mads Kristensen March 31 2016
| Edit |

Website project doesn't support dynamically nested files unfortunately. Web Essentials will do some static nesting, but it is very limited

by WisdomGuidedByExperience | March 05 2016

Updated 2016-03-05 - *STILL* does not work for NodeJS projects (file extension .njsproj)

Updated 2015-07-14 - does not work for NodeJS projects (file extension .njsproj), so you cannot perform the following

--- abc.js

If I cannot nest files using this tool for NodeJS projects, it is of limited use to me and my team.

by atverweij | February 21 2016

Microsoft should add this to the standard Visual studio implementation!

Great tool !

by Andre P F Vianna | February 09 2016

That's a very useful extension. I use it a lot to organize my classes. Very useful divide big classes (like controllers) in smaller partials that can help identify the manage the content.

But it gets only 4 out of five because there is a functionality that I miss. I can't rename a nested file (from the right click menu in solution explorer). I don't know if this is a VS limitation or the extension itself. But if I could rename the file the extension would be perfect.

Here is a sample of what I do with my files:

FooController.cs -> partial class constructor, privates and decorations
- FooController.Index.cs -> Only the Index related actions
- FooController.Edit.cs -> Only the Edit related actions

Sometimes I need to rename the middle part of the name. And for now the only way to do it is opening the containing folder and renaming the file there. That creates a few inconsistencies in the source control if you are using TFS. Nothing bad, but a little inconvenient.

Anyway I still strongly recommend using the extension.

by Robert Hoffmann | January 04 2016

Awesome tool, nice useful stuff from Mads as usual.

Only thing i'd like to see, is the ability for it to work in a simple website, since our designers simply mount a static website to work on design stuff. WebCompiler, Bundler and other extensions work in this project type.

Thanks for your great tools !

by Jhonny Li | December 09 2015

A nesting/grouping feature is somthing Ive wanted for a long time in VS. File Nesting does that.
Its a nice clean product, easy to use.
I only give a 4/5 because I feel that its missing an option to make your own "virtual" folders that you can name and store files in.
Other than that I really like the product!

1 - 20 of 50 Items   
Sign in to start a discussion

  • Manual nesting options disabled
    1 Posts | Last post October 14, 2016
    • Mads, or others, are you aware of reasons I would see both "Nest item" and "Un-nest item" grayed out when I select "File Nesting" from the context menu? I am trying to nest .rdl (SSRS report) files in order to visually organize sub-reports under main reports. While most examples that I've seen here are for different types of programming projects, I don't see anything in the description to indicate that File Nesting does not work with Reporting Services projects also. Are there other extensions that interfere with File Nesting? I am eager for this functionality -- please help me troubleshoot?
  • Support of NTVS ?
    1 Posts | Last post September 10, 2016
    • As far as I know, this extension doesn't work on Node Tools for Visual Studio projects. But typically, in these projects, you will find .ts, .tsx, .jsx, .js and .min.js or .less, .sass, .css and .min.css files that can be potentially nested. Do you plan to support those Node Tools projects ?
  • Visual Studio MPF 11 needed ?
    1 Posts | Last post September 10, 2016
    • When I try to update to the latest version 2.5.63 using "Extensions and Updates", a "Dependency Alert" window opens telling me that I need "Visual Studio MPF 11.0". This has never happened before. Is it really necessary ?
  • Any way to nest linked items?
    1 Posts | Last post June 09, 2016
    • I have linked items in my project but it seems I cannot nest them. Any ideas?
  • It is broken
    2 Posts | Last post May 25, 2016
    • Hi Mads
      This is not longer working on Visual studio 2013, does nothing automatically or manually.
      Any idea ?
    • I have the same problem ...  nothing working 
  • For VS Code!
    1 Posts | Last post April 28, 2016
    • I love this extension. Mads Kristensen, you make my two favorite extensions (command line and file nesting)
      It would be so awesome if you ported this file nesting functionality over to VS Code. It displays everything in a flat list right now.
  • Error
    6 Posts | Last post April 27, 2016
    •   <entry>
          <time>2016/04/15 21:20:12.039</time>
          <description>SetSite failed for package [VSPackage][Could not load file or assembly &apos;VsixLogger, Version=, Culture=en-US, PublicKeyToken=null&apos; or one of its dependencies. The system cannot find the file specified.]:{   at MadsKristensen.FileNesting.VSPackage.Initialize()&#x000D;&#x000A;   at Microsoft.VisualStudio.Shell.Package.Microsoft.VisualStudio.Shell.Interop.IVsPackage.SetSite(IServiceProvider sp)}</description>
          <errorinfo>Could not load file or assembly 'VsixLogger, Version=, Culture=en-US, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.</errorinfo>
      Just started getting this today, any suggestions?
    • Me too.
    • I'm having the same issue. I had to disable "File Nesting".
    • Sorry about that. It should now be fixed in version 2.3.54
    • I can confirm the problema is fixed in v2.3.54. You can't imagine how useful is this tool for me. Thanks!
    • I keep getting a similar, show-stopping error (3 entries follow)
          <time>2016/04/27 17:55:56.149</time>
          <description>Begin package load [VSPackage]</description>
          <time>2016/04/27 17:55:56.155</time>
          <description>CreateInstance failed for package [VSPackage]</description>
          <errorinfo>Could not load file or assembly 'Microsoft.VisualStudio.Shell.11.0, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.</errorinfo>
          <time>2016/04/27 17:55:56.155</time>
          <description>End package load [VSPackage]</description>
          <hr>80004005 - E_FAIL</hr>
          <errorinfo>Could not load file or assembly 'Microsoft.VisualStudio.Shell.11.0, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.</errorinfo>
      I've tried un/reinstalling the extension and even visual studio itself, but to no avail. I'm using VS2013 Ultimate
  • ASP.NET 5 .less files under .html
    1 Posts | Last post April 05, 2016
    • I am trying to nest .less files under .html files in an Angular 2, ASP.NET 5 project. 
      By default in a ASP.NET 5 projects .js files nest under .ts files, .ts files nest under .html files, and .css files also nest under .html files. This is a very nice structure until you try to use less. .less files won't nest under .html files. 
      Does this extension support ASP.NET 5 projects ? How could I nest .less files under .html files ?
  • Nest .cpp and .h/.hpp
    1 Posts | Last post March 26, 2016
    • Is it possible to nest .cpp files under .h/.hpp files for Visual C++ projects?
      I am using Visual Studio 2015. If so, how to achieve this?! 
      First time I saw this extension I thought I could add some kind of regex-rule, hehe. 
  • Why are .ts files nested under html?
    2 Posts | Last post February 10, 2016
    • Why are the typescript files nested under html files in the KnownFileTypeNester?
    • Agreed ! need the possibility to nest js file under ts file. 
1 - 10 of 29 Items