Makla
Makla

Reputation: 10459

Visual Studio 2017 remove/disable file nesting

Is it possible, and if yes how, to remove/disable file nesting for specific file types.

In my case I do not want that .ts files are nested beneath .html files. All I found is this request. Did someone figure it out how to do it?

Upvotes: 2

Views: 1106

Answers (2)

JOpuckman
JOpuckman

Reputation: 1376

Visual Studio 2017 v.15.6.0 appears to have changed the file name to .filenesting.json.

I'm using Enterprise edition. Your mileage may vary.

C:\Program Files (x86)\Microsoft Visual Studio\2017\{YOUR-VS-VERSION}\Common7\IDE\Extensions\Microsoft\Web Tools\ProjectSystem\.filenesting.json

Upvotes: 1

davidmdem
davidmdem

Reputation: 3823

You can prevent this by manually editing Visual Studio's toolSettings.json file found at

C:\Users(youruser)\AppData\Local\Microsoft\VisualStudio\15.0_(yourinstanceid)\toolSettings.json

Removing the .ts array from the extensionToExtension section will prevent them from nesting under HTML documents. You can do this for .js and .css files as well.

Note that this may be reset during a Visual Studio re-install or update.

Upvotes: 5

Related Questions