Topic | Value |
---|---|
Id | GU0051 |
Severity | Warning |
Enabled | True |
Category | Gu.Analyzers.Correctness |
Code | GU0051XmlSerializerNotCached |
This constructor loads assemblies in non-GC memory, which may cause memory leaks.
ADD MOTIVATION HERE
ADD HOW TO FIX VIOLATIONS HERE
Configure the severity per project, for more info see MSDN.
#pragma warning disable GU0051 // Cache the XmlSerializer
Code violating the rule here
#pragma warning restore GU0051 // Cache the XmlSerializer
Or put this at the top of the file to disable all instances.
#pragma warning disable GU0051 // Cache the XmlSerializer
[System.Diagnostics.CodeAnalysis.SuppressMessage("Gu.Analyzers.Correctness",
"GU0051:Cache the XmlSerializer",
Justification = "Reason...")]