Visual Studio 2010 related file nesting

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.

Javascript nesting - Solution Explorer

Important

  • You must add the suffix *.aspx.js, otherwise it won’t work.
  • Existing script files in your project will not be nested under the related file. It only applies to new script files added after the registry changes.

To change the Registry

  • Highlight the entire content from the grey area below, copy and paste into Notepad.
  • Save the file to your desktop as VSRegistry.reg, then close Notepad.
  • Right-click VSRegistry.reg on your desktop, then choose Merge from the popup menu.
  • Voila’, you can now launch Visual Studio 2010 and try adding a new javascript file.

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

Leave a Comment