 |
|
 |
Thanks for pointing out the registry location of the MRU list to us.
Perhaps you can also give me a hint on how to modify the MRU table itself?
With VS.NET 2002 I had modified vshome.xsl and vshome.js (I think these were the names of the files) to retrieve and show not only the name and last modification date of my solutions but also the path they are in (because I have different versions of the same solutions under different paths).
With VS.NET 2003 this no longer seems to work. I even tried modifying an embedded version vshome.xsl in a resource dll, but to no avail.
Any idea?
Regards,
Mav
|
|
|
|
 |
|
 |
I found the file you mentioned here:
\Visual Studio .NET 2003\Common7\IDE\HTML
I have never modified the XSL stylesheet to format the "Start Page" output...sorry
|
|
|
|
 |
|
 |
Customizing the VS.Net 2002 Start Page
http://msdn.microsoft.com/library/en-us/dv_vstechart/html/vstchcustomizingvisualstudiostartpage.asp
Customizing the VS.Net 2003 Start Page
http://msdn.microsoft.com/library/en-us/dv_vstechart/html/vstchCustomizingVisualStudioStartPageEverett.asp
Interesting stuff.
|
|
|
|
 |
|
 |
Dear Darren,
thanks for the links, although I had found them already yesterday.
The problem is that for VS.NET 2003 there's this nasty sentence "The contents of Projects is now displayed in a tool window" meaning that customizing it by modifying the .xsl and .js files (embedded as resources or not) will not work anymore.
The online resources are still html tables filled from scripts, but the projects pane isn't.
There's also this line "Other types of modifications to the Start Page are possible, but remain unsupported by Microsoft", suggesting that it might still be possible to do something like what I want, but there's no information on how to do it.
Thanks anyway.
Best regards,
Mav
|
|
|
|
 |
|
 |
Hi Mav,
Did you ever find a solution to this problem?
I'm in the same situation, multiple branches containing the same project. I constantly have to hover the cursor over the name to see what the folder is.
DAve
|
|
|
|
 |
|
 |
No, sorry.
I gave up on this topic some time ago. At least we do have the full path in the status bar (something I had overlooked for a _looong_ time ), so that's where I look now when I'm not sure which project entry is which.
Regards,
mav
|
|
|
|
 |
|
|
 |
|
 |
As Mav pointed out, he too knew of this documentation, as did I. The choice is simple: do it the "documented" way, or get right to "the meat" of the content. The documented way is only a means of transforming/massaging/formatting the content provided from the registry. You can also (per the docs) add new elements, and could modify that content too. But that would require hard-coding the names of projects into some XSL file (with a supporting XSD?), so why bother? Open regedit and be done with it in less than 90 seconds.
Don't misunderstand me...I'm all in support of doing things "the documented way" -- it's just that in this case that methodology is ill-suited for filtering existing entries, but excellent for formatting it any cool way one would want. And it would take much longer than 90 seconds. So in this scenario I decided to pass along what I "tripped over" when I went looking for a way to delete a bunch of temporary projects from my Start Page's MRU list that I no longer wanted showing up.
To all -- pick whichever method suits you best. The information is provided as an FYI only.
S. Sean Stagner
|
|
|
|
 |
|
 |
Here's the code for a small WinForms app that I use to clean out entries on the Visual Studio Start page:
RW
imports Microsoft.VisualBasic
imports System
Imports System.Data
imports System.Collections
imports System.ComponentModel
imports System.Drawing
imports System.Windows.Forms
Imports System.Text
Imports Microsoft.Win32
public class WindowsForm : inherits System.Windows.Forms.Form
Private m_clb As CheckedListBox
Private m_btnDeleteValues As Button
Public Sub New()
InitializeComponent
PopulateListBox
AddHandler m_btnDeleteValues.Click, AddressOf m_btnDeleteValues_Click
End Sub
Private Sub InitializeComponent
m_clb = New CheckedListBox
m_btnDeleteValues = New Button
Me.SuspendLayout()
With m_clb
.Size = New Size(Me.ClientRectangle.Width-20, _
Me.ClientRectangle.Height - 40)
.Location = New Point(10, 10)
.Anchor = AnchorStyles.Left Or AnchorStyles.Top _
Or AnchorStyles.Right Or AnchorStyles.Bottom
End With
With m_btnDeleteValues
.Size = New Size(120, _
25)
.Location = New Point(Me.ClientRectangle.Width-130, _
Me.ClientRectangle.Height - 35)
.Anchor = AnchorStyles.Right Or AnchorStyles.Bottom
.Text = "Delete Selected Keys"
End With
Me.Controls.AddRange(New Control(){m_clb, m_btnDeleteValues})
Me.ResumeLayout()
End Sub
Private Sub PopulateListBox()
Dim rkCU As RegistryKey = Registry.CurrentUser
Dim rkMRU As RegistryKey = rkCU.OpenSubKey("Software\Microsoft\VisualStudio\7.1\ProjectMRUList")
Dim ValueNames As String() = rkMRU.GetValueNames()
Dim index As Int32
Dim dt As New DataTable
With dt.Columns
.Add( New DataColumn("ValueName") )
.Add( New DataColumn("Value") )
End With
For Each v As String In ValueNames
dt.Rows.Add(New Object(){v, rkMRU.GetValue(v, "")})
Next v
rkMRU.Close()
rkCU.Close()
m_clb.DataSource = dt
m_clb.ValueMember = "ValueName"
m_clb.DisplayMember = "Value"
End Sub
Private Sub m_btnDeleteValues_Click(sender As Object, e As EventArgs)
Dim sb As New StringBuilder("The following registry values will be deleted. Do you wish to proceed?" & vbCrLf)
Dim drv As DataRowView
For Each item As Object in m_clb.CheckedItems
sb.Append(CType(item, DataRowView).Item("Value").ToString()).Append(Environment.NewLine)
Next
If DialogResult.Yes = MessageBox.Show(Me, sb.ToString(), "MRU Manager for VS.NET", MessageBoxButtons.YesNo, _
MessageBoxIcon.Question, MessageBoxDefaultButton.Button2) Then
Dim rkCU As RegistryKey = Registry.CurrentUser
Dim rkMRU As RegistryKey = rkCU.OpenSubKey("Software\Microsoft\VisualStudio\7.1\ProjectMRUList", True)
For Each item As Object in m_clb.CheckedItems
Dim valueName As String = CType(item, DataRowView).Item("ValueName").ToString()
rkMRU.DeleteValue(valueName)
Next item
rkMRU.Close()
rkCU.Close()
End If
PopulateListBox
End Sub
End Class
public module MyModule
sub Main()
Application.Run(new WindowsForm())
end sub
end module
|
|
|
|
 |