views:

50

answers:

2

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?

+1  A: 

Looks like VS2010 settings are per "user" and not "per machine" D'oh!

So search in the HKEY_USERS until you'll find your user's settings.

DotNetWise
Finally got around to testing this. You were right. Thanks!
Polshgiant
A: 

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
Polshgiant