-
Notifications
You must be signed in to change notification settings - Fork 652
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
[Bug] /updatewixversionfile does not cleanly recreate the file #2257
Comments
I don't use Wix myself, so I don't know where to start looking to fix this. Would you be up for having a look yourself and possibly submitting a PR, @tcs-devel? |
@tcs-devel at the time we added wix support via #1599 it was not specified how exaclty it should work, but the idea was to update, as we have with assemblyinfo, not to re-create. You can check the implementation here https://github.com/GitTools/GitVersion/blob/master/src/GitVersionCore/VersionConverters/WixUpdater/WixVersionFileUpdater.cs#L27-L40. In case the current implementation is not the way you think it should we can discuss |
@asbjornu: Using wix itself is not required. It can easily be reproduced without wix. Just create a file The issue is, that GitVersion/src/GitVersionCore/VersionConverters/WixUpdater/WixVersionFileUpdater.cs Line 38 in 438d450
see the behavior as documented e.g. in https://docs.microsoft.com/en-us/dotnet/api/system.io.file.openwrite?view=netcore-3.1 I added some changes in #2259 |
…eneration Issue #2257 Ensure Valid Wix Version File
🎉 This issue has been resolved in version 5.3.3 🎉 Your GitReleaseManager bot 📦🚀 |
The content of the file
GitVersion_WixVersion.wxi
is not fully overwritten/recreated when the file already exists andGitVersion /updatewixversionfile
is invoked. Instead it just overwrites the first x bytes.Expected Behavior
The entire content of
GitVersion_WixVersion.wxi
is overwritten and the file has a valid content afterwards.Actual Behavior
If the existing file is larger than the newly generated file, parts of the previously existing content remain in the file.
Possible Fix
Delete the file prior writing/correctly write the content.
Steps to Reproduce
GitVersion_WixVersion.wxi
in the root of a repo.GitVersion /updatewixversionfile
Your Environment
The text was updated successfully, but these errors were encountered: