Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9131919
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T08:13:21+00:00 2026-06-17T08:13:21+00:00

We have a C# solution with a WiX installer and an MSBuild build script.

  • 0

We have a C# solution with a WiX installer and an MSBuild build script. We’re in the process of migrating from SVN to Git.

As the fourth part of our version number, we want something that ascends with each build. Until now, we’ve used the SVN revision number for that. The MSBuild script defines a ProductVersion property, which included the SVN revision number as the final of the four numbers of the build version. However, we can’t use that anymore, as we won’t be using SVN anymore.

I’ve been trying to find a replacement for the SVN revision number, but I can’t figure out what to use.

  • Jenkins provides a build number that I could use, but I don’t want to tie our versioning system to Jenkins.

  • Jenkins also provides a timestamp, but it doesn’t comply with Microsoft’s version number restrictions: it’s alphanumeric and kind of long, while the 4th number in the version should be an integer between 0 and 65535.

  • We can set the AssemblyVersion to 1.0.* and let .NET fill in the rest. This works for our assemblies, but I can’t find a way to inject this into WiX. We can fetch it from one of the assemblies once it’s built, but our MSBuild script uses the <MSBuild> task to build the whole solution at once, so we’re stuck in a Catch-22 where we need to run <MSBuild> so it can compile an assembly that we can use to fetch the generated version number, but in order to run <MSBuild>, we first need to have a compiled assembly so that we can fetch the generated version number from it.

  • I could add a separate Target in the MSBuild file that compiles something (anything) and get the version number from that, and then do the actual call to the <MSBuild> task. But that just feels wrong.

Again, I don’t really care what the number is, as long as it increments with every build. Something based on a timestamp would be fine. Any ideas?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T08:13:22+00:00Added an answer on June 17, 2026 at 8:13 am

    The MSbuild Community Tasks contains a task named Version, it provides some algorithms to generate version numbers. It is very easy to use and customizable.

    IMHO, it is better to use a number that ties your entire SDLC, so you can trace your deployed product to the build results, and these to the VCS, and so forth. I would recommend using jenkins build number, as Christopher Painter did.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is it possible to have one WiX Installer project in a solution in Visual
I have a current build using teambuild/msbuild that I need to integrate a wix
I have a solution to check NULL values extracted from object, However i feel
I have a WiX installer project where I have added two firewall exceptions as
I need to call exec and build a wix setup project. Currently I have
I have a Wix installer and bootstrapper application to install my application and a
I've got a WIX installation project for my application. As part of my solution
I'm in the process of adding a WIX project to my solution and I'm
I have a solution with a WiX project in it. Everytime I open it
I have a solution with two projects: .NET application WiX setup project. I know,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.