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

SuppressUnmanagedCodeSecurityAttribute cannot be applied to structures #4620

Closed
ddobrev opened this issue Oct 26, 2015 · 6 comments
Closed
Assignees
Labels
area-System.Runtime enhancement Product code improvement that does NOT require public API changes/additions
Milestone

Comments

@ddobrev
Copy link

ddobrev commented Oct 26, 2015

The documentation says that using SuppressUnmanagedCodeSecurity on a class applies it to all contained methods. The same should work for a structure and its methods.

@joshfree
Copy link
Member

joshfree commented Nov 3, 2015

@morganbr PTAL

@morganbr
Copy link
Contributor

morganbr commented Nov 3, 2015

@ddobrev, could you please tell us more about your intended usage for SuppressUnmanagedCodeSecurity on a struct? In case it helps, you don't need that attribute at all with CoreCLR -- it's effectively always turned on.

@ddobrev
Copy link
Author

ddobrev commented Nov 4, 2015

I need to support .NET 4.0 too which means CoreCLR cannot help me. I used it in the most standard way possible - I have structures with many P/Invoke declarations within and I am forced to apply the attribute to each one, and to also remember to apply it to each newly added P/Invoke. If this worked, I would've been able to apply the attribute to the structure itself and forget about it.

@gkhanna79
Copy link
Member

@morganbr Is this actionable for 1.1.0 RTM?

@morganbr
Copy link
Contributor

@gkhanna79 This isn't actionable for 1.1. It looks like the request it to support it on full framework (though the attribute would have to be updated on CoreCLR as well).

@jkotas
Copy link
Member

jkotas commented May 23, 2019

CAS is not supported in .NET Core.

@jkotas jkotas closed this as completed May 23, 2019
@msftgits msftgits transferred this issue from dotnet/coreclr Jan 30, 2020
@msftgits msftgits added this to the Future milestone Jan 30, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Jan 4, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-System.Runtime enhancement Product code improvement that does NOT require public API changes/additions
Projects
None yet
Development

No branches or pull requests

6 participants