PostSharp 2024.0.27
PostSharp 2024.0.27 is based on v2024.0.26, plus the following changes.
This release makes the .NET Framework build host behave correctly when a file is temporarily inaccessible, for example because another process holds a lock on it or security software denies access to it (#152). A transient file error is now retried for a bounded time, an error that persists fails the build with its actual cause, and a transient error no longer changes which assembly the build uses.
Enhancements
- #144 When an aspect constructor or an assembly load fails because an assembly cannot be bound,
LA0014andPS0264are now followed by aPS0265message with the binding record: the lookups of the host assembly store, the last exception caught during the lookup, and the runtime binding log. A failure can therefore be diagnosed without a second build withPostSharpTrace=AssemblyBinder. The trace also distinguishes a missing file from a file that cannot be accessed. AFileNotFoundExceptionorFileLoadExceptionthat is not about an assembly is now reported asPS0099with its message, instead ofPS0264.
Fixes
- #148 Fixed intermittent
LA0014andPS0264errors with "The system cannot find the file specified" when an assembly file was temporarily inaccessible during weaving. Such an error could also make PostSharp or the runtime silently select another build of the assembly, for example themsilbuild instead of theamd64build. - #149 A file locked with a byte-range lock, and a file to which access is temporarily denied, are now retried like a file opened by another process. Every read of an assembly file, including the Global Assembly Cache query, is now retried.
- #147 Fixed the loading of an assembly image by the CLR host: a failed open of the file is now detected and reported with its original error instead of
error 6, and the shared image cache is now thread-safe and no longer blocks concurrent builds while one of them retries a locked file.
Resources
- Milestone
- Full Changelog: v2024.0.26...v2024.0.27