0

All my .net applications take their version from one C# version file.

lets call it version.cs.

How can i make one WIX project set the version according to this file?

I saw : How can I set the WiX installer version to the current build version?

but it cannot help me because I am wrapping several DLL and some of them may have the correct version and some not.

How can I Bind the version from C# file?

Community
  • 1
  • 1
briler
  • 570
  • 6
  • 21

1 Answers1

5

WiX has no support for this. You'd have to write some build automation to extract the version from the cs file and pass it to WiX's command line at build time.

Personally what I do is use build automation to own the build version and push it into both WiX and C#. Since I'm using TFS Team Build there are libraries already written ( TFSVersioning ) that do this for me.

Christopher Painter
  • 54,556
  • 6
  • 63
  • 100