File Nesting


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

(47) Review
Visual Studio
2015, 2013, 15
Download (145,911)
E-mail Twitter Digg Facebook
Add to favorites
Reviews (47)
Q and A (26)
Sign in to write a review
Sort by:

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!

by Scott Nimrod | November 16 2015

This does not appear to be supported in F#.

by VictorPerez | October 26 2015


by Mr Yossu | October 08 2015

I selected two files, the one I want to nest, and the one I want as a parent, and choose to nest. The dropdown that shows the parent files showed every file in the folder EXCEPT for the one I wanted to use as a parent!

First off, I would have expected it to show me only those files I selected, otherwise why did I bother selecting the parent, and second why doesn't it show me the one I want to use as a parent?

Asked question, but the author didn't bother replying.

Edit 8th Oct '15
@Aneesh_Aravind - thanks for the tip. Would have been nice if the documentation had made that clear. Not a very intuitive way to do it, but at least it works!

I'll modify my rating. Thanks again.

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

  • 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. 
  • feature request: preselect most likely parent candidate
    1 Posts | Last post February 03, 2016
    • it would be nice, if the most likely parent gets auto selected, so i dont have to search the whole list for most of the use cases...
      But great plugin so far!
  • Option to disable file nesting in ASP.NET 5 / MVC 6 projects
    1 Posts | Last post December 01, 2015
    • Can we please have an option to DISABLE the auto file nesting in ASP.NET 5 / MVC 6 projects? In some folder structures it can be extremely annoying - for example, if the folder itself already represents a group of related files, in which case the additional nesting becomes highly frustrating.
      Also, the auto nesting is highly inconsistent:
      It nests .css, .js and .ts under .html, but for some reason .less and .scss are not nested, despite the fact that they are conceptually exactly the same as .ts - they just compile to .css instead of .js.
      There really need to be an option to disable this - please, at the very least, can you add such an option to this plugin? or even better, could we have it as an option in Visual Studio itself?
  • MVVM file nesting
    1 Posts | Last post November 19, 2015
    • I'm working on MVVM project where I have a folder for ViewModel and View. I want to be able to nest The ViewModel inside the view event if it's from another folder. Can I do that and can I do autonest on that? 
1 - 10 of 26 Items