Fix shadow copy up to date check on startup (#52831) #55659
Closed
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.
Backport of #52831
Fix shadow copy up to date check on startup
Description
If using shadow copy in ANCM and you shutdown the app (e.g. app_offline.htm) then delete a subfolder (with a dll), starting up the app can cause a crash that can only be resolved by adding back the deleted folder. Or resolved by deleting the shadow copy folder (either manually or with cleanShadowCopyDirectory setting turned on).
Customer Impact
App permanently crashes on startup until moving app to a new directory, cleaning shadow copy folders, or readding removed file. This is a hard to diagnose issue as it's just a random crash with little info about what happened.
Regression?
Risk
Code was obviously wrong once the issue was looked into, very simple fix. Added a test to verify.
Verification
Packaging changes reviewed?