We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
The XML serializer generator uses Assembly.LoadFile to examine the original assembly for serializable types:
Assembly.LoadFile
https://github.com/dotnet/runtime/blob/main/src/libraries/Microsoft.XmlSerializer.Generator/src/Sgen.cs#L480C24-L480C41
Can it result in unintended code execution (eg. module initilizers)? Wouldn't it be more appropriate to use Assembly.ReflectionOnlyLoad?
Assembly.ReflectionOnlyLoad