-refout (C# Compiler Options)
The -refout option specifies a file path where the reference assembly should be output. This translates to
metadataPeStream in the Emit API. This option corresponds to the ProduceReferenceAssembly project property of MSBuild.
The filepath for the reference assembly. It should generally match that of the primary assembly. The recommended convention (used by MSBuild) is to place the reference assembly in a "ref/" sub-folder relative to the primary assembly.
Reference assemblies are a special type of assembly that contain only the minimum amount of metadata required to represent the library's public API surface. They include declarations for all members that are significant when referencing an assembly in build tools, but exclude all member implementations and declarations of private members that have no observable impact on their API contract. For more information, see Reference assemblies in .NET Guide.
-refonly options are mutually exclusive.