You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the logger generator on an abstract class that defines a type constraint that is outside of the current scope, it will not compile correctly.
The generated source code would allow the project to compile cleanly.
Actual behavior
The errors produced are the following:
error CS0246: The type or namespace name 'IAuthorizationRequirement' could not be found (are you missing a using directive or an assembly reference?)
error CS0265: Partial declarations of 'AzureHandlerBase<TRequirement>' have inconsistent constraints for type parameter 'TRequirement'
Regression?
Not that I'm aware of.
Known Workarounds
Fully referencing the type constraint with namespaces allows it to compile:
When using the logger generator on an abstract class that defines a type constraint that is outside of the current scope, it will not compile correctly.
The generated source code would allow the project to compile cleanly.
Actual behavior
The errors produced are the following:
error CS0246: The type or namespace name 'IAuthorizationRequirement' could not be found (are you missing a using directive or an assembly reference?)
error CS0265: Partial declarations of 'AzureHandlerBase<TRequirement>' have inconsistent constraints for type parameter 'TRequirement'
Regression?
Not that I'm aware of.
Known Workarounds
Fully referencing the type constraint with namespaces allows it to compile:
Description
When using the logger generator on an abstract class that defines a type constraint that is outside of the current scope, it will not compile correctly.
Reproduction Steps
Expected behavior
The generated source code would allow the project to compile cleanly.
Actual behavior
The errors produced are the following:
Regression?
Not that I'm aware of.
Known Workarounds
Fully referencing the type constraint with namespaces allows it to compile:
Configuration
.NET 6
Windows 11
Other information
No response
The text was updated successfully, but these errors were encountered: