Skip to content

Conversation

@huulinhnguyen-dev
Copy link
Contributor

@huulinhnguyen-dev huulinhnguyen-dev commented May 9, 2025

Fixes #
Fix the issue Improve error handling for optional-logger failures #9560

Context

When using optional loggers with MSBuild, the error messages generated for invalid logger assemblies are not clear, making it difficult for users to diagnose issues.

Changes Made

Add more information for optional-logger failures

Testing

I have performed testing for various exception to validate the changes. The following cases was successfully tested: IOException, BadImageFormatException, MemberAccessException, TargetInvocationException

I was unbale to reproduce 2 cases: SecurityException, ReflectionTypeLoadException

Notes

@huulinhnguyen-dev
Copy link
Contributor Author

@dotnet-policy-service agree

@huulinhnguyen-dev huulinhnguyen-dev marked this pull request as ready for review May 23, 2025 08:47
@JanProvaznik JanProvaznik merged commit c9e58a2 into dotnet:main Jun 6, 2025
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants