Xamarin.IOS. Code analysis - CA2123

652 Views Asked by At

I have Microsoft Extended Correctness Rules rule set for my Xamarin.IOS project. When I analysed I had many troubles:

  1. CA2123: Add the following security attribute to BooleanNegationConverter.Convert(object, Type, object, CultureInfo) in order to match a LinkDemand on base method IMvxValueConverter.Convert(object, Type, object, CultureInfo): SecurityCriticalAttribute.

Why I need set security attributes? For what? Or do I must do it?

  1. CA2134: Transparent or safe critical method .get() is overriding critical method [simple self interface].get() in violation of method override rules. .get() must become security critical in order to override a critical virtual method or implement a critical interface method.

The same... How I can fix it for IOS project? Why I have this problem.

Thanks!

1

There are 1 best solutions below

2
Sven-Michael Stübe On BEST ANSWER

The Code Access Security is only partially and experimentally implemented in Mono.

Code Access Security (CAS) is a new experimental (i.e. unsupported) feature in the Mono 1.2 release. It is complete enough to play with it but should not be used in production (incomplete and unaudited). The security manager is off by default.

These Warnings are important if the runtime uses this feature. It is not used in iOS and Android. So you can ignore it.