2

This seem to only occur in asp.net project with wwwroot folder.

How can I configure that behavior?

I do not want that .html appear as parent, buth .js and js.map together are fine.

enter image description here

mbudnik
  • 2,087
  • 15
  • 34
Pascal
  • 12,265
  • 25
  • 103
  • 195
  • What version of VS are you using? – roydukkey Feb 17 '16 at 21:56
  • I use VS 2015 Update 1 – Pascal Feb 17 '16 at 22:04
  • http://stackoverflow.com/questions/31670209/typescript-html-js-file-nesting-in-visual-studio-2015 – vinjenzo Feb 18 '16 at 08:16
  • @vinjenzo Thanks for the link, but that does not explain why my files outside the scripts/typescript folder are nested. I move them there with gulp tasks. They are not created/added manually under wwwroot. – Pascal Feb 18 '16 at 21:17
  • Firstly tell how did you create adminstation.html as parent and js & jsmap files as its childrens? – Mithun Pattankar Mar 07 '16 at 15:56
  • the administration.html was created there manually. The .js and .map were copied over there from the TypeScript scripts source folder. – Pascal Mar 09 '16 at 17:58
  • Isn't it just a feature? There are more people with this issue: https://visualstudio.uservoice.com/forums/121579-visual-studio-2015/suggestions/10924407-option-to-disable-file-nesting-in-asp-net-5-mvc – Danny van der Kraan Mar 10 '16 at 08:22

1 Answers1

0

The simplest way is to rename the nested files. They are only nested if they have the exact same name before the dot. Just put an underscore before the name or another prefix you like.

Remember: You need to rename them outside of Visual Studio.

Normally JS and CSS files are stored in separate folders. That would also solve your problem. I guess this is the better way to do it.

fyi: For other project types, there is a Visual Studio Extension, which modifies the nested state. Maybe this will be updated, once Asp.Net Core is finally released.

File Nesting Extension for Visual Studio

Thre is also an open issue on GitHub