Fix app.config not getting updated in output #8586
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes https://dev.azure.com/devdiv/DevDiv/_workitems/edit/1741178 (https://developercommunity.visualstudio.com/t/Always-copy-appconfig-to-executable-fol/10270579)
Context
Customer reported that their app.config is not occasionaly getting updated in output folder.
Turns out to be a real issue specific to usage of
AutoGenerateBindingRedirects
.Reason
tl;dr;: Caused by wrong up-to-date condition on
GenerateBindingRedirects
targetMore details:
Upon closer investigation, the app config is not getting copied as the up-to-date-check is comparing to the file in obj:
It's getting into that location with
GenerateBindingRedirects
- however that was skipped in repro case:This turns out to be caused by a wrong item specified as input for the target - hence the target was skipped if the change occured only to the app.config