Class AssemblyAttributes
A helper class for accessing assembly attributes for an assembly.
public class AssemblyAttributes
- Inheritance
-
AssemblyAttributes
- Inherited Members
Constructors
AssemblyAttributes(Assembly)
Initializes a new instance of the AssemblyAttributes class.
public AssemblyAttributes(Assembly assembly)
Parameters
assemblyAssemblyThe assembly from which to access attributes.
Properties
Copyright
Gets the Copyright value from the AssemblyCopyrightAttribute, or null if the attribute does not exist.
public string? Copyright { get; }
Property Value
CopyrightForConsole
Gets the Copyright value from the AssemblyCopyrightAttribute, formatted for display to the console (copyright symbols changed to "(c)"), or null if the attribute does not exist.
public string? CopyrightForConsole { get; }
Property Value
Description
Gets the Description value from the AssemblyDescriptionAttribute, or null if the attribute does not exist.
public string? Description { get; }
Property Value
Entry
Gets the helper for accessing the entry assembly attributes.
public static AssemblyAttributes Entry { get; }
Property Value
FileVersion
Gets the Version value from the AssemblyFileVersionAttribute, or null if the attribute does not exist.
public string? FileVersion { get; }
Property Value
InformationalVersion
Gets the InformationalVersion value from the AssemblyInformationalVersionAttribute, or null if the attribute does not exist.
public string? InformationalVersion { get; }
Property Value
VersionForDisplay
Gets a version for display.
public string VersionForDisplay { get; }
Property Value
Remarks
The version will be the first non-white-space value found from the following possibilities:
- The AssemblyInformationalVersionAttribute value, adjusted as follows:
- If the value appears to be suffixed with build metadata, the build metadata will be removed. This will remove Source Link information that can be automatically added by the .NET SDK. A suffix consisting of a plus sign ("+") followed by one or more dot-separated identifiers, where each identifier consists of one or more alphanumeric digits (case-insensitive) or hyphens, will be interpreted as build metadata. For example, "1.2.3-preview.4+283b49f11d" will be adjusted to be "1.2.3-preview.4".
- The AssemblyFileVersionAttribute value.
- The version from the assembly's long name.
- The "?" string.
Methods
Executing()
Gets the helper for accessing the executing assembly attributes.
public static AssemblyAttributes Executing()
Returns
- AssemblyAttributes
The helper for accessing the executing assembly attributes.