Hi Tim,
Is there a way of doing this, perhaps with a macro?
If you want to play it with a VS.NET IDE Macro, maybe you can take a try on
Edit.Find/Replace function:
Sub SetAssemblyTitle()
Dim prj As Project
Dim file As ProjectItem
Dim AssemblyTitle As String
For Each prj In DTE.Solution.Projects
For Each file In prj.ProjectItems
If file.Name = "AssemblyInfo.vb" Then
file.Document.Activate()
DTE.ExecuteCommand("Edit.Find")
DTE.Windows.Item("AssemblyInfo.vb").Activate()
DTE.Find.Action = vsFindAction.vsFindActionReplace
DTE.Find.FindWhat = "<Assembly: AssemblyTitle("""")>"
Select Case prj.Name
Case "Project1"
AssemblyTitle = "MyApp1" 'Set your assembly
title here
Case "TProject1"
AssemblyTitle = "MyApp12"
'...
'...
End Select
DTE.Find.ReplaceWith = "<Assembly: AssemblyTitle(""" +
AssemblyTitle + """)>"
DTE.Find.Target = vsFindTarget.vsFindTargetCurrentDocument
DTE.Find.MatchCase = True
DTE.Find.MatchWholeWord = True
DTE.Find.Backwards = False
DTE.Find.MatchInHiddenText = False
DTE.Find.PatternSyntax =
vsFindPatternSyntax.vsFindPatternSyntaxLiteral
DTE.Find.Action = vsFindAction.vsFindActionReplace
DTE.Find.Execute()
DTE.Find.Execute()
DTE.Windows.Item(Constants.vsWindowKindFindReplace ).Close()
DTE.ActiveDocument.Save()
file.Document.Close()
End If
Next
Next
End Sub
Wish it helps!
Best regards,
Gary Chang
Microsoft Online Partner Support
Get Secure! -
www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------