I have a solution with 2 projects:
- My Application 1.2.54 (C# WinForms)
- My Application Setup 1.0.0.0 (WiX Setup)
I would like to add a post-build event to the WiX Setup project to run a batch file and pass it a command line parameter of My Application's assembly version number. The code may look something like this:
CALL MyBatchFile.bat "$(fileVersion.ProductVersion($(var.My Application.TargetPath)))"
But this results in the following error:
Unhandled Exception:The expression """.My Application" cannot be evaluated. Method 'System.String.My Application' not found. C:\My Application\My Application Setup\My Application Setup.wixproj
Error: The expression """.My Application" cannot be evaluated. Method 'System.String.My Application' not found. C:\My Application\My Application Setup\My Application Setup.wixproj
I would like to be able to pass "1.2.54" to MyBatchFile.bat somehow.