Is there a window manager for Visual Studio 2008 like this one. I really liked it, and that's all I used in Visual Studio 2005 and saw somewhere it is supposed to work in Visual Studio 2008, but it doesn't. I have tried it on many installations of Visual Studio 2008, and it doesn't remember any settings. I really liked being able to easily change window layout quickly. Right now I just manually import and export settings, but it's not an instant process.
What do I have to do to make it work?
You can check out my blog post, Save and Change Tool Layout in Visual Studio, which provides the ability to list and switch window layouts.
Your question was answered on the very same page where you asked it :-)
Just for the record:
To get this to work for 2008, add a new HostApplication element to the WindowManager2005.AddIn file. The file is typically found in "%APPDATA%\Microsoft\MSEnvShared\Addins". Change the version in the new element to be 9.0 (VS 2008) and it should work in both 2008 and 2005.
<HostApplication>
<Name>Microsoft Visual Studio</Name>
<Version>9.0</Version>
</HostApplication>
The following macros may do the trick for you. I did your WindowManager mentioned above, recompiling it to work for Visual Studio 2008, but I still found it a little flaky. Also, I don't use the "Auto Apply Layouts" functionality in WindowManager, so these macros work great for me for switching from dual-monitor working to laptop-only working.
Sub DualMonitorConfiguration_Save()
SaveWindowConfiguration("Dual Monitor Layout")
End Sub
Sub DualMonitorConfiguration_Load()
LoadWindowConfiguration("Dual Monitor Layout")
End Sub
Sub LaptopOnlyConfiguration_Save()
SaveWindowConfiguration("Laptop Only Layout")
End Sub
Sub LaptopOnlyConfiguration_Load()
LoadWindowConfiguration("Laptop Only Layout")
End Sub
Private Sub SaveWindowConfiguration(ByVal configName As String)
Dim selectedConfig As WindowConfiguration
selectedConfig = FindWindowConfiguration(configName)
If selectedConfig Is Nothing Then
selectedConfig = DTE.WindowConfigurations.Add(configName)
End If
selectedConfig.Update()
DTE.StatusBar.Text = "Window configuration saved: " & configName
End Sub
Sub LoadWindowConfiguration(ByVal configName As String)
Dim selectedConfig As WindowConfiguration
selectedConfig = FindWindowConfiguration(configName)
If selectedConfig Is Nothing Then
MsgBox("Window Configuration """ & configName & """ not found.")
Else
selectedConfig.Apply()
DTE.StatusBar.Text = "Window configuration applied: " & configName
End If
End Sub
Private Function FindWindowConfiguration(ByVal name As String) As WindowConfiguration
Dim selectedLayout As WindowConfiguration
For Each config As WindowConfiguration In DTE.WindowConfigurations
If config.Name = name Then
Return config
End If
Next
Return Nothing
End Function
来源:https://stackoverflow.com/questions/123105/visual-studio-window-manager