Skip to content

PostSharp 2024.0.27

Choose a tag to compare

@gfraiteur gfraiteur released this 26 Sep 11:02

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, LA0014 and PS0264 are now followed by a PS0265 message 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 with PostSharpTrace=AssemblyBinder. The trace also distinguishes a missing file from a file that cannot be accessed. A FileNotFoundException or FileLoadException that is not about an assembly is now reported as PS0099 with its message, instead of PS0264.

Fixes

  • #148 Fixed intermittent LA0014 and PS0264 errors 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 the msil build instead of the amd64 build.
  • #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