Invoking a setup / deployment project via the command line?

W

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
 
W

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?
 
M

Markus Stoeger

Wade said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top