These properties and items are Optionary’s public MSBuild API. They change only in a major version. Set them in the project file or
in a Directory.Build.props:
<PropertyGroup>
<!-- Permissive: unknown keys under Optionary sections aren't flagged -->
false writes no schema files, no Visual Studio segments and no editor settings, and removes the files an earlier build wrote.
OptionarySchemaHost
detected
true or false overrides which projects are hosts. Left empty, test projects (IsTestProject) and applications (OutputTypeExe or WinExe, or an Android application) are.
OptionarySchemaStrict
true
false leaves Optionary’s sections open (no propertyNames check) in the application schema.
OptionarySchemaIncludeSchemaStore
true
false leaves SchemaStore’s appsettings.json schema out of the application schema.
OptionarySchemaCopyToOutput
true
false keeps a host’s application schema in obj/: it isn’t copied to the output directory or published. For hosts that embed their configuration (MAUI, Uno).
OptionarySchemaRequired
false
true lists required members in each fragment’s required. The generator reads this one, so it changes the fragments in every project that sets it.
OptionaryReferenceDocumentation
on
false doesn’t pass referenced packages’ XML documentation files to the generator, so types declared with [assembly: Optionary<T>] get no descriptions from them.
Include is a section path. Schema is the schema of the section’s value as inline JSON, File a JSON file holding it (relative to the project), in the fragment format. It becomes the project’s fragment for that section, like one the generator writes. A package’s buildTransitive targets can add it. See contributing a fragment.
Marks an XML documentation file the generator reads descriptions from, for types declared with [assembly: Optionary<T>]. Optionary adds these itself for package references; add your own for other files.
The application schema, at a stable path (normally obj/appsettings.schema.json). Copied to $(OutDir) and published unless OptionarySchemaCopyToOutput is false.
$(IntermediateOutputPath)appsettings.schema.json
multi-target hosts
The application schema for each target framework after the first.
A framework that builds on Optionary can set OptionarySchemaHost, OptionarySchemaCopyToOutput and
OptionaryZeroAllocValidation from its own targets. Optionary reads them when the schema is computed, not at evaluation, so
a value set anywhere during evaluation counts, and setting them has no effect in a project that doesn’t reference Optionary.
Dovetail does this from its application detection and its embedded-configuration and ZeroAlloc switches.