How is the same filename cascading named in visual studio project

262 Views Asked by At

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

1

There are 1 best solutions below

0
On

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