C
C#16mo ago
alkasel#159

✅ Visual Studio nesting resource files

Hi, I'm using File Nesting In Visual Studio in order to organize files this way:
FileName.razor
FileName.razor.cs
FileName.resx
FileName.en-US.resx
FileName.it-IT.resx
...
FileName.razor
FileName.razor.cs
FileName.resx
FileName.en-US.resx
FileName.it-IT.resx
...

I'm using custom settings with
"allExtensions": {
"add": {
".*": [
".razor"
]
}
"allExtensions": {
"add": {
".*": [
".razor"
]
}

This way I have that FileName.resx is correctly nested under FileName.razor, but FileName.en-US.resx is not nested. Could you please help me understand how should I correct the settings file?
File nesting rules for Solution Explorer - Visual Studio (Windows)
Learn about Solution Explorer file nesting rules, presets, and customization.
2 Replies
Accord
Accord16mo ago
Looks like nothing has happened here. I will mark this as stale and this post will be archived until there is new activity.
alkasel#159
alkasel#15916mo ago
In the end I was able to accomplish it by means of the following content inside the configuration file:
"extensionToExtension": {
"add": {
".resx": [
".razor"
],
".en.resx": [
".resx"
],
".it.resx": [
".resx"
]
}
},
"extensionToExtension": {
"add": {
".resx": [
".razor"
],
".en.resx": [
".resx"
],
".it.resx": [
".resx"
]
}
},
Of course is not a great way to deal with it since it requires continuous work to add languages, but at least it works