Skip to content

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
@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