3

In my code I am recieving warnings about these two lines:

[assembly:SecurityPermissionAttribute(SecurityAction.RequestMinimum, UnmanagedCode=true)]
[assembly:PermissionSetAttribute(SecurityAction.RequestMinimum, Name = "FullTrust")]

These are the warnings:

S:\Nimrod\src\WinUI\Components\Syncfusion.Grid\AssemblyInfo.cs(38,39): warning CS0618: 'System.Security.Permissions.SecurityAction.RequestMinimum' is obsolete: 'Assembly level declarative security is obsolete and is no longer enforced by the CLR by default. See http://go.microsoft.com/fwlink/?LinkID=155570 for more information.'
S:\Nimrod\src\WinUI\Components\Syncfusion.Grid\AssemblyInfo.cs(39,34): warning CS0618: 'System.Security.Permissions.SecurityAction.RequestMinimum' is obsolete: 'Assembly level declarative security is obsolete and is no longer enforced by the CLR by default. See http://go.microsoft.com/fwlink/?LinkID=155570 for more information.'

I checked out the link mentioned in the warning messages but it isn't quite clear on how to deal with migrating past the obsolete methods. This other question here suggests that I should just delete them, but I'm skeptical of that solution, I believe I should have to replace them with something not just outright delete them.

How should I proceed?

Community
  • 1
  • 1
Kyle V.
  • 4,452
  • 8
  • 42
  • 72
  • Yes, you can safely remove them, as explained in more detail at http://stackoverflow.com/questions/8269045/how-does-one-fix-the-system-security-permissions-securityaction-requestminimum. – Jensen Aug 24 '12 at 15:57
  • @JensenSomers In that question the answer says: `The "naked" CLR no longer restricts CAS permissions under .NET 4.0 unless you flip a "legacy mode" switch, so there is no replacement for your RequestMinimum use.` So I have legacy mode enabled, so does that mean that the permissions ARE restricted and that I DO need to keep those two lines? – Kyle V. Aug 24 '12 at 16:54

0 Answers0