In Visual Studio 2008 you could add registry entries so that X.aspx.js or X.aspx.css would show up as nested underneath X.aspx. I would use the following registry file to accomplish this for web sites as well as web apps:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\9.0\Projects\{E24C65DC-7377-472b-9ABA-BC803B73C61A}\RelatedFiles\.aspx\.js]
@=""
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\9.0\Projects\{E24C65DC-7377-472b-9ABA-BC803B73C61A}\RelatedFiles\.aspx\.css]
@=""
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\9.0\Projects\{FAE04EC0-301F-11d3-BF4B-00C04F79EFBC}\RelatedFiles\.aspx]
".designer.cs"=dword:00000002
".cs"=dword:00000002
".js"=dword:00000002
".css"=dword:00000002
I replaced 9.0 with 10.0 and applied the changes to my registry, but that's didn't do it. I have restarted VS as well as my computer, and I've also tried readding the files in question to my web project. I searched around online and found a few people asking about the same thing but no definite solution (link1 link2).
Does anyone know how to get files to nest in 2010?
This post applies to VISUAL STUDIO 2010 only.
You will find below the registry entries for VB and C# (apps and web sites). It will nest xxx.xxx.js under the related file as per illustration below.
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0_Config\Projects\{E24C65DC-7377-472b-9ABA-BC803B73C61A}\RelatedFiles\.ascx]
"RelationType"=dword:00000002
[HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0_Config\Projects\{E24C65DC-7377-472b-9ABA-BC803B73C61A}\RelatedFiles\.ascx\.cs]
@=""
[HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0_Config\Projects\{E24C65DC-7377-472b-9ABA-BC803B73C61A}\RelatedFiles\.ascx\.css]
@=""
[HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0_Config\Projects\{E24C65DC-7377-472b-9ABA-BC803B73C61A}\RelatedFiles\.ascx\.js]
@=""
[HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0_Config\Projects\{E24C65DC-7377-472b-9ABA-BC803B73C61A}\RelatedFiles\.ascx\.vb]
@=""
[HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0_Config\Projects\{E24C65DC-7377-472b-9ABA-BC803B73C61A}\RelatedFiles\.ascx\.xml]
@=""
[HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0_Config\Projects\{E24C65DC-7377-472b-9ABA-BC803B73C61A}\RelatedFiles\.ascx\.xslt]
@=""
[HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0_Config\Projects\{F184B08F-C81C-45f6-A57F-5ABD9991F28F}\RelatedFiles\.ascx]
".designer.vb"=dword:00000002
".cs"=dword:00000002
".js"=dword:00000002
".css"=dword:00000002
".xslt"=dword:00000002
".xml"=dword:00000002
[HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0_Config\Projects\{FAE04EC0-301F-11d3-BF4B-00C04F79EFBC}\RelatedFiles\.ascx]
".designer.cs"=dword:00000002
".cs"=dword:00000002
".js"=dword:00000002
".css"=dword:00000002
".xslt"=dword:00000002
".xml"=dword:00000002
[HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0_Config\Projects\{E24C65DC-7377-472b-9ABA-BC803B73C61A}\RelatedFiles\.aspx]
"RelationType"=dword:00000002
[HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0_Config\Projects\{E24C65DC-7377-472b-9ABA-BC803B73C61A}\RelatedFiles\.aspx\.cs]
@=""
[HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0_Config\Projects\{E24C65DC-7377-472b-9ABA-BC803B73C61A}\RelatedFiles\.aspx\.css]
@=""
[HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0_Config\Projects\{E24C65DC-7377-472b-9ABA-BC803B73C61A}\RelatedFiles\.aspx\.js]
@=""
[HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0_Config\Projects\{E24C65DC-7377-472b-9ABA-BC803B73C61A}\RelatedFiles\.aspx\.vb]
@=""
[HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0_Config\Projects\{E24C65DC-7377-472b-9ABA-BC803B73C61A}\RelatedFiles\.aspx\.xml]
@=""
[HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0_Config\Projects\{E24C65DC-7377-472b-9ABA-BC803B73C61A}\RelatedFiles\.aspx\.xslt]
@=""
[HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0_Config\Projects\{F184B08F-C81C-45f6-A57F-5ABD9991F28F}\RelatedFiles\.aspx]
".designer.vb"=dword:00000002
".cs"=dword:00000002
".js"=dword:00000002
".css"=dword:00000002
".xslt"=dword:00000002
".xml"=dword:00000002
[HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0_Config\Projects\{FAE04EC0-301F-11d3-BF4B-00C04F79EFBC}\RelatedFiles\.aspx]
".designer.cs"=dword:00000002
".cs"=dword:00000002
".js"=dword:00000002
".css"=dword:00000002
".xslt"=dword:00000002
".xml"=dword:00000002
Here's the registry file if anyone wants it. It'll nest files for C# web apps and web sites. Shut down all instances of VS before importing.
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0_Config\Projects\{E24C65DC-7377-472b-9ABA-BC803B73C61A}\RelatedFiles\.ascx]
"RelationType"=dword:00000002
[HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0_Config\Projects\{E24C65DC-7377-472b-9ABA-BC803B73C61A}\RelatedFiles\.ascx\.cs]
@=""
[HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0_Config\Projects\{E24C65DC-7377-472b-9ABA-BC803B73C61A}\RelatedFiles\.ascx\.css]
@=""
[HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0_Config\Projects\{E24C65DC-7377-472b-9ABA-BC803B73C61A}\RelatedFiles\.ascx\.js]
@=""
[HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0_Config\Projects\{E24C65DC-7377-472b-9ABA-BC803B73C61A}\RelatedFiles\.ascx\.vb]
@=""
[HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0_Config\Projects\{E24C65DC-7377-472b-9ABA-BC803B73C61A}\RelatedFiles\.ascx\.xml]
@=""
[HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0_Config\Projects\{E24C65DC-7377-472b-9ABA-BC803B73C61A}\RelatedFiles\.ascx\.xslt]
@=""
[HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0_Config\Projects\{FAE04EC0-301F-11d3-BF4B-00C04F79EFBC}\RelatedFiles\.ascx]
".designer.cs"=dword:00000002
".cs"=dword:00000002
".js"=dword:00000002
".css"=dword:00000002
".xslt"=dword:00000002
".xml"=dword:00000002
[HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0_Config\Projects\{E24C65DC-7377-472b-9ABA-BC803B73C61A}\RelatedFiles\.aspx]
"RelationType"=dword:00000002
[HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0_Config\Projects\{E24C65DC-7377-472b-9ABA-BC803B73C61A}\RelatedFiles\.aspx\.cs]
@=""
[HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0_Config\Projects\{E24C65DC-7377-472b-9ABA-BC803B73C61A}\RelatedFiles\.aspx\.css]
@=""
[HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0_Config\Projects\{E24C65DC-7377-472b-9ABA-BC803B73C61A}\RelatedFiles\.aspx\.js]
@=""
[HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0_Config\Projects\{E24C65DC-7377-472b-9ABA-BC803B73C61A}\RelatedFiles\.aspx\.vb]
@=""
[HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0_Config\Projects\{E24C65DC-7377-472b-9ABA-BC803B73C61A}\RelatedFiles\.aspx\.xml]
@=""
[HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0_Config\Projects\{E24C65DC-7377-472b-9ABA-BC803B73C61A}\RelatedFiles\.aspx\.xslt]
@=""
[HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0_Config\Projects\{FAE04EC0-301F-11d3-BF4B-00C04F79EFBC}\RelatedFiles\.aspx]
".designer.cs"=dword:00000002
".cs"=dword:00000002
".js"=dword:00000002
".css"=dword:00000002
".xslt"=dword:00000002
".xml"=dword:00000002
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With