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

DefaultValuesHandling is not a valid named attribute argument because it is not a valid attribute parameter type #466

Closed
Phyksar opened this issue Feb 15, 2020 · 2 comments

Comments

@Phyksar
Copy link

Phyksar commented Feb 15, 2020

DefaultValuesHandling attribute is not usable in Visual Studio 2019, I assume this is because it is declared as nullable enum.

public DefaultValuesHandling? DefaultValuesHandling { get; set; }

When using it on a class field compiler outputs following message:

Severity  Code    Description
Error	  CS0655  'DefaultValuesHandling' is not a valid named attribute argument because it is not a valid attribute parameter type
@aaubry
Copy link
Owner

aaubry commented Feb 16, 2020

Thanks for reporting this problem. I'll look into this and get back to you, hopefully tomorrow.

@aaubry
Copy link
Owner

aaubry commented Feb 17, 2020

Of course you're right. We can't use nullables in custom attributes. I'll fix that.

@aaubry aaubry closed this as completed in 5db187e Feb 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants