How about using a macro ?

This is what I use :

    Sub SetVersion(ByVal sProject As String, ByVal sVersionNumber As String)
        Try
            DTE.ItemOperations.OpenFile(sProject & "\AssemblyInfo.vb")
            DTE.Windows.Item(Constants.vsWindowKindFindReplace).Activate()
            DTE.ExecuteCommand("Edit.Find")
            DTE.Find.FindWhat = "assemblyversion"
            DTE.Find.Target = vsFindTarget.vsFindTargetCurrentDocument
            DTE.Find.MatchCase = False
            DTE.Find.MatchWholeWord = False
            DTE.Find.Backwards = False
            DTE.Find.MatchInHiddenText = True
            DTE.Find.PatternSyntax =
vsFindPatternSyntax.vsFindPatternSyntaxLiteral
            DTE.Find.Action = vsFindAction.vsFindActionFind
            DTE.Find.Execute()
            DTE.Windows.Item(Constants.vsWindowKindFindReplace).Close()
            DTE.ActiveDocument.Selection.CharRight(False, 3)
            DTE.ActiveDocument.Selection.EndOfLine(True)
            DTE.ActiveDocument.Selection.Text = sVersionNumber & """)>"
            DTE.ActiveWindow.Close(vsSaveChanges.vsSaveChangesYes)
        Catch e As System.Exception
            MsgBox("Failed to set version on " & sProject &
"\AssemblyInfo.vb : " & e.Message)
        End Try
    End Sub


----- Original Message -----
From: "Mitesh - HelpSTAR.com" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, July 13, 2004 10:12 PM
Subject: Re: [ADVANCED-DOTNET] How to change Assembly Version
programmatically.


> I downloaded the code and compiled it, but it doesn't work, i'm getting
> "Version not found in input. Output equals input." error. I checked
> AssemblyInfo.vb there is a version tag. Do you have any clue???
> Thanks,
> Mitesh
>
> -----Original Message-----
> From: Unmoderated discussion of advanced .NET topics.
> [mailto:[EMAIL PROTECTED] Behalf Of Mike Gunderloy
> Sent: Monday, July 12, 2004 2:51 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [ADVANCED-DOTNET] How to change Assembly Version
> programmatically.
>
>
> http://code.mattgriffith.net/UpdateVersion/
>
> Mike Gunderloy
> http://www.larkware.com
>
> > -----Original Message-----
> > From: Unmoderated discussion of advanced .NET topics.
> > [mailto:[EMAIL PROTECTED] On Behalf Of Mitesh Patel
> > Sent: Monday, July 12, 2004 11:33 AM
> > To: [EMAIL PROTECTED]
> > Subject: [ADVANCED-DOTNET] How to change Assembly Version
> > programmatically.
> >
> > I'm looking for a solution for changing Assembly version of
> > AssemblyInfo.vb. Is there anyone know how to change version
> > using any tool or by writing some code???
> >
> > Thanks,
> > Mitesh
>
> ===================================
> This list is hosted by DevelopMentor.  http://www.develop.com
> Some .NET courses you may be interested in:
>
> NEW! Guerrilla ASP.NET, 17 May 2004, in Los Angeles
> http://www.develop.com/courses/gaspdotnetls
>
> View archives and manage your subscription(s) at
http://discuss.develop.com
>
> ===================================
> This list is hosted by DevelopMentor.  http://www.develop.com
> Some .NET courses you may be interested in:
>
> NEW! Guerrilla ASP.NET, 17 May 2004, in Los Angeles
> http://www.develop.com/courses/gaspdotnetls
>
> View archives and manage your subscription(s) at
http://discuss.develop.com
>

===================================
This list is hosted by DevelopMentor�  http://www.develop.com
Some .NET courses you may be interested in:

NEW! Guerrilla ASP.NET, 17 May 2004, in Los Angeles
http://www.develop.com/courses/gaspdotnetls

View archives and manage your subscription(s) at http://discuss.develop.com

Reply via email to