-
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 Sdks assembly Level Attributes for supported and unsupported platforms. #44257
Comments
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label. |
Does this even matter outside of libraries? |
Tagging subscribers to this area: @safern, @ViktorHofer |
@buyaa-n @jeffhandley what are your thoughts on this? The SDK by default adds the in the top post mentioned attributes. Is there a reason to not have them? Presumably the |
Another thought, are we concerned about the assembly metadata difference: |
The reason for not having them is false positives mentioned in this issue, I have no good way (non-hack like) of handling those, the question if it could happen outside of runtime, if not i thinke its just better to keep disabling the sdk logic cc @terrajobst
I don't think there is a concern, the analyzer not using that attribute at all |
I think we should reenable SupportedOSPlatformAttribute attributes added by sdk, most of the warning are found in Browser build which i think is the only target we should disable/remove adding the attribute. The details how to handle the warnings introduced are commented here. By enabling the sdk attribute back
|
@ViktorHofer @Anipik I see the TFM targets platforms other than |
Never mind i see the new identifiers added here runtime/eng/targetframeworksuffix.props Lines 8 to 12 in 805e288
|
@buyaa-n is this still an issue ? |
There is nothing more left until dotnet/sdk#14836 implemented and using that feature for disabling TFM attribute in test projects |
We are no longer removing the platform from the targetFrameworkString for net5.0 and above, this results in sdk adding
SupportedOSPlatformAttribute
&TargetPlatformAttribute
to the assemblyInfo file. This conflicts with the attributes that we are adding on the api level.We should define a repo wide policy going forward.
There is currently no flag in the sdk to disable writing this attribute while writing this assembly level attriibute. asking sdk team to provide a flag will also be helpful here.
cc @ViktorHofer @ericstj @buyaa-n @safern
The text was updated successfully, but these errors were encountered: