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
I discovered that if a model being used for source generation has a type of Action, that causes a runtime error with the source generator even if I mark the attribute ignore.
Action should never even be considered for serializing anyways.
Reproduction Steps
Create Model
Have a type of Action
Inherit from JsonSerializerContext and mark attribute as JsonSerializable
Build Solution.
Expected behavior
I expect the project to build successfully and not even see anything having to do with action in the source generator.
Actual behavior
The runtime error message was "Method name expected"
Also has lots of warnings.
If you want to see a screenshot of the warnings, I can do that as well.
Regression?
No response
Known Workarounds
Not use the source generator (which means it uses reflection).
Configuration
.net 6.
Other information
No response
The text was updated successfully, but these errors were encountered:
Tagging subscribers to this area: @dotnet/area-system-text-json
See info in area-owners.md if you want to be subscribed.
Issue Details
Description
I discovered that if a model being used for source generation has a type of Action, that causes a runtime error with the source generator even if I mark the attribute ignore.
Action should never even be considered for serializing anyways.
Reproduction Steps
Create Model
Have a type of Action
Inherit from JsonSerializerContext and mark attribute as JsonSerializable
Build Solution.
Expected behavior
I expect the project to build successfully and not even see anything having to do with action in the source generator.
Actual behavior
The runtime error message was "Method name expected"
Also has lots of warnings.
If you want to see a screenshot of the warnings, I can do that as well.
Regression?
No response
Known Workarounds
Not use the source generator (which means it uses reflection).
Description
I discovered that if a model being used for source generation has a type of Action, that causes a runtime error with the source generator even if I mark the attribute ignore.
Action should never even be considered for serializing anyways.
Reproduction Steps
Expected behavior
I expect the project to build successfully and not even see anything having to do with action in the source generator.
Actual behavior
The runtime error message was "Method name expected"
Also has lots of warnings.
If you want to see a screenshot of the warnings, I can do that as well.
Regression?
No response
Known Workarounds
Not use the source generator (which means it uses reflection).
Configuration
.net 6.
Other information
No response
The text was updated successfully, but these errors were encountered: