Home All Groups Group Topic Archive Search About

Invoking a setup / deployment project via the command line?

Author
26 May 2006 1:20 PM
Wade
Hey all,

I have a setup / deployment project that is used to create builds for my web
project.  I can very easily invoke this manually, in the IDE, to get the
packaged MSI file.

However, I would like to be able to invoke the packaging of this MSI file
from the command line, so that I can embed it in a script.

Anyone know what this command line statement would be?

Thanks!

Wade

Author
26 May 2006 2:38 PM
Wade
Okay -- I got the following to work:

devenv.exe /rebuild debug /project ProjectName "SolutionName.sln"

Yet, it's not quite what I want.  This particular project is a Setup &
Deployment product.  During the build, I want to increment the Product Code
and Version.

How can I do this?

Show quote
"Wade" <wwegne***@hotmail.com> wrote in message
news:%23xfqucMgGHA.2188@TK2MSFTNGP04.phx.gbl...
> Hey all,
>
> I have a setup / deployment project that is used to create builds for my
> web project.  I can very easily invoke this manually, in the IDE, to get
> the packaged MSI file.
>
> However, I would like to be able to invoke the packaging of this MSI file
> from the command line, so that I can embed it in a script.
>
> Anyone know what this command line statement would be?
>
> Thanks!
>
> Wade
>
Author
26 May 2006 4:09 PM
Markus Stoeger
Wade wrote:
> Okay -- I got the following to work:
>
> devenv.exe /rebuild debug /project ProjectName "SolutionName.sln"
>
> Yet, it's not quite what I want.  This particular project is a Setup &
> Deployment product.  During the build, I want to increment the Product Code
> and Version.
>
> How can I do this?

What build tool are you using?

And what kind of setup project? The one that comes with Visual Studio or
one from some other company?

If you are using the one from VS: I don't know of any way to configure
the setup project to do those things automatically. What we do is to use
a Regex.Replace() in our build script to automatically update the
required fields during a build. Replace:

"ProductVersion" = "8:1.2.3"

... with the version, and:

"ProductCode" = "8:..."
"PackageCode" = "8:..."

... with a Guid.NewGuid().ToString("B").ToUpper();

If you want the version of the setup to match the version of the
assembly, you'll first have to read the AssemblyVersion from the
AssemblyInfo.cs, increment it and write it back to both the
AssemblyInfo.cs and setup project.

hth,
Max

AddThis Social Bookmark Button