mirror of
https://github.com/icsharpcode/ILSpy.git
synced 2026-10-12 02:15:58 +00:00
A PEFile keeps its assembly mapped until it is disposed, and three fixtures opened one and never did: DuplicateAssemblyReferenceTests both directly and for every reference its resolver hands back, TypeForwarderResolutionTests for everything the resolver probes, and LocationsInAstTests for the module behind each decompiler. Their teardowns then deleted the directory those files live in, which cannot work while the mapping is open, so a Windows run reported a failed teardown for a run that otherwise passed. They now dispose what they opened, the way WpfProjectExportTests already did. Deleting is cleanup either way, so it goes through RepeatOnIOError rather than straight at the file system, and that helper no longer rethrows: its last of five attempts was deliberately unguarded, and four retries ten milliseconds apart is a short window to wait for a handle that a virus scanner or the indexer still holds. It now backs off to about a second and a half and, failing that, reports and leaves the file behind, which costs nothing. Assisted-by: Claude:claude-opus-5[1m]:Claude Code