C#


ROSLYN.INTEROPERABILITY.CA1421 : This method uses runtime marshalling even when the 'DisableRuntimeMarshallingAttribute' is applied (C#)

See Roslyn-Detected C# Warning Classes for more information.

Summary

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

This check corresponds to Roslyn rule CA1421. For full rule details, see the Microsoft website: CA1421.

Properties

Class Name This method uses runtime marshalling even when the 'DisableRuntimeMarshallingAttribute' is applied (C#)
Significance reliability
Mnemonic ROSLYN.INTEROPERABILITY.CA1421
Categories None
Availability Available for C# only.
Enabling Checks for this warning class are enabled by default. To disable them, add the following WARNING_FILTER rule to the project configuration file.
WARNING_FILTER += discard class="This method uses runtime marshalling even when the 'DisableRuntimeMarshallingAttribute' is applied (C#)"

Relevant Configuration File Parameters

The following configuration file parameters affect checks for this warning class.