CodePaste Logo
New Snippet New Snippet Recent Snippets Recent Snippets My Snippets My Snippets Web Code Search Snippets Search
Sign inor Register
Language: VB.NET

Remove [Exclusive] Attributes - VS Macro

279 Views
Copy Code Show/Hide Line Numbers
Sub RemoveExclusiveAttributes()
    Dim originalSyntax = DTE.Find.PatternSyntax
    Dim originalWhat = DTE.Find.FindWhat
    Dim originalTarget = DTE.Find.Target
    Dim originalAction = DTE.Find.Action
 
    DTE.Find.PatternSyntax = vsFindPatternSyntax.vsFindPatternSyntaxLiteral
    DTE.Find.FindWhat = "[Exclusive]"
    DTE.Find.Target = vsFindTarget.vsFindTargetCurrentProject
    DTE.Find.Action = vsFindAction.vsFindActionFind
 
    While (DTE.Find.Execute() = vsFindResult.vsFindResultFound)
        DTE.ExecuteCommand("Edit.LineDelete")
    End While
 
    DTE.Find.PatternSyntax = originalSyntax
    DTE.Find.FindWhat = originalWhat
    DTE.Find.Target = originalTarget
    DTE.Find.Action = originalAction
End Sub
by Jeff Handley
  October 22, 2009 @ 10:49pm
Tags:
Description:
Just whipped this up to find all [Exclusive] attributes in my current Silverlight Unit Test Project, and delete all of them.

Add a comment


Report Abuse
brought to you by:
West Wind Techologies



If you find this site useful and use it frequently please consider making a donation to support this free service.
Donate