This PR is preparing Hive.Versioning (and other projects in the future) for packaging as standalone libraries.
Notably, it introduces a BuildStandalone property which can be set on the command line to the name of the project to build as a standalone library. When set, that project will be automatically ILLinked and ILRepacked with its dependencies and the result will be only a single file.
This also adds some other properties, which may be set by either a project or on the command line:
DoNotMergeNugetPackages - Prevents Nuget packages from being included in the merge
SkipILRepack - Skips the ILRepack step of the build
This also adds some item groups which control various parts of the packaging:
AllowRepackDuplicateType - Tells ILRepack that a type should be merged instead of renamed if there are duplicates.
By default, this includes EmbeddedAttribute, NullableAttribute, NullableContextAttribute, IsByRefLikeAttribute, and IsReadOnlyAttribute. Types specified here must have their full type names specified.
ExcludeFromInternalize - Tells ILRepack to not internalize a type. Hive.Versioning itself specifies Hive.Utilities.StringView here because it uses StringView in its public API.
At the moment, building with BuildStandalone is only known to work on Windows, because it uses ILRepack directly, which is a .NET Framework application. To build this, move to the folder Hive.Versioning and run the commands
This PR is preparing Hive.Versioning (and other projects in the future) for packaging as standalone libraries.
Notably, it introduces a
BuildStandalone
property which can be set on the command line to the name of the project to build as a standalone library. When set, that project will be automatically ILLinked and ILRepacked with its dependencies and the result will be only a single file.This also adds some other properties, which may be set by either a project or on the command line:
DoNotMergeNugetPackages
- Prevents Nuget packages from being included in the mergeSkipILRepack
- Skips the ILRepack step of the buildThis also adds some item groups which control various parts of the packaging:
AllowRepackDuplicateType
- Tells ILRepack that a type should be merged instead of renamed if there are duplicates.By default, this includes
EmbeddedAttribute
,NullableAttribute
,NullableContextAttribute
,IsByRefLikeAttribute
, andIsReadOnlyAttribute
. Types specified here must have their full type names specified.ExcludeFromInternalize
- Tells ILRepack to not internalize a type. Hive.Versioning itself specifiesHive.Utilities.StringView
here because it uses StringView in its public API.At the moment, building with
BuildStandalone
is only known to work on Windows, because it uses ILRepack directly, which is a .NET Framework application. To build this, move to the folderHive.Versioning
and run the commandsThe result in the
bin
subfolder will be the packed binaries.