All rules
CA1421Portability and interoperability Enabled by default: As suggestion

Method uses runtime marshalling when DisableRuntimeMarshallingAttribute is applied

Method uses runtime marshalling when DisableRuntimeMarshallingAttribute is applied

Microsoft docs

Description

If a method uses runtime marshalling when runtime marshalling is disabled, it can cause unexpected behavior differences at runtime due to different expectations of a type's native layout.

Cause

A method uses runtime marshalling, and runtime marshalling is explicitly disabled.

How to fix violations

Enable runtime marshalling or use features like sizeof and pointers to ensure accurate results.

When to suppress

Don't suppress a warning from this rule.

Group results
0 yes 0 no
ConsensusNone (disabled)
Severity preference (yes voters)
Suggestion0
Warning0
Error0