New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes to DefineConstants property should trigger rebuild #4952
Comments
MSBuild incremental support today is driven by timestamps so there's not much wix.targets could do to change that.
|
A solution might be to have a msbuild task in wix.targets to create a dummy file (maybe containing the contents of ) that changes whenever change. Then add this file to the Inputs attribute of the Target.
|
We pass constants values from the TeamCity server, so project file does not change, but the compiled output should (eg. we pass new build number but WiX does not compile anything, as MSBuild does not detect a change). This can be mitigated by wesman's proposal. WiX build scripts can update a temporary file, that will contain the DefinedConstants value. The script will read the file, compare the content and update it if it does not match. This file will be input dependency for the WiX core build, so if it is changed, WiX will rebuild the project. (eg. compile a new installer with updated version number).
|
Or you could make it so changes to your
|
@robman that does not work. Change to output location does not trigger rebuild, as input files are the same.
|
If the output file does not exist, MSBuild should detect that and build independent of the state of the inputs. That's why the Rebuild target works. It deletes the output files (Clean) then builds even though the input files did not change.
|
The constants from If I pass the version number using That's why the input to the build target must be also the content of the
|
.csproj files work the same way. To prevent needless cab rebuilding, look at -cc and -reusecab.
|
We use the MSBuild property
<DefineConstants>
to pass values used in WXS files from build server to MSBuild and then to WiX compiler.Changes to the
<DefineConstants>
should be detected by incremental build and caused the WXS files to be compiled again. Right now, the MSBuild thinks the source code is up-to-date even it should rebuild affected WXS files.A workaround is to run Rebuild.
We use
<DefineConstants>
to create multiple MSI files with a single CAB media file. It would be beneficial to have incremental builds that would recompile MSI when<DefineConstants>
changes and the CAB files will not be rebuild (it is time consuming in our build system).The text was updated successfully, but these errors were encountered: