-refonly (Visual Basic)
The -refonly option indicates that the primary output of the compilation should be a reference assembly instead of an implementation assembly. The -refonly
parameter silently disables outputting PDBs, as reference assemblies cannot be executed.
Every compiler option is available in two forms: -option
and /option
. The documentation only shows the -option
form.
Syntax
-refonly
Remarks
Visual Basic supports the -refonly
switch starting with version 15.3.
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.
The -refonly
and -refout
options are mutually exclusive.
See also
Phản hồi
https://aka.ms/ContentUserFeedback.
Sắp ra mắt: Trong năm 2024, chúng tôi sẽ dần gỡ bỏ Sự cố với GitHub dưới dạng cơ chế phản hồi cho nội dung và thay thế bằng hệ thống phản hồi mới. Để biết thêm thông tin, hãy xem:Gửi và xem ý kiến phản hồi dành cho