-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use better trimming message in ValidationContext #84326
Conversation
Add more details about why ValidationContext requires unreferenced code.
Tagging subscribers to this area: @dotnet/area-system-componentmodel-dataannotations Issue DetailsAdd more details about why ValidationContext requires unreferenced code.
|
The build is failing with
@ViktorHofer - is it possible to put |
You can do that here: https://github.com/dotnet/runtime/blob/1145e01c0165b92f97fe77e616aa0cf755079b1c/eng/ApiCompatExcludeAttributes.txt If you also want to exclude from the generation of reference assemblies, that should go here: https://github.com/dotnet/runtime/blob/1145e01c0165b92f97fe77e616aa0cf755079b1c/eng/DefaultGenApiDocIds.txt |
Will this exclude the message or the whole attribute from being analyzed? Once an assembly is annotated, adding RequiresUnreferencedCode is kind of a breaking change (since you will start getting warnings in trimmed apps). But for libraries that haven't been annotated yet, we don't want it to complain (or would just baseline the api compat warning). If it isn't possible to just exclude the message from the compat check, maybe we can just exclude the whole attribute for now.
Good to know. But we definitely want these in the ref assemblies. |
Failure is #83655. |
Add more details about why ValidationContext requires unreferenced code.
Fix #84324