EventHandlerTagHelperDescriptorProvider throws InvalidOprationException in dotnet-watch unit test environment
- Dominant language
- C#
- Stars
- 20.7k
- Forks
- 4.3k
- PR merge metrics
- PR metrics pending
Description
When `EventHandlerAttribute` is not decoded as expected the source generator throws an exception.
See https://github.com/dotnet/razor/blob/main/src/Compiler/Microsoft.CodeAnalysis.Razor.Compiler/src/CSharp/EventHandlerTagHelperDescriptorProvider.cs#L60
The exception message does not include details about which type caused the failure making it hard to find out what's wrong.
The ask is to:
1) Update Razor source generator to include information in the exception message that pinpoints the problematic type.
2) Insert updated Razor to .NET SDK repo and enable commented out code in dotnet-watch test `ApplyDeltaTests.BlazorWasm`.
3) Run the test, determine the root cause of the failure and address it.
Contributor guide
Assessment
This issue has not been assessed yet.