Skip to content
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

Fix target frameworks for MemberNotNullAttribute and MemberNotNullWhenAttribute #16

Merged
merged 1 commit into from
Oct 8, 2024

Conversation

bfriesen
Copy link
Contributor

@bfriesen bfriesen commented Oct 8, 2024

The current version doesn't include MemberNotNullAttribute and MemberNotNullWhenAttribute for .NET Standard 2.1 or .NET Core 3.1 projects, but if you try to use them from such projects, you get compiler error CS0122: inaccessible due to its protection level.

According to the documentation, these attributes weren't added (or more accurately, made public) until .NET 5:

This pull request moves these two files to the Net50 folder and fixes their #if directives.

@Tyrrrz Tyrrrz added the bug Something isn't working label Oct 8, 2024
@Tyrrrz
Copy link
Owner

Tyrrrz commented Oct 8, 2024

Thanks a lot! Nice catch

@Tyrrrz Tyrrrz changed the title MemberNotNullAttribute and MemberNotNullWhenAttribute target < .NET 5 Fix target frameworks for MemberNotNullAttribute and MemberNotNullWhenAttribute Oct 8, 2024
@Tyrrrz Tyrrrz merged commit 6945ee8 into Tyrrrz:master Oct 8, 2024
3 checks passed
@Tyrrrz
Copy link
Owner

Tyrrrz commented Oct 8, 2024

I'm going to release it as part of a new version on thursday

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants