From 5eba218dc05b8b502b8bc720ac83fe3f6b86de21 Mon Sep 17 00:00:00 2001 From: ryfu-msft Date: Mon, 11 Nov 2024 14:00:37 -0800 Subject: [PATCH 1/3] fix tests --- .../Properties/Resources.Designer.cs | 27 + src/WingetCreateCLI/Properties/Resources.resx | 9 + src/WingetCreateCLI/WingetCreateCLI.csproj | 4 +- src/WingetCreateCore/Common/PackageParser.cs | 1 - .../Models/DefaultLocaleManifestModels.cs | 366 +++-- .../Models/InstallerManifestModels.cs | 868 +++++++----- .../Models/LocaleManifestModels.cs | 360 +++-- .../Models/SingletonManifestModels.cs | 1182 +++++++++++------ .../Models/VersionManifestModels.cs | 54 +- src/WingetCreateCore/WingetCreateCore.csproj | 14 +- ...blisher.DontMoveInstallerFieldsToRoot.yaml | 11 +- .../TestPublisher.FullJsonSingleton1_6.json | 154 +++ .../TestPublisher.FullJsonSingleton1_7.json | 156 +++ .../TestPublisher.FullJsonSingleton1_9.json | 157 +++ .../TestPublisher.FullYamlSingleton1_6.yaml | 106 ++ .../TestPublisher.FullYamlSingleton1_7.yaml | 108 ++ .../TestPublisher.FullYamlSingleton1_9.yaml | 109 ++ ...stPublisher.MoveInstallerFieldsToRoot.yaml | 12 +- .../UnitTests/UpdateCommandTests.cs | 91 ++ .../WingetCreateTests.csproj | 20 +- 20 files changed, 2744 insertions(+), 1065 deletions(-) create mode 100644 src/WingetCreateTests/WingetCreateTests/Resources/TestPublisher.FullJsonSingleton1_6.json create mode 100644 src/WingetCreateTests/WingetCreateTests/Resources/TestPublisher.FullJsonSingleton1_7.json create mode 100644 src/WingetCreateTests/WingetCreateTests/Resources/TestPublisher.FullJsonSingleton1_9.json create mode 100644 src/WingetCreateTests/WingetCreateTests/Resources/TestPublisher.FullYamlSingleton1_6.yaml create mode 100644 src/WingetCreateTests/WingetCreateTests/Resources/TestPublisher.FullYamlSingleton1_7.yaml create mode 100644 src/WingetCreateTests/WingetCreateTests/Resources/TestPublisher.FullYamlSingleton1_9.yaml diff --git a/src/WingetCreateCLI/Properties/Resources.Designer.cs b/src/WingetCreateCLI/Properties/Resources.Designer.cs index 8cea1df8..5010840b 100644 --- a/src/WingetCreateCLI/Properties/Resources.Designer.cs +++ b/src/WingetCreateCLI/Properties/Resources.Designer.cs @@ -222,6 +222,15 @@ public static string ArchitectureOverride_Warning { } } + /// + /// Looks up a localized string similar to Indicates whether the install location should be added directly to the PATH environment variable. Only applies to an archive containing portable packages.. + /// + public static string ArchiveBinariesDependOnPath_KeywordDescription { + get { + return ResourceManager.GetString("ArchiveBinariesDependOnPath_KeywordDescription", resourceCulture); + } + } + /// /// Looks up a localized string similar to Too many arguments specified for the following installer URL: {0}. /// @@ -2562,6 +2571,24 @@ public static string RemoveLastItem_MenuItem { } } + /// + /// Looks up a localized string similar to The value passed to the installer, ModifyPath ARP command, or uninstaller ARP command for a repair. + /// + public static string Repair_KeywordDescription { + get { + return ResourceManager.GetString("Repair_KeywordDescription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The repair method. + /// + public static string RepairBehavior_KeywordDescription { + get { + return ResourceManager.GetString("RepairBehavior_KeywordDescription", resourceCulture); + } + } + /// /// Looks up a localized string similar to Replace operation cannot be performed. Package identifier '{0}' does not exist in the Windows Package Manager repo.. /// diff --git a/src/WingetCreateCLI/Properties/Resources.resx b/src/WingetCreateCLI/Properties/Resources.resx index 0458ff00..65f945fc 100644 --- a/src/WingetCreateCLI/Properties/Resources.resx +++ b/src/WingetCreateCLI/Properties/Resources.resx @@ -1383,4 +1383,13 @@ URL to be used when updating the release notes url field. + + The repair method + + + The value passed to the installer, ModifyPath ARP command, or uninstaller ARP command for a repair + + + Indicates whether the install location should be added directly to the PATH environment variable. Only applies to an archive containing portable packages. + \ No newline at end of file diff --git a/src/WingetCreateCLI/WingetCreateCLI.csproj b/src/WingetCreateCLI/WingetCreateCLI.csproj index 7883849b..ada97f5d 100644 --- a/src/WingetCreateCLI/WingetCreateCLI.csproj +++ b/src/WingetCreateCLI/WingetCreateCLI.csproj @@ -2,10 +2,10 @@ Exe - net6.0-windows10.0.22000.0 + net8.0-windows10.0.22000.0 WingetCreateCLI Microsoft.WingetCreateCLI - 1.6 + 1.9 x64;x86 win-x64;win-x86 true diff --git a/src/WingetCreateCore/Common/PackageParser.cs b/src/WingetCreateCore/Common/PackageParser.cs index 051128b2..447fefc6 100644 --- a/src/WingetCreateCore/Common/PackageParser.cs +++ b/src/WingetCreateCore/Common/PackageParser.cs @@ -19,7 +19,6 @@ namespace Microsoft.WingetCreateCore using Microsoft.Msix.Utils; using Microsoft.Msix.Utils.AppxPackaging; using Microsoft.Msix.Utils.AppxPackagingInterop; - using Microsoft.Msix.Utils.Logger; using Microsoft.WingetCreateCore.Common; using Microsoft.WingetCreateCore.Common.Exceptions; using Microsoft.WingetCreateCore.Models; diff --git a/src/WingetCreateCore/Models/DefaultLocaleManifestModels.cs b/src/WingetCreateCore/Models/DefaultLocaleManifestModels.cs index 9d462683..86ad3080 100644 --- a/src/WingetCreateCore/Models/DefaultLocaleManifestModels.cs +++ b/src/WingetCreateCore/Models/DefaultLocaleManifestModels.cs @@ -1,357 +1,457 @@ //---------------------- // -// Generated using the NJsonSchema v10.4.3.0 (Newtonsoft.Json v11.0.0.0) (http://NJsonSchema.org) +// Generated using the NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0) (http://NJsonSchema.org) // //---------------------- + namespace Microsoft.WingetCreateCore.Models.DefaultLocale { #pragma warning disable // Disable all warnings - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.3.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class Agreement + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "11.0.0.0 (Newtonsoft.Json v13.0.0.0)")] + public partial class Agreement { - /// The label of the Agreement. i.e. EULA, AgeRating, etc. This field should be localized. Either Agreement or AgreementUrl is required. When we show the agreements, we would Bold the AgreementLabel + /// + /// The label of the Agreement. i.e. EULA, AgeRating, etc. This field should be localized. Either Agreement or AgreementUrl is required. When we show the agreements, we would Bold the AgreementLabel + /// [Newtonsoft.Json.JsonProperty("AgreementLabel", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(100, MinimumLength = 1)] public string AgreementLabel { get; set; } - - /// The agreement text content. + + /// + /// The agreement text content. + /// [Newtonsoft.Json.JsonProperty("Agreement", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(10000, MinimumLength = 1)] public string Agreement1 { get; set; } - - /// The agreement URL. + + /// + /// The agreement URL. + /// [Newtonsoft.Json.JsonProperty("AgreementUrl", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(2048)] [System.ComponentModel.DataAnnotations.RegularExpression(@"^([Hh][Tt][Tt][Pp][Ss]?)://.+$")] public string AgreementUrl { get; set; } - - private System.Collections.Generic.IDictionary _additionalProperties = new System.Collections.Generic.Dictionary(); - + + + + private System.Collections.Generic.IDictionary _additionalProperties; + [Newtonsoft.Json.JsonExtensionData] public System.Collections.Generic.IDictionary AdditionalProperties { - get { return _additionalProperties; } + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); } set { _additionalProperties = value; } } - - + } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.3.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class Documentation + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "11.0.0.0 (Newtonsoft.Json v13.0.0.0)")] + public partial class Documentation { - /// The label of the documentation for providing software guides such as manuals and troubleshooting URLs. + /// + /// The label of the documentation for providing software guides such as manuals and troubleshooting URLs. + /// [Newtonsoft.Json.JsonProperty("DocumentLabel", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(100, MinimumLength = 1)] public string DocumentLabel { get; set; } - - /// The documentation URL. + + /// + /// The documentation URL. + /// [Newtonsoft.Json.JsonProperty("DocumentUrl", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(2048)] [System.ComponentModel.DataAnnotations.RegularExpression(@"^([Hh][Tt][Tt][Pp][Ss]?)://.+$")] public string DocumentUrl { get; set; } - - private System.Collections.Generic.IDictionary _additionalProperties = new System.Collections.Generic.Dictionary(); - + + + + private System.Collections.Generic.IDictionary _additionalProperties; + [Newtonsoft.Json.JsonExtensionData] public System.Collections.Generic.IDictionary AdditionalProperties { - get { return _additionalProperties; } + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); } set { _additionalProperties = value; } } - - + } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.3.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class Icon + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "11.0.0.0 (Newtonsoft.Json v13.0.0.0)")] + public partial class Icon { - /// The url of the hosted icon file + /// + /// The url of the hosted icon file + /// [Newtonsoft.Json.JsonProperty("IconUrl", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(2048)] [System.ComponentModel.DataAnnotations.RegularExpression(@"^([Hh][Tt][Tt][Pp][Ss]?)://.+$")] public string IconUrl { get; set; } - - /// The icon file type + + /// + /// The icon file type + /// [Newtonsoft.Json.JsonProperty("IconFileType", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] public IconFileType IconFileType { get; set; } - - /// Optional icon resolution + + /// + /// Optional icon resolution + /// [Newtonsoft.Json.JsonProperty("IconResolution", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] public IconResolution? IconResolution { get; set; } - - /// Optional icon theme + + /// + /// Optional icon theme + /// [Newtonsoft.Json.JsonProperty("IconTheme", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] public IconTheme? IconTheme { get; set; } - - /// Optional Sha256 of the icon file + + /// + /// Optional Sha256 of the icon file + /// [Newtonsoft.Json.JsonProperty("IconSha256", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.RegularExpression(@"^[A-Fa-f0-9]{64}$")] public string IconSha256 { get; set; } - - private System.Collections.Generic.IDictionary _additionalProperties = new System.Collections.Generic.Dictionary(); - + + + + private System.Collections.Generic.IDictionary _additionalProperties; + [Newtonsoft.Json.JsonExtensionData] public System.Collections.Generic.IDictionary AdditionalProperties { - get { return _additionalProperties; } + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); } set { _additionalProperties = value; } } - - + } - - /// A representation of a multiple-file manifest representing a default app metadata in the OWC. v1.6.0 - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.3.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class DefaultLocaleManifest + + /// + /// A representation of a multiple-file manifest representing a default app metadata in the OWC. v1.9.0 + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "11.0.0.0 (Newtonsoft.Json v13.0.0.0)")] + public partial class DefaultLocaleManifest { - /// The package unique identifier + /// + /// The package unique identifier + /// [Newtonsoft.Json.JsonProperty("PackageIdentifier", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] [System.ComponentModel.DataAnnotations.StringLength(128)] [System.ComponentModel.DataAnnotations.RegularExpression(@"^[^\.\s\\/:\*\?""<>\|\x01-\x1f]{1,32}(\.[^\.\s\\/:\*\?""<>\|\x01-\x1f]{1,32}){1,7}$")] public string PackageIdentifier { get; set; } - - /// The package version + + /// + /// The package version + /// [Newtonsoft.Json.JsonProperty("PackageVersion", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] [System.ComponentModel.DataAnnotations.StringLength(128)] [System.ComponentModel.DataAnnotations.RegularExpression(@"^[^\\/:\*\?""<>\|\x01-\x1f]+$")] public string PackageVersion { get; set; } - - /// The package meta-data locale + + /// + /// The package meta-data locale + /// [Newtonsoft.Json.JsonProperty("PackageLocale", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] [System.ComponentModel.DataAnnotations.StringLength(20)] [System.ComponentModel.DataAnnotations.RegularExpression(@"^([a-zA-Z]{2,3}|[iI]-[a-zA-Z]+|[xX]-[a-zA-Z]{1,8})(-[a-zA-Z]{1,8})*$")] public string PackageLocale { get; set; } = "en-US"; - - /// The publisher name + + /// + /// The publisher name + /// [Newtonsoft.Json.JsonProperty("Publisher", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.Required] [System.ComponentModel.DataAnnotations.StringLength(256, MinimumLength = 2)] public string Publisher { get; set; } - - /// The publisher home page + + /// + /// The publisher home page + /// [Newtonsoft.Json.JsonProperty("PublisherUrl", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(2048)] [System.ComponentModel.DataAnnotations.RegularExpression(@"^([Hh][Tt][Tt][Pp][Ss]?)://.+$")] public string PublisherUrl { get; set; } - - /// The publisher support page + + /// + /// The publisher support page + /// [Newtonsoft.Json.JsonProperty("PublisherSupportUrl", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(2048)] [System.ComponentModel.DataAnnotations.RegularExpression(@"^([Hh][Tt][Tt][Pp][Ss]?)://.+$")] public string PublisherSupportUrl { get; set; } - - /// The publisher privacy page or the package privacy page + + /// + /// The publisher privacy page or the package privacy page + /// [Newtonsoft.Json.JsonProperty("PrivacyUrl", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(2048)] [System.ComponentModel.DataAnnotations.RegularExpression(@"^([Hh][Tt][Tt][Pp][Ss]?)://.+$")] public string PrivacyUrl { get; set; } - - /// The package author + + /// + /// The package author + /// [Newtonsoft.Json.JsonProperty("Author", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(256, MinimumLength = 2)] public string Author { get; set; } - - /// The package name + + /// + /// The package name + /// [Newtonsoft.Json.JsonProperty("PackageName", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.Required] [System.ComponentModel.DataAnnotations.StringLength(256, MinimumLength = 2)] public string PackageName { get; set; } - - /// The package home page + + /// + /// The package home page + /// [Newtonsoft.Json.JsonProperty("PackageUrl", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(2048)] [System.ComponentModel.DataAnnotations.RegularExpression(@"^([Hh][Tt][Tt][Pp][Ss]?)://.+$")] public string PackageUrl { get; set; } - - /// The package license + + /// + /// The package license + /// [Newtonsoft.Json.JsonProperty("License", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.Required] [System.ComponentModel.DataAnnotations.StringLength(512, MinimumLength = 3)] public string License { get; set; } - - /// The license page + + /// + /// The license page + /// [Newtonsoft.Json.JsonProperty("LicenseUrl", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(2048)] [System.ComponentModel.DataAnnotations.RegularExpression(@"^([Hh][Tt][Tt][Pp][Ss]?)://.+$")] public string LicenseUrl { get; set; } - - /// The package copyright + + /// + /// The package copyright + /// [Newtonsoft.Json.JsonProperty("Copyright", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(512, MinimumLength = 3)] public string Copyright { get; set; } - - /// The package copyright page + + /// + /// The package copyright page + /// [Newtonsoft.Json.JsonProperty("CopyrightUrl", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(2048)] [System.ComponentModel.DataAnnotations.RegularExpression(@"^([Hh][Tt][Tt][Pp][Ss]?)://.+$")] public string CopyrightUrl { get; set; } - - /// The short package description + + /// + /// The short package description + /// [Newtonsoft.Json.JsonProperty("ShortDescription", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.Required] [System.ComponentModel.DataAnnotations.StringLength(256, MinimumLength = 3)] public string ShortDescription { get; set; } - - /// The full package description + + /// + /// The full package description + /// [Newtonsoft.Json.JsonProperty("Description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(10000, MinimumLength = 3)] public string Description { get; set; } - - /// The most common package term + + /// + /// The most common package term + /// [Newtonsoft.Json.JsonProperty("Moniker", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(40, MinimumLength = 1)] public string Moniker { get; set; } - - /// List of additional package search terms + + /// + /// List of additional package search terms + /// [Newtonsoft.Json.JsonProperty("Tags", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.MaxLength(16)] public System.Collections.Generic.List Tags { get; set; } - + [Newtonsoft.Json.JsonProperty("Agreements", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.MaxLength(128)] public System.Collections.Generic.List Agreements { get; set; } - - /// The package release notes + + /// + /// The package release notes + /// [Newtonsoft.Json.JsonProperty("ReleaseNotes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(10000, MinimumLength = 1)] public string ReleaseNotes { get; set; } - - /// The package release notes url + + /// + /// The package release notes url + /// [Newtonsoft.Json.JsonProperty("ReleaseNotesUrl", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(2048)] [System.ComponentModel.DataAnnotations.RegularExpression(@"^([Hh][Tt][Tt][Pp][Ss]?)://.+$")] public string ReleaseNotesUrl { get; set; } - - /// The purchase url for acquiring entitlement for the package. + + /// + /// The purchase url for acquiring entitlement for the package. + /// [Newtonsoft.Json.JsonProperty("PurchaseUrl", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(2048)] [System.ComponentModel.DataAnnotations.RegularExpression(@"^([Hh][Tt][Tt][Pp][Ss]?)://.+$")] public string PurchaseUrl { get; set; } - - /// The notes displayed to the user upon completion of a package installation. + + /// + /// The notes displayed to the user upon completion of a package installation. + /// [Newtonsoft.Json.JsonProperty("InstallationNotes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(10000, MinimumLength = 1)] public string InstallationNotes { get; set; } - + [Newtonsoft.Json.JsonProperty("Documentations", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.MaxLength(256)] public System.Collections.Generic.List Documentations { get; set; } - + [Newtonsoft.Json.JsonProperty("Icons", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.MaxLength(1024)] public System.Collections.Generic.List Icons { get; set; } - - /// The manifest type + + /// + /// The manifest type + /// [Newtonsoft.Json.JsonProperty("ManifestType", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] public string ManifestType { get; set; } = "defaultLocale"; - - /// The manifest syntax version + + /// + /// The manifest syntax version + /// [Newtonsoft.Json.JsonProperty("ManifestVersion", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] [System.ComponentModel.DataAnnotations.RegularExpression(@"^(0|[1-9][0-9]{0,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])(\.(0|[1-9][0-9]{0,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])){2}$")] - public string ManifestVersion { get; set; } = "1.6.0"; - - private System.Collections.Generic.IDictionary _additionalProperties = new System.Collections.Generic.Dictionary(); - + public string ManifestVersion { get; set; } = "1.9.0"; + + + + private System.Collections.Generic.IDictionary _additionalProperties; + [Newtonsoft.Json.JsonExtensionData] public System.Collections.Generic.IDictionary AdditionalProperties { - get { return _additionalProperties; } + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); } set { _additionalProperties = value; } } - - + } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.3.0 (Newtonsoft.Json v11.0.0.0)")] + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "11.0.0.0 (Newtonsoft.Json v13.0.0.0)")] public enum IconFileType { + [System.Runtime.Serialization.EnumMember(Value = @"png")] Png = 0, - + + [System.Runtime.Serialization.EnumMember(Value = @"jpeg")] Jpeg = 1, - + + [System.Runtime.Serialization.EnumMember(Value = @"ico")] Ico = 2, - + + } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.3.0 (Newtonsoft.Json v11.0.0.0)")] + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "11.0.0.0 (Newtonsoft.Json v13.0.0.0)")] public enum IconResolution { + [System.Runtime.Serialization.EnumMember(Value = @"custom")] Custom = 0, - + + [System.Runtime.Serialization.EnumMember(Value = @"16x16")] _16x16 = 1, - + + [System.Runtime.Serialization.EnumMember(Value = @"20x20")] _20x20 = 2, - + + [System.Runtime.Serialization.EnumMember(Value = @"24x24")] _24x24 = 3, - + + [System.Runtime.Serialization.EnumMember(Value = @"30x30")] _30x30 = 4, - + + [System.Runtime.Serialization.EnumMember(Value = @"32x32")] _32x32 = 5, - + + [System.Runtime.Serialization.EnumMember(Value = @"36x36")] _36x36 = 6, - + + [System.Runtime.Serialization.EnumMember(Value = @"40x40")] _40x40 = 7, - + + [System.Runtime.Serialization.EnumMember(Value = @"48x48")] _48x48 = 8, - + + [System.Runtime.Serialization.EnumMember(Value = @"60x60")] _60x60 = 9, - + + [System.Runtime.Serialization.EnumMember(Value = @"64x64")] _64x64 = 10, - + + [System.Runtime.Serialization.EnumMember(Value = @"72x72")] _72x72 = 11, - + + [System.Runtime.Serialization.EnumMember(Value = @"80x80")] _80x80 = 12, - + + [System.Runtime.Serialization.EnumMember(Value = @"96x96")] _96x96 = 13, - + + [System.Runtime.Serialization.EnumMember(Value = @"256x256")] _256x256 = 14, - + + } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.3.0 (Newtonsoft.Json v11.0.0.0)")] + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "11.0.0.0 (Newtonsoft.Json v13.0.0.0)")] public enum IconTheme { + [System.Runtime.Serialization.EnumMember(Value = @"default")] Default = 0, - + + [System.Runtime.Serialization.EnumMember(Value = @"light")] Light = 1, - + + [System.Runtime.Serialization.EnumMember(Value = @"dark")] Dark = 2, - + + [System.Runtime.Serialization.EnumMember(Value = @"highContrast")] HighContrast = 3, - + + } } \ No newline at end of file diff --git a/src/WingetCreateCore/Models/InstallerManifestModels.cs b/src/WingetCreateCore/Models/InstallerManifestModels.cs index a3346190..fb7f4a46 100644 --- a/src/WingetCreateCore/Models/InstallerManifestModels.cs +++ b/src/WingetCreateCore/Models/InstallerManifestModels.cs @@ -1,897 +1,1111 @@ //---------------------- // -// Generated using the NJsonSchema v10.4.3.0 (Newtonsoft.Json v11.0.0.0) (http://NJsonSchema.org) +// Generated using the NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0) (http://NJsonSchema.org) // //---------------------- + namespace Microsoft.WingetCreateCore.Models.Installer { #pragma warning disable // Disable all warnings - /// Enumeration of supported installer types. InstallerType is required in either root level or individual Installer level - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.3.0 (Newtonsoft.Json v11.0.0.0)")] + /// + /// Enumeration of supported installer types. InstallerType is required in either root level or individual Installer level + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "11.0.0.0 (Newtonsoft.Json v13.0.0.0)")] public enum InstallerType { + [System.Runtime.Serialization.EnumMember(Value = @"msix")] Msix = 0, - + + [System.Runtime.Serialization.EnumMember(Value = @"msi")] Msi = 1, - + + [System.Runtime.Serialization.EnumMember(Value = @"appx")] Appx = 2, - + + [System.Runtime.Serialization.EnumMember(Value = @"exe")] Exe = 3, - + + [System.Runtime.Serialization.EnumMember(Value = @"zip")] Zip = 4, - + + [System.Runtime.Serialization.EnumMember(Value = @"inno")] Inno = 5, - + + [System.Runtime.Serialization.EnumMember(Value = @"nullsoft")] Nullsoft = 6, - + + [System.Runtime.Serialization.EnumMember(Value = @"wix")] Wix = 7, - + + [System.Runtime.Serialization.EnumMember(Value = @"burn")] Burn = 8, - + + [System.Runtime.Serialization.EnumMember(Value = @"pwa")] Pwa = 9, - + + [System.Runtime.Serialization.EnumMember(Value = @"portable")] Portable = 10, - + + } - - /// Enumeration of supported nested installer types contained inside an archive file - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.3.0 (Newtonsoft.Json v11.0.0.0)")] + + /// + /// Enumeration of supported nested installer types contained inside an archive file + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "11.0.0.0 (Newtonsoft.Json v13.0.0.0)")] public enum NestedInstallerType { + [System.Runtime.Serialization.EnumMember(Value = @"msix")] Msix = 0, - + + [System.Runtime.Serialization.EnumMember(Value = @"msi")] Msi = 1, - + + [System.Runtime.Serialization.EnumMember(Value = @"appx")] Appx = 2, - + + [System.Runtime.Serialization.EnumMember(Value = @"exe")] Exe = 3, - + + [System.Runtime.Serialization.EnumMember(Value = @"inno")] Inno = 4, - + + [System.Runtime.Serialization.EnumMember(Value = @"nullsoft")] Nullsoft = 5, - + + [System.Runtime.Serialization.EnumMember(Value = @"wix")] Wix = 6, - + + [System.Runtime.Serialization.EnumMember(Value = @"burn")] Burn = 7, - + + [System.Runtime.Serialization.EnumMember(Value = @"portable")] Portable = 8, - + + } - - /// The installer target architecture - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.3.0 (Newtonsoft.Json v11.0.0.0)")] + + /// + /// The installer target architecture + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "11.0.0.0 (Newtonsoft.Json v13.0.0.0)")] public enum Architecture { + [System.Runtime.Serialization.EnumMember(Value = @"x86")] X86 = 0, - + + [System.Runtime.Serialization.EnumMember(Value = @"x64")] X64 = 1, - + + [System.Runtime.Serialization.EnumMember(Value = @"arm")] Arm = 2, - + + [System.Runtime.Serialization.EnumMember(Value = @"arm64")] Arm64 = 3, - + + [System.Runtime.Serialization.EnumMember(Value = @"neutral")] Neutral = 4, - + + } - - /// Scope indicates if the installer is per user or per machine - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.3.0 (Newtonsoft.Json v11.0.0.0)")] + + /// + /// Scope indicates if the installer is per user or per machine + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "11.0.0.0 (Newtonsoft.Json v13.0.0.0)")] public enum Scope { + [System.Runtime.Serialization.EnumMember(Value = @"user")] User = 0, - + + [System.Runtime.Serialization.EnumMember(Value = @"machine")] Machine = 1, - + + } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.3.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class InstallerSwitches + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "11.0.0.0 (Newtonsoft.Json v13.0.0.0)")] + public partial class InstallerSwitches { - /// Silent is the value that should be passed to the installer when user chooses a silent or quiet install + /// + /// Silent is the value that should be passed to the installer when user chooses a silent or quiet install + /// [Newtonsoft.Json.JsonProperty("Silent", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(512, MinimumLength = 1)] public string Silent { get; set; } - - /// SilentWithProgress is the value that should be passed to the installer when user chooses a non-interactive install + + /// + /// SilentWithProgress is the value that should be passed to the installer when user chooses a non-interactive install + /// [Newtonsoft.Json.JsonProperty("SilentWithProgress", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(512, MinimumLength = 1)] public string SilentWithProgress { get; set; } - - /// Interactive is the value that should be passed to the installer when user chooses an interactive install + + /// + /// Interactive is the value that should be passed to the installer when user chooses an interactive install + /// [Newtonsoft.Json.JsonProperty("Interactive", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(512, MinimumLength = 1)] public string Interactive { get; set; } - - /// InstallLocation is the value passed to the installer for custom install location. <INSTALLPATH> token can be included in the switch value so that winget will replace the token with user provided path + + /// + /// InstallLocation is the value passed to the installer for custom install location. <INSTALLPATH> token can be included in the switch value so that winget will replace the token with user provided path + /// [Newtonsoft.Json.JsonProperty("InstallLocation", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(512, MinimumLength = 1)] public string InstallLocation { get; set; } - - /// Log is the value passed to the installer for custom log file path. <LOGPATH> token can be included in the switch value so that winget will replace the token with user provided path + + /// + /// Log is the value passed to the installer for custom log file path. <LOGPATH> token can be included in the switch value so that winget will replace the token with user provided path + /// [Newtonsoft.Json.JsonProperty("Log", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(512, MinimumLength = 1)] public string Log { get; set; } - - /// Upgrade is the value that should be passed to the installer when user chooses an upgrade + + /// + /// Upgrade is the value that should be passed to the installer when user chooses an upgrade + /// [Newtonsoft.Json.JsonProperty("Upgrade", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(512, MinimumLength = 1)] public string Upgrade { get; set; } - - /// Custom switches will be passed directly to the installer by winget + + /// + /// Custom switches will be passed directly to the installer by winget + /// [Newtonsoft.Json.JsonProperty("Custom", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(2048, MinimumLength = 1)] public string Custom { get; set; } - - private System.Collections.Generic.IDictionary _additionalProperties = new System.Collections.Generic.Dictionary(); - + + /// + /// The 'Repair' value must be passed to the installer, ModifyPath ARP command, or uninstaller ARP command when the user opts for a repair. + /// + [Newtonsoft.Json.JsonProperty("Repair", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [System.ComponentModel.DataAnnotations.StringLength(512, MinimumLength = 1)] + public string Repair { get; set; } + + + + private System.Collections.Generic.IDictionary _additionalProperties; + [Newtonsoft.Json.JsonExtensionData] public System.Collections.Generic.IDictionary AdditionalProperties { - get { return _additionalProperties; } + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); } set { _additionalProperties = value; } } - - + } - - /// The upgrade method - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.3.0 (Newtonsoft.Json v11.0.0.0)")] + + /// + /// The upgrade method + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "11.0.0.0 (Newtonsoft.Json v13.0.0.0)")] public enum UpgradeBehavior { + [System.Runtime.Serialization.EnumMember(Value = @"install")] Install = 0, - + + [System.Runtime.Serialization.EnumMember(Value = @"uninstallPrevious")] UninstallPrevious = 1, - + + [System.Runtime.Serialization.EnumMember(Value = @"deny")] Deny = 2, - + + } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.3.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class Dependencies + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "11.0.0.0 (Newtonsoft.Json v13.0.0.0)")] + public partial class Dependencies { - /// List of Windows feature dependencies + /// + /// List of Windows feature dependencies + /// [Newtonsoft.Json.JsonProperty("WindowsFeatures", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.MaxLength(16)] public System.Collections.Generic.List WindowsFeatures { get; set; } - - /// List of Windows library dependencies + + /// + /// List of Windows library dependencies + /// [Newtonsoft.Json.JsonProperty("WindowsLibraries", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.MaxLength(16)] public System.Collections.Generic.List WindowsLibraries { get; set; } - - /// List of package dependencies from current source + + /// + /// List of package dependencies from current source + /// [Newtonsoft.Json.JsonProperty("PackageDependencies", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.MaxLength(16)] public System.Collections.Generic.List PackageDependencies { get; set; } - - /// List of external package dependencies + + /// + /// List of external package dependencies + /// [Newtonsoft.Json.JsonProperty("ExternalDependencies", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.MaxLength(16)] public System.Collections.Generic.List ExternalDependencies { get; set; } - - private System.Collections.Generic.IDictionary _additionalProperties = new System.Collections.Generic.Dictionary(); - + + + + private System.Collections.Generic.IDictionary _additionalProperties; + [Newtonsoft.Json.JsonExtensionData] public System.Collections.Generic.IDictionary AdditionalProperties { - get { return _additionalProperties; } + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); } set { _additionalProperties = value; } } - - + } - - /// The installer markets - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.3.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class Markets + + /// + /// The installer markets + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "11.0.0.0 (Newtonsoft.Json v13.0.0.0)")] + public partial class Markets { - private System.Collections.Generic.IDictionary _additionalProperties = new System.Collections.Generic.Dictionary(); - + + + private System.Collections.Generic.IDictionary _additionalProperties; + [Newtonsoft.Json.JsonExtensionData] public System.Collections.Generic.IDictionary AdditionalProperties { - get { return _additionalProperties; } + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); } set { _additionalProperties = value; } } - - + } - - /// Various key values under installer's ARP entry - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.3.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class AppsAndFeaturesEntry + + /// + /// Various key values under installer's ARP entry + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "11.0.0.0 (Newtonsoft.Json v13.0.0.0)")] + public partial class AppsAndFeaturesEntry { - /// The DisplayName registry value + /// + /// The DisplayName registry value + /// [Newtonsoft.Json.JsonProperty("DisplayName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(256, MinimumLength = 1)] public string DisplayName { get; set; } - - /// The Publisher registry value + + /// + /// The Publisher registry value + /// [Newtonsoft.Json.JsonProperty("Publisher", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(256, MinimumLength = 1)] public string Publisher { get; set; } - - /// The DisplayVersion registry value + + /// + /// The DisplayVersion registry value + /// [Newtonsoft.Json.JsonProperty("DisplayVersion", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(128, MinimumLength = 1)] public string DisplayVersion { get; set; } - + [Newtonsoft.Json.JsonProperty("ProductCode", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(255, MinimumLength = 1)] public string ProductCode { get; set; } - + [Newtonsoft.Json.JsonProperty("UpgradeCode", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(255, MinimumLength = 1)] public string UpgradeCode { get; set; } - + [Newtonsoft.Json.JsonProperty("InstallerType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] public InstallerType? InstallerType { get; set; } - - private System.Collections.Generic.IDictionary _additionalProperties = new System.Collections.Generic.Dictionary(); - + + + + private System.Collections.Generic.IDictionary _additionalProperties; + [Newtonsoft.Json.JsonExtensionData] public System.Collections.Generic.IDictionary AdditionalProperties { - get { return _additionalProperties; } + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); } set { _additionalProperties = value; } } - - + } - - /// The installer's elevation requirement - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.3.0 (Newtonsoft.Json v11.0.0.0)")] + + /// + /// The installer's elevation requirement + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "11.0.0.0 (Newtonsoft.Json v13.0.0.0)")] public enum ElevationRequirement { + [System.Runtime.Serialization.EnumMember(Value = @"elevationRequired")] ElevationRequired = 0, - + + [System.Runtime.Serialization.EnumMember(Value = @"elevationProhibited")] ElevationProhibited = 1, - + + [System.Runtime.Serialization.EnumMember(Value = @"elevatesSelf")] ElevatesSelf = 2, - + + } - - /// Details about the installation. Used for deeper installation detection. - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.3.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class InstallationMetadata + + /// + /// Details about the installation. Used for deeper installation detection. + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "11.0.0.0 (Newtonsoft.Json v13.0.0.0)")] + public partial class InstallationMetadata { - /// Represents the default installed package location. Used for deeper installation detection. + /// + /// Represents the default installed package location. Used for deeper installation detection. + /// [Newtonsoft.Json.JsonProperty("DefaultInstallLocation", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(2048, MinimumLength = 1)] public string DefaultInstallLocation { get; set; } - - /// List of installed files. + + /// + /// List of installed files. + /// [Newtonsoft.Json.JsonProperty("Files", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.MaxLength(2048)] public System.Collections.Generic.List Files { get; set; } - - private System.Collections.Generic.IDictionary _additionalProperties = new System.Collections.Generic.Dictionary(); - + + + + private System.Collections.Generic.IDictionary _additionalProperties; + [Newtonsoft.Json.JsonExtensionData] public System.Collections.Generic.IDictionary AdditionalProperties { - get { return _additionalProperties; } + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); } set { _additionalProperties = value; } } - - + + } + + /// + /// The repair method + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "11.0.0.0 (Newtonsoft.Json v13.0.0.0)")] + public enum RepairBehavior + { + + [System.Runtime.Serialization.EnumMember(Value = @"modify")] + Modify = 0, + + + [System.Runtime.Serialization.EnumMember(Value = @"uninstaller")] + Uninstaller = 1, + + + [System.Runtime.Serialization.EnumMember(Value = @"installer")] + Installer = 2, + + } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.3.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class Installer + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "11.0.0.0 (Newtonsoft.Json v13.0.0.0)")] + public partial class Installer { [Newtonsoft.Json.JsonProperty("InstallerLocale", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(20)] [System.ComponentModel.DataAnnotations.RegularExpression(@"^([a-zA-Z]{2,3}|[iI]-[a-zA-Z]+|[xX]-[a-zA-Z]{1,8})(-[a-zA-Z]{1,8})*$")] public string InstallerLocale { get; set; } - + [Newtonsoft.Json.JsonProperty("Platform", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore, ItemConverterType = typeof(Newtonsoft.Json.Converters.StringEnumConverter))] [System.ComponentModel.DataAnnotations.MaxLength(2)] public System.Collections.Generic.List Platform { get; set; } - + [Newtonsoft.Json.JsonProperty("MinimumOSVersion", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.RegularExpression(@"^(0|[1-9][0-9]{0,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])(\.(0|[1-9][0-9]{0,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])){0,3}$")] public string MinimumOSVersion { get; set; } - + [Newtonsoft.Json.JsonProperty("Architecture", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] public Architecture Architecture { get; set; } - + [Newtonsoft.Json.JsonProperty("InstallerType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] public InstallerType? InstallerType { get; set; } - + [Newtonsoft.Json.JsonProperty("NestedInstallerType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] public NestedInstallerType? NestedInstallerType { get; set; } - + [Newtonsoft.Json.JsonProperty("NestedInstallerFiles", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.MaxLength(1024)] public System.Collections.Generic.List NestedInstallerFiles { get; set; } - + [Newtonsoft.Json.JsonProperty("Scope", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] public Scope? Scope { get; set; } - - /// The installer Url + + /// + /// The installer Url + /// [Newtonsoft.Json.JsonProperty("InstallerUrl", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] [System.ComponentModel.DataAnnotations.StringLength(2048)] [System.ComponentModel.DataAnnotations.RegularExpression(@"^([Hh][Tt][Tt][Pp][Ss]?)://.+$")] public string InstallerUrl { get; set; } - - /// Sha256 is required. Sha256 of the installer + + /// + /// Sha256 is required. Sha256 of the installer + /// [Newtonsoft.Json.JsonProperty("InstallerSha256", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] [System.ComponentModel.DataAnnotations.RegularExpression(@"^[A-Fa-f0-9]{64}$")] public string InstallerSha256 { get; set; } - - /// SignatureSha256 is recommended for appx or msix. It is the sha256 of signature file inside appx or msix. Could be used during streaming install if applicable + + /// + /// SignatureSha256 is recommended for appx or msix. It is the sha256 of signature file inside appx or msix. Could be used during streaming install if applicable + /// [Newtonsoft.Json.JsonProperty("SignatureSha256", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.RegularExpression(@"^[A-Fa-f0-9]{64}$")] public string SignatureSha256 { get; set; } - + [Newtonsoft.Json.JsonProperty("InstallModes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore, ItemConverterType = typeof(Newtonsoft.Json.Converters.StringEnumConverter))] [System.ComponentModel.DataAnnotations.MaxLength(3)] public System.Collections.Generic.List InstallModes { get; set; } - + [Newtonsoft.Json.JsonProperty("InstallerSwitches", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public InstallerSwitches InstallerSwitches { get; set; } - + [Newtonsoft.Json.JsonProperty("InstallerSuccessCodes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.MaxLength(16)] public System.Collections.Generic.List InstallerSuccessCodes { get; set; } - + [Newtonsoft.Json.JsonProperty("ExpectedReturnCodes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.MaxLength(128)] public System.Collections.Generic.List ExpectedReturnCodes { get; set; } - + [Newtonsoft.Json.JsonProperty("UpgradeBehavior", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] public UpgradeBehavior? UpgradeBehavior { get; set; } - + [Newtonsoft.Json.JsonProperty("Commands", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.MaxLength(16)] public System.Collections.Generic.List Commands { get; set; } - + [Newtonsoft.Json.JsonProperty("Protocols", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.MaxLength(64)] public System.Collections.Generic.List Protocols { get; set; } - + [Newtonsoft.Json.JsonProperty("FileExtensions", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.MaxLength(512)] public System.Collections.Generic.List FileExtensions { get; set; } - + [Newtonsoft.Json.JsonProperty("Dependencies", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public Dependencies Dependencies { get; set; } - + [Newtonsoft.Json.JsonProperty("PackageFamilyName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(255)] [System.ComponentModel.DataAnnotations.RegularExpression(@"^[A-Za-z0-9][-\.A-Za-z0-9]+_[A-Za-z0-9]{13}$")] public string PackageFamilyName { get; set; } - + [Newtonsoft.Json.JsonProperty("ProductCode", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(255, MinimumLength = 1)] public string ProductCode { get; set; } - + [Newtonsoft.Json.JsonProperty("Capabilities", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.MaxLength(1000)] public System.Collections.Generic.List Capabilities { get; set; } - + [Newtonsoft.Json.JsonProperty("RestrictedCapabilities", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.MaxLength(1000)] public System.Collections.Generic.List RestrictedCapabilities { get; set; } - + [Newtonsoft.Json.JsonProperty("Markets", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public Markets2 Markets { get; set; } - + [Newtonsoft.Json.JsonProperty("InstallerAbortsTerminal", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public bool? InstallerAbortsTerminal { get; set; } - + [Newtonsoft.Json.JsonProperty("ReleaseDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [Newtonsoft.Json.JsonConverter(typeof(DateFormatConverter))] public System.DateTimeOffset? ReleaseDate { get; set; } - + [Newtonsoft.Json.JsonProperty("InstallLocationRequired", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public bool? InstallLocationRequired { get; set; } - + [Newtonsoft.Json.JsonProperty("RequireExplicitUpgrade", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public bool? RequireExplicitUpgrade { get; set; } - + [Newtonsoft.Json.JsonProperty("DisplayInstallWarnings", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public bool? DisplayInstallWarnings { get; set; } - + [Newtonsoft.Json.JsonProperty("UnsupportedOSArchitectures", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore, ItemConverterType = typeof(Newtonsoft.Json.Converters.StringEnumConverter))] public System.Collections.Generic.List UnsupportedOSArchitectures { get; set; } - + [Newtonsoft.Json.JsonProperty("UnsupportedArguments", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore, ItemConverterType = typeof(Newtonsoft.Json.Converters.StringEnumConverter))] public System.Collections.Generic.List UnsupportedArguments { get; set; } - + [Newtonsoft.Json.JsonProperty("AppsAndFeaturesEntries", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.MaxLength(128)] public System.Collections.Generic.List AppsAndFeaturesEntries { get; set; } - + [Newtonsoft.Json.JsonProperty("ElevationRequirement", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] public ElevationRequirement? ElevationRequirement { get; set; } - + [Newtonsoft.Json.JsonProperty("InstallationMetadata", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public InstallationMetadata InstallationMetadata { get; set; } - + [Newtonsoft.Json.JsonProperty("DownloadCommandProhibited", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public bool? DownloadCommandProhibited { get; set; } - - private System.Collections.Generic.IDictionary _additionalProperties = new System.Collections.Generic.Dictionary(); - + + [Newtonsoft.Json.JsonProperty("RepairBehavior", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] + public RepairBehavior? RepairBehavior { get; set; } + + [Newtonsoft.Json.JsonProperty("ArchiveBinariesDependOnPath", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool? ArchiveBinariesDependOnPath { get; set; } + + + + private System.Collections.Generic.IDictionary _additionalProperties; + [Newtonsoft.Json.JsonExtensionData] public System.Collections.Generic.IDictionary AdditionalProperties { - get { return _additionalProperties; } + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); } set { _additionalProperties = value; } } - - + } - - /// A representation of a single-file manifest representing an app installers in the OWC. v1.6.0 - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.3.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class InstallerManifest + + /// + /// A representation of a single-file manifest representing an app installers in the OWC. v1.9.0 + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "11.0.0.0 (Newtonsoft.Json v13.0.0.0)")] + public partial class InstallerManifest { [Newtonsoft.Json.JsonProperty("PackageIdentifier", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] [System.ComponentModel.DataAnnotations.StringLength(128)] [System.ComponentModel.DataAnnotations.RegularExpression(@"^[^\.\s\\/:\*\?""<>\|\x01-\x1f]{1,32}(\.[^\.\s\\/:\*\?""<>\|\x01-\x1f]{1,32}){1,7}$")] public string PackageIdentifier { get; set; } - + [Newtonsoft.Json.JsonProperty("PackageVersion", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] [System.ComponentModel.DataAnnotations.StringLength(128)] [System.ComponentModel.DataAnnotations.RegularExpression(@"^[^\\/:\*\?""<>\|\x01-\x1f]+$")] public string PackageVersion { get; set; } - + [Newtonsoft.Json.JsonProperty("Channel", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(16, MinimumLength = 1)] public string Channel { get; set; } - + [Newtonsoft.Json.JsonProperty("InstallerLocale", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(20)] [System.ComponentModel.DataAnnotations.RegularExpression(@"^([a-zA-Z]{2,3}|[iI]-[a-zA-Z]+|[xX]-[a-zA-Z]{1,8})(-[a-zA-Z]{1,8})*$")] public string InstallerLocale { get; set; } - + [Newtonsoft.Json.JsonProperty("Platform", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore, ItemConverterType = typeof(Newtonsoft.Json.Converters.StringEnumConverter))] [System.ComponentModel.DataAnnotations.MaxLength(2)] public System.Collections.Generic.List Platform { get; set; } - + [Newtonsoft.Json.JsonProperty("MinimumOSVersion", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.RegularExpression(@"^(0|[1-9][0-9]{0,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])(\.(0|[1-9][0-9]{0,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])){0,3}$")] public string MinimumOSVersion { get; set; } - + [Newtonsoft.Json.JsonProperty("InstallerType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] public InstallerType? InstallerType { get; set; } - + [Newtonsoft.Json.JsonProperty("NestedInstallerType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] public NestedInstallerType? NestedInstallerType { get; set; } - + [Newtonsoft.Json.JsonProperty("NestedInstallerFiles", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.MaxLength(1024)] public System.Collections.Generic.List NestedInstallerFiles { get; set; } - + [Newtonsoft.Json.JsonProperty("Scope", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] public Scope? Scope { get; set; } - + [Newtonsoft.Json.JsonProperty("InstallModes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore, ItemConverterType = typeof(Newtonsoft.Json.Converters.StringEnumConverter))] [System.ComponentModel.DataAnnotations.MaxLength(3)] public System.Collections.Generic.List InstallModes { get; set; } - + [Newtonsoft.Json.JsonProperty("InstallerSwitches", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public InstallerSwitches InstallerSwitches { get; set; } - + [Newtonsoft.Json.JsonProperty("InstallerSuccessCodes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.MaxLength(16)] public System.Collections.Generic.List InstallerSuccessCodes { get; set; } - + [Newtonsoft.Json.JsonProperty("ExpectedReturnCodes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.MaxLength(128)] public System.Collections.Generic.List ExpectedReturnCodes { get; set; } - + [Newtonsoft.Json.JsonProperty("UpgradeBehavior", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] public UpgradeBehavior? UpgradeBehavior { get; set; } - + [Newtonsoft.Json.JsonProperty("Commands", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.MaxLength(16)] public System.Collections.Generic.List Commands { get; set; } - + [Newtonsoft.Json.JsonProperty("Protocols", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.MaxLength(64)] public System.Collections.Generic.List Protocols { get; set; } - + [Newtonsoft.Json.JsonProperty("FileExtensions", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.MaxLength(512)] public System.Collections.Generic.List FileExtensions { get; set; } - + [Newtonsoft.Json.JsonProperty("Dependencies", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public Dependencies Dependencies { get; set; } - + [Newtonsoft.Json.JsonProperty("PackageFamilyName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(255)] [System.ComponentModel.DataAnnotations.RegularExpression(@"^[A-Za-z0-9][-\.A-Za-z0-9]+_[A-Za-z0-9]{13}$")] public string PackageFamilyName { get; set; } - + [Newtonsoft.Json.JsonProperty("ProductCode", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(255, MinimumLength = 1)] public string ProductCode { get; set; } - + [Newtonsoft.Json.JsonProperty("Capabilities", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.MaxLength(1000)] public System.Collections.Generic.List Capabilities { get; set; } - + [Newtonsoft.Json.JsonProperty("RestrictedCapabilities", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.MaxLength(1000)] public System.Collections.Generic.List RestrictedCapabilities { get; set; } - + [Newtonsoft.Json.JsonProperty("Markets", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public Markets2 Markets { get; set; } - + [Newtonsoft.Json.JsonProperty("InstallerAbortsTerminal", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public bool? InstallerAbortsTerminal { get; set; } - + [Newtonsoft.Json.JsonProperty("ReleaseDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [Newtonsoft.Json.JsonConverter(typeof(DateFormatConverter))] public System.DateTimeOffset? ReleaseDate { get; set; } - + [Newtonsoft.Json.JsonProperty("InstallLocationRequired", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public bool? InstallLocationRequired { get; set; } - + [Newtonsoft.Json.JsonProperty("RequireExplicitUpgrade", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public bool? RequireExplicitUpgrade { get; set; } - + [Newtonsoft.Json.JsonProperty("DisplayInstallWarnings", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public bool? DisplayInstallWarnings { get; set; } - + [Newtonsoft.Json.JsonProperty("UnsupportedOSArchitectures", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore, ItemConverterType = typeof(Newtonsoft.Json.Converters.StringEnumConverter))] public System.Collections.Generic.List UnsupportedOSArchitectures { get; set; } - + [Newtonsoft.Json.JsonProperty("UnsupportedArguments", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore, ItemConverterType = typeof(Newtonsoft.Json.Converters.StringEnumConverter))] public System.Collections.Generic.List UnsupportedArguments { get; set; } - + [Newtonsoft.Json.JsonProperty("AppsAndFeaturesEntries", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.MaxLength(128)] public System.Collections.Generic.List AppsAndFeaturesEntries { get; set; } - + [Newtonsoft.Json.JsonProperty("ElevationRequirement", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] public ElevationRequirement? ElevationRequirement { get; set; } - + [Newtonsoft.Json.JsonProperty("InstallationMetadata", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public InstallationMetadata InstallationMetadata { get; set; } - + [Newtonsoft.Json.JsonProperty("DownloadCommandProhibited", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public bool? DownloadCommandProhibited { get; set; } - + + [Newtonsoft.Json.JsonProperty("RepairBehavior", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] + public RepairBehavior? RepairBehavior { get; set; } + + [Newtonsoft.Json.JsonProperty("ArchiveBinariesDependOnPath", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool? ArchiveBinariesDependOnPath { get; set; } + [Newtonsoft.Json.JsonProperty("Installers", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.Required] [System.ComponentModel.DataAnnotations.MinLength(1)] [System.ComponentModel.DataAnnotations.MaxLength(1024)] public System.Collections.Generic.List Installers { get; set; } = new System.Collections.Generic.List(); - - /// The manifest type + + /// + /// The manifest type + /// [Newtonsoft.Json.JsonProperty("ManifestType", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] public string ManifestType { get; set; } = "installer"; - - /// The manifest syntax version + + /// + /// The manifest syntax version + /// [Newtonsoft.Json.JsonProperty("ManifestVersion", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] [System.ComponentModel.DataAnnotations.RegularExpression(@"^(0|[1-9][0-9]{0,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])(\.(0|[1-9][0-9]{0,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])){2}$")] - public string ManifestVersion { get; set; } = "1.6.0"; - - private System.Collections.Generic.IDictionary _additionalProperties = new System.Collections.Generic.Dictionary(); - + public string ManifestVersion { get; set; } = "1.9.0"; + + + + private System.Collections.Generic.IDictionary _additionalProperties; + [Newtonsoft.Json.JsonExtensionData] public System.Collections.Generic.IDictionary AdditionalProperties { - get { return _additionalProperties; } + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); } set { _additionalProperties = value; } } - - + } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.3.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class PackageDependencies + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "11.0.0.0 (Newtonsoft.Json v13.0.0.0)")] + public partial class PackageDependencies { [Newtonsoft.Json.JsonProperty("PackageIdentifier", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] [System.ComponentModel.DataAnnotations.StringLength(128)] [System.ComponentModel.DataAnnotations.RegularExpression(@"^[^\.\s\\/:\*\?""<>\|\x01-\x1f]{1,32}(\.[^\.\s\\/:\*\?""<>\|\x01-\x1f]{1,32}){1,7}$")] public string PackageIdentifier { get; set; } - + [Newtonsoft.Json.JsonProperty("MinimumVersion", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(128)] [System.ComponentModel.DataAnnotations.RegularExpression(@"^[^\\/:\*\?""<>\|\x01-\x1f]+$")] public string MinimumVersion { get; set; } - - private System.Collections.Generic.IDictionary _additionalProperties = new System.Collections.Generic.Dictionary(); - + + + + private System.Collections.Generic.IDictionary _additionalProperties; + [Newtonsoft.Json.JsonExtensionData] public System.Collections.Generic.IDictionary AdditionalProperties { - get { return _additionalProperties; } + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); } set { _additionalProperties = value; } } - - + } - - /// Represents an installed file. - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.3.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class Files + + /// + /// Represents an installed file. + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "11.0.0.0 (Newtonsoft.Json v13.0.0.0)")] + public partial class Files { - /// The relative path to the installed file. + /// + /// The relative path to the installed file. + /// [Newtonsoft.Json.JsonProperty("RelativeFilePath", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.Required] [System.ComponentModel.DataAnnotations.StringLength(2048, MinimumLength = 1)] public string RelativeFilePath { get; set; } - - /// Optional Sha256 of the installed file. + + /// + /// Optional Sha256 of the installed file. + /// [Newtonsoft.Json.JsonProperty("FileSha256", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.RegularExpression(@"^[A-Fa-f0-9]{64}$")] public string FileSha256 { get; set; } - - /// The optional installed file type. If not specified, the file is treated as other. + + /// + /// The optional installed file type. If not specified, the file is treated as other. + /// [Newtonsoft.Json.JsonProperty("FileType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] public FilesFileType? FileType { get; set; } - - /// Optional parameter for invocable files. + + /// + /// Optional parameter for invocable files. + /// [Newtonsoft.Json.JsonProperty("InvocationParameter", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(2048, MinimumLength = 1)] public string InvocationParameter { get; set; } - - /// Optional display name for invocable files. + + /// + /// Optional display name for invocable files. + /// [Newtonsoft.Json.JsonProperty("DisplayName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(256, MinimumLength = 1)] public string DisplayName { get; set; } - - private System.Collections.Generic.IDictionary _additionalProperties = new System.Collections.Generic.Dictionary(); - + + + + private System.Collections.Generic.IDictionary _additionalProperties; + [Newtonsoft.Json.JsonExtensionData] public System.Collections.Generic.IDictionary AdditionalProperties { - get { return _additionalProperties; } + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); } set { _additionalProperties = value; } } - - + } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.3.0 (Newtonsoft.Json v11.0.0.0)")] + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "11.0.0.0 (Newtonsoft.Json v13.0.0.0)")] public enum Platform { + [System.Runtime.Serialization.EnumMember(Value = @"Windows.Desktop")] Windows_Desktop = 0, - + + [System.Runtime.Serialization.EnumMember(Value = @"Windows.Universal")] Windows_Universal = 1, - + + } - - /// A nested installer file contained inside an archive - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.3.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class NestedInstallerFile + + /// + /// A nested installer file contained inside an archive + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "11.0.0.0 (Newtonsoft.Json v13.0.0.0)")] + public partial class NestedInstallerFile { - /// The relative path to the nested installer file + /// + /// The relative path to the nested installer file + /// [Newtonsoft.Json.JsonProperty("RelativeFilePath", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.Required] [System.ComponentModel.DataAnnotations.StringLength(512, MinimumLength = 1)] public string RelativeFilePath { get; set; } - - /// The command alias to be used for calling the package. Only applies to the nested portable package + + /// + /// The command alias to be used for calling the package. Only applies to the nested portable package + /// [Newtonsoft.Json.JsonProperty("PortableCommandAlias", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(40, MinimumLength = 1)] public string PortableCommandAlias { get; set; } - - private System.Collections.Generic.IDictionary _additionalProperties = new System.Collections.Generic.Dictionary(); - + + + + private System.Collections.Generic.IDictionary _additionalProperties; + [Newtonsoft.Json.JsonExtensionData] public System.Collections.Generic.IDictionary AdditionalProperties { - get { return _additionalProperties; } + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); } set { _additionalProperties = value; } } - - + } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.3.0 (Newtonsoft.Json v11.0.0.0)")] + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "11.0.0.0 (Newtonsoft.Json v13.0.0.0)")] public enum InstallModes { + [System.Runtime.Serialization.EnumMember(Value = @"interactive")] Interactive = 0, - + + [System.Runtime.Serialization.EnumMember(Value = @"silent")] Silent = 1, - + + [System.Runtime.Serialization.EnumMember(Value = @"silentWithProgress")] SilentWithProgress = 2, - + + } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.3.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ExpectedReturnCode + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "11.0.0.0 (Newtonsoft.Json v13.0.0.0)")] + public partial class ExpectedReturnCode { [Newtonsoft.Json.JsonProperty("InstallerReturnCode", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.Range(-2147483648D, 4294967295D)] public long InstallerReturnCode { get; set; } - + [Newtonsoft.Json.JsonProperty("ReturnResponse", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] public ExpectedReturnCodeReturnResponse ReturnResponse { get; set; } - - /// The return response url to provide additional guidance for expected return codes + + /// + /// The return response url to provide additional guidance for expected return codes + /// [Newtonsoft.Json.JsonProperty("ReturnResponseUrl", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(2048)] [System.ComponentModel.DataAnnotations.RegularExpression(@"^([Hh][Tt][Tt][Pp][Ss]?)://.+$")] public string ReturnResponseUrl { get; set; } - - private System.Collections.Generic.IDictionary _additionalProperties = new System.Collections.Generic.Dictionary(); - + + + + private System.Collections.Generic.IDictionary _additionalProperties; + [Newtonsoft.Json.JsonExtensionData] public System.Collections.Generic.IDictionary AdditionalProperties { - get { return _additionalProperties; } + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); } set { _additionalProperties = value; } } - - + } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.3.0 (Newtonsoft.Json v11.0.0.0)")] + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "11.0.0.0 (Newtonsoft.Json v13.0.0.0)")] public enum UnsupportedOSArchitecture { + [System.Runtime.Serialization.EnumMember(Value = @"x86")] X86 = 0, - + + [System.Runtime.Serialization.EnumMember(Value = @"x64")] X64 = 1, - + + [System.Runtime.Serialization.EnumMember(Value = @"arm")] Arm = 2, - + + [System.Runtime.Serialization.EnumMember(Value = @"arm64")] Arm64 = 3, - + + } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.3.0 (Newtonsoft.Json v11.0.0.0)")] + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "11.0.0.0 (Newtonsoft.Json v13.0.0.0)")] public enum UnsupportedArgument { + [System.Runtime.Serialization.EnumMember(Value = @"log")] Log = 0, - + + [System.Runtime.Serialization.EnumMember(Value = @"location")] Location = 1, - + + } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.3.0 (Newtonsoft.Json v11.0.0.0)")] + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "11.0.0.0 (Newtonsoft.Json v13.0.0.0)")] public enum FilesFileType { + [System.Runtime.Serialization.EnumMember(Value = @"launch")] Launch = 0, - + + [System.Runtime.Serialization.EnumMember(Value = @"uninstall")] Uninstall = 1, - + + [System.Runtime.Serialization.EnumMember(Value = @"other")] Other = 2, - + + } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.3.0 (Newtonsoft.Json v11.0.0.0)")] + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "11.0.0.0 (Newtonsoft.Json v13.0.0.0)")] public enum ExpectedReturnCodeReturnResponse { + [System.Runtime.Serialization.EnumMember(Value = @"packageInUse")] PackageInUse = 0, - + + [System.Runtime.Serialization.EnumMember(Value = @"packageInUseByApplication")] PackageInUseByApplication = 1, - + + [System.Runtime.Serialization.EnumMember(Value = @"installInProgress")] InstallInProgress = 2, - + + [System.Runtime.Serialization.EnumMember(Value = @"fileInUse")] FileInUse = 3, - + + [System.Runtime.Serialization.EnumMember(Value = @"missingDependency")] MissingDependency = 4, - + + [System.Runtime.Serialization.EnumMember(Value = @"diskFull")] DiskFull = 5, - + + [System.Runtime.Serialization.EnumMember(Value = @"insufficientMemory")] InsufficientMemory = 6, - + + [System.Runtime.Serialization.EnumMember(Value = @"invalidParameter")] InvalidParameter = 7, - + + [System.Runtime.Serialization.EnumMember(Value = @"noNetwork")] NoNetwork = 8, - + + [System.Runtime.Serialization.EnumMember(Value = @"contactSupport")] ContactSupport = 9, - + + [System.Runtime.Serialization.EnumMember(Value = @"rebootRequiredToFinish")] RebootRequiredToFinish = 10, - + + [System.Runtime.Serialization.EnumMember(Value = @"rebootRequiredForInstall")] RebootRequiredForInstall = 11, - + + [System.Runtime.Serialization.EnumMember(Value = @"rebootInitiated")] RebootInitiated = 12, - + + [System.Runtime.Serialization.EnumMember(Value = @"cancelledByUser")] CancelledByUser = 13, - + + [System.Runtime.Serialization.EnumMember(Value = @"alreadyInstalled")] AlreadyInstalled = 14, - + + [System.Runtime.Serialization.EnumMember(Value = @"downgrade")] Downgrade = 15, - + + [System.Runtime.Serialization.EnumMember(Value = @"blockedByPolicy")] BlockedByPolicy = 16, - + + [System.Runtime.Serialization.EnumMember(Value = @"systemNotSupported")] SystemNotSupported = 17, - + + [System.Runtime.Serialization.EnumMember(Value = @"custom")] Custom = 18, - + + } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.3.0 (Newtonsoft.Json v11.0.0.0)")] + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "11.0.0.0 (Newtonsoft.Json v13.0.0.0)")] internal class DateFormatConverter : Newtonsoft.Json.Converters.IsoDateTimeConverter { public DateFormatConverter() diff --git a/src/WingetCreateCore/Models/LocaleManifestModels.cs b/src/WingetCreateCore/Models/LocaleManifestModels.cs index 4da3631e..896f5aab 100644 --- a/src/WingetCreateCore/Models/LocaleManifestModels.cs +++ b/src/WingetCreateCore/Models/LocaleManifestModels.cs @@ -1,348 +1,446 @@ //---------------------- // -// Generated using the NJsonSchema v10.4.3.0 (Newtonsoft.Json v11.0.0.0) (http://NJsonSchema.org) +// Generated using the NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0) (http://NJsonSchema.org) // //---------------------- + namespace Microsoft.WingetCreateCore.Models.Locale { #pragma warning disable // Disable all warnings - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.3.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class Agreement + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "11.0.0.0 (Newtonsoft.Json v13.0.0.0)")] + public partial class Agreement { - /// The label of the Agreement. i.e. EULA, AgeRating, etc. This field should be localized. Either Agreement or AgreementUrl is required. When we show the agreements, we would Bold the AgreementLabel + /// + /// The label of the Agreement. i.e. EULA, AgeRating, etc. This field should be localized. Either Agreement or AgreementUrl is required. When we show the agreements, we would Bold the AgreementLabel + /// [Newtonsoft.Json.JsonProperty("AgreementLabel", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(100, MinimumLength = 1)] public string AgreementLabel { get; set; } - - /// The agreement text content. + + /// + /// The agreement text content. + /// [Newtonsoft.Json.JsonProperty("Agreement", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(10000, MinimumLength = 1)] public string Agreement1 { get; set; } - - /// The agreement URL. + + /// + /// The agreement URL. + /// [Newtonsoft.Json.JsonProperty("AgreementUrl", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(2048)] [System.ComponentModel.DataAnnotations.RegularExpression(@"^([Hh][Tt][Tt][Pp][Ss]?)://.+$")] public string AgreementUrl { get; set; } - - private System.Collections.Generic.IDictionary _additionalProperties = new System.Collections.Generic.Dictionary(); - + + + + private System.Collections.Generic.IDictionary _additionalProperties; + [Newtonsoft.Json.JsonExtensionData] public System.Collections.Generic.IDictionary AdditionalProperties { - get { return _additionalProperties; } + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); } set { _additionalProperties = value; } } - - + } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.3.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class Documentation + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "11.0.0.0 (Newtonsoft.Json v13.0.0.0)")] + public partial class Documentation { - /// The label of the documentation for providing software guides such as manuals and troubleshooting URLs. + /// + /// The label of the documentation for providing software guides such as manuals and troubleshooting URLs. + /// [Newtonsoft.Json.JsonProperty("DocumentLabel", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(100, MinimumLength = 1)] public string DocumentLabel { get; set; } - - /// The documentation URL. + + /// + /// The documentation URL. + /// [Newtonsoft.Json.JsonProperty("DocumentUrl", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(2048)] [System.ComponentModel.DataAnnotations.RegularExpression(@"^([Hh][Tt][Tt][Pp][Ss]?)://.+$")] public string DocumentUrl { get; set; } - - private System.Collections.Generic.IDictionary _additionalProperties = new System.Collections.Generic.Dictionary(); - + + + + private System.Collections.Generic.IDictionary _additionalProperties; + [Newtonsoft.Json.JsonExtensionData] public System.Collections.Generic.IDictionary AdditionalProperties { - get { return _additionalProperties; } + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); } set { _additionalProperties = value; } } - - + } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.3.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class Icon + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "11.0.0.0 (Newtonsoft.Json v13.0.0.0)")] + public partial class Icon { - /// The url of the hosted icon file + /// + /// The url of the hosted icon file + /// [Newtonsoft.Json.JsonProperty("IconUrl", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(2048)] [System.ComponentModel.DataAnnotations.RegularExpression(@"^([Hh][Tt][Tt][Pp][Ss]?)://.+$")] public string IconUrl { get; set; } - - /// The icon file type + + /// + /// The icon file type + /// [Newtonsoft.Json.JsonProperty("IconFileType", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] public IconFileType IconFileType { get; set; } - - /// Optional icon resolution + + /// + /// Optional icon resolution + /// [Newtonsoft.Json.JsonProperty("IconResolution", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] public IconResolution? IconResolution { get; set; } - - /// Optional icon theme + + /// + /// Optional icon theme + /// [Newtonsoft.Json.JsonProperty("IconTheme", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] public IconTheme? IconTheme { get; set; } - - /// Optional Sha256 of the icon file + + /// + /// Optional Sha256 of the icon file + /// [Newtonsoft.Json.JsonProperty("IconSha256", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.RegularExpression(@"^[A-Fa-f0-9]{64}$")] public string IconSha256 { get; set; } - - private System.Collections.Generic.IDictionary _additionalProperties = new System.Collections.Generic.Dictionary(); - + + + + private System.Collections.Generic.IDictionary _additionalProperties; + [Newtonsoft.Json.JsonExtensionData] public System.Collections.Generic.IDictionary AdditionalProperties { - get { return _additionalProperties; } + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); } set { _additionalProperties = value; } } - - + } - - /// A representation of a multiple-file manifest representing app metadata in other locale in the OWC. v1.6.0 - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.3.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class LocaleManifest + + /// + /// A representation of a multiple-file manifest representing app metadata in other locale in the OWC. v1.9.0 + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "11.0.0.0 (Newtonsoft.Json v13.0.0.0)")] + public partial class LocaleManifest { - /// The package unique identifier + /// + /// The package unique identifier + /// [Newtonsoft.Json.JsonProperty("PackageIdentifier", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] [System.ComponentModel.DataAnnotations.StringLength(128)] [System.ComponentModel.DataAnnotations.RegularExpression(@"^[^\.\s\\/:\*\?""<>\|\x01-\x1f]{1,32}(\.[^\.\s\\/:\*\?""<>\|\x01-\x1f]{1,32}){1,7}$")] public string PackageIdentifier { get; set; } - - /// The package version + + /// + /// The package version + /// [Newtonsoft.Json.JsonProperty("PackageVersion", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] [System.ComponentModel.DataAnnotations.StringLength(128)] [System.ComponentModel.DataAnnotations.RegularExpression(@"^[^\\/:\*\?""<>\|\x01-\x1f]+$")] public string PackageVersion { get; set; } - - /// The package meta-data locale + + /// + /// The package meta-data locale + /// [Newtonsoft.Json.JsonProperty("PackageLocale", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] [System.ComponentModel.DataAnnotations.StringLength(20)] [System.ComponentModel.DataAnnotations.RegularExpression(@"^([a-zA-Z]{2,3}|[iI]-[a-zA-Z]+|[xX]-[a-zA-Z]{1,8})(-[a-zA-Z]{1,8})*$")] public string PackageLocale { get; set; } - - /// The publisher name + + /// + /// The publisher name + /// [Newtonsoft.Json.JsonProperty("Publisher", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(256, MinimumLength = 2)] public string Publisher { get; set; } - - /// The publisher home page + + /// + /// The publisher home page + /// [Newtonsoft.Json.JsonProperty("PublisherUrl", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(2048)] [System.ComponentModel.DataAnnotations.RegularExpression(@"^([Hh][Tt][Tt][Pp][Ss]?)://.+$")] public string PublisherUrl { get; set; } - - /// The publisher support page + + /// + /// The publisher support page + /// [Newtonsoft.Json.JsonProperty("PublisherSupportUrl", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(2048)] [System.ComponentModel.DataAnnotations.RegularExpression(@"^([Hh][Tt][Tt][Pp][Ss]?)://.+$")] public string PublisherSupportUrl { get; set; } - - /// The publisher privacy page or the package privacy page + + /// + /// The publisher privacy page or the package privacy page + /// [Newtonsoft.Json.JsonProperty("PrivacyUrl", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(2048)] [System.ComponentModel.DataAnnotations.RegularExpression(@"^([Hh][Tt][Tt][Pp][Ss]?)://.+$")] public string PrivacyUrl { get; set; } - - /// The package author + + /// + /// The package author + /// [Newtonsoft.Json.JsonProperty("Author", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(256, MinimumLength = 2)] public string Author { get; set; } - - /// The package name + + /// + /// The package name + /// [Newtonsoft.Json.JsonProperty("PackageName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(256, MinimumLength = 2)] public string PackageName { get; set; } - - /// The package home page + + /// + /// The package home page + /// [Newtonsoft.Json.JsonProperty("PackageUrl", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(2048)] [System.ComponentModel.DataAnnotations.RegularExpression(@"^([Hh][Tt][Tt][Pp][Ss]?)://.+$")] public string PackageUrl { get; set; } - - /// The package license + + /// + /// The package license + /// [Newtonsoft.Json.JsonProperty("License", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(512, MinimumLength = 3)] public string License { get; set; } - - /// The license page + + /// + /// The license page + /// [Newtonsoft.Json.JsonProperty("LicenseUrl", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(2048)] [System.ComponentModel.DataAnnotations.RegularExpression(@"^([Hh][Tt][Tt][Pp][Ss]?)://.+$")] public string LicenseUrl { get; set; } - - /// The package copyright + + /// + /// The package copyright + /// [Newtonsoft.Json.JsonProperty("Copyright", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(512, MinimumLength = 3)] public string Copyright { get; set; } - - /// The package copyright page + + /// + /// The package copyright page + /// [Newtonsoft.Json.JsonProperty("CopyrightUrl", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(2048)] [System.ComponentModel.DataAnnotations.RegularExpression(@"^([Hh][Tt][Tt][Pp][Ss]?)://.+$")] public string CopyrightUrl { get; set; } - - /// The short package description + + /// + /// The short package description + /// [Newtonsoft.Json.JsonProperty("ShortDescription", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(256, MinimumLength = 3)] public string ShortDescription { get; set; } - - /// The full package description + + /// + /// The full package description + /// [Newtonsoft.Json.JsonProperty("Description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(10000, MinimumLength = 3)] public string Description { get; set; } - - /// List of additional package search terms + + /// + /// List of additional package search terms + /// [Newtonsoft.Json.JsonProperty("Tags", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.MaxLength(16)] public System.Collections.Generic.List Tags { get; set; } - + [Newtonsoft.Json.JsonProperty("Agreements", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.MaxLength(128)] public System.Collections.Generic.List Agreements { get; set; } - - /// The package release notes + + /// + /// The package release notes + /// [Newtonsoft.Json.JsonProperty("ReleaseNotes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(10000, MinimumLength = 1)] public string ReleaseNotes { get; set; } - - /// The package release notes url + + /// + /// The package release notes url + /// [Newtonsoft.Json.JsonProperty("ReleaseNotesUrl", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(2048)] [System.ComponentModel.DataAnnotations.RegularExpression(@"^([Hh][Tt][Tt][Pp][Ss]?)://.+$")] public string ReleaseNotesUrl { get; set; } - - /// The purchase url for acquiring entitlement for the package. + + /// + /// The purchase url for acquiring entitlement for the package. + /// [Newtonsoft.Json.JsonProperty("PurchaseUrl", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(2048)] [System.ComponentModel.DataAnnotations.RegularExpression(@"^([Hh][Tt][Tt][Pp][Ss]?)://.+$")] public string PurchaseUrl { get; set; } - - /// The notes displayed to the user upon completion of a package installation. + + /// + /// The notes displayed to the user upon completion of a package installation. + /// [Newtonsoft.Json.JsonProperty("InstallationNotes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(10000, MinimumLength = 1)] public string InstallationNotes { get; set; } - + [Newtonsoft.Json.JsonProperty("Documentations", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.MaxLength(256)] public System.Collections.Generic.List Documentations { get; set; } - + [Newtonsoft.Json.JsonProperty("Icons", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.MaxLength(1024)] public System.Collections.Generic.List Icons { get; set; } - - /// The manifest type + + /// + /// The manifest type + /// [Newtonsoft.Json.JsonProperty("ManifestType", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] public string ManifestType { get; set; } = "locale"; - - /// The manifest syntax version + + /// + /// The manifest syntax version + /// [Newtonsoft.Json.JsonProperty("ManifestVersion", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] [System.ComponentModel.DataAnnotations.RegularExpression(@"^(0|[1-9][0-9]{0,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])(\.(0|[1-9][0-9]{0,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])){2}$")] - public string ManifestVersion { get; set; } = "1.6.0"; - - private System.Collections.Generic.IDictionary _additionalProperties = new System.Collections.Generic.Dictionary(); - + public string ManifestVersion { get; set; } = "1.9.0"; + + + + private System.Collections.Generic.IDictionary _additionalProperties; + [Newtonsoft.Json.JsonExtensionData] public System.Collections.Generic.IDictionary AdditionalProperties { - get { return _additionalProperties; } + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); } set { _additionalProperties = value; } } - - + } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.3.0 (Newtonsoft.Json v11.0.0.0)")] + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "11.0.0.0 (Newtonsoft.Json v13.0.0.0)")] public enum IconFileType { + [System.Runtime.Serialization.EnumMember(Value = @"png")] Png = 0, - + + [System.Runtime.Serialization.EnumMember(Value = @"jpeg")] Jpeg = 1, - + + [System.Runtime.Serialization.EnumMember(Value = @"ico")] Ico = 2, - + + } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.3.0 (Newtonsoft.Json v11.0.0.0)")] + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "11.0.0.0 (Newtonsoft.Json v13.0.0.0)")] public enum IconResolution { + [System.Runtime.Serialization.EnumMember(Value = @"custom")] Custom = 0, - + + [System.Runtime.Serialization.EnumMember(Value = @"16x16")] _16x16 = 1, - + + [System.Runtime.Serialization.EnumMember(Value = @"20x20")] _20x20 = 2, - + + [System.Runtime.Serialization.EnumMember(Value = @"24x24")] _24x24 = 3, - + + [System.Runtime.Serialization.EnumMember(Value = @"30x30")] _30x30 = 4, - + + [System.Runtime.Serialization.EnumMember(Value = @"32x32")] _32x32 = 5, - + + [System.Runtime.Serialization.EnumMember(Value = @"36x36")] _36x36 = 6, - + + [System.Runtime.Serialization.EnumMember(Value = @"40x40")] _40x40 = 7, - + + [System.Runtime.Serialization.EnumMember(Value = @"48x48")] _48x48 = 8, - + + [System.Runtime.Serialization.EnumMember(Value = @"60x60")] _60x60 = 9, - + + [System.Runtime.Serialization.EnumMember(Value = @"64x64")] _64x64 = 10, - + + [System.Runtime.Serialization.EnumMember(Value = @"72x72")] _72x72 = 11, - + + [System.Runtime.Serialization.EnumMember(Value = @"80x80")] _80x80 = 12, - + + [System.Runtime.Serialization.EnumMember(Value = @"96x96")] _96x96 = 13, - + + [System.Runtime.Serialization.EnumMember(Value = @"256x256")] _256x256 = 14, - + + } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.3.0 (Newtonsoft.Json v11.0.0.0)")] + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "11.0.0.0 (Newtonsoft.Json v13.0.0.0)")] public enum IconTheme { + [System.Runtime.Serialization.EnumMember(Value = @"default")] Default = 0, - + + [System.Runtime.Serialization.EnumMember(Value = @"light")] Light = 1, - + + [System.Runtime.Serialization.EnumMember(Value = @"dark")] Dark = 2, - + + [System.Runtime.Serialization.EnumMember(Value = @"highContrast")] HighContrast = 3, - + + } } \ No newline at end of file diff --git a/src/WingetCreateCore/Models/SingletonManifestModels.cs b/src/WingetCreateCore/Models/SingletonManifestModels.cs index 14419407..9b11053f 100644 --- a/src/WingetCreateCore/Models/SingletonManifestModels.cs +++ b/src/WingetCreateCore/Models/SingletonManifestModels.cs @@ -1,1201 +1,1501 @@ //---------------------- // -// Generated using the NJsonSchema v10.4.3.0 (Newtonsoft.Json v11.0.0.0) (http://NJsonSchema.org) +// Generated using the NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0) (http://NJsonSchema.org) // //---------------------- + namespace Microsoft.WingetCreateCore.Models.Singleton { #pragma warning disable // Disable all warnings - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.3.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class Agreement + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "11.0.0.0 (Newtonsoft.Json v13.0.0.0)")] + public partial class Agreement { - /// The label of the Agreement. i.e. EULA, AgeRating, etc. This field should be localized. Either Agreement or AgreementUrl is required. When we show the agreements, we would Bold the AgreementLabel + /// + /// The label of the Agreement. i.e. EULA, AgeRating, etc. This field should be localized. Either Agreement or AgreementUrl is required. When we show the agreements, we would Bold the AgreementLabel + /// [Newtonsoft.Json.JsonProperty("AgreementLabel", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(100, MinimumLength = 1)] public string AgreementLabel { get; set; } - - /// The agreement text content. + + /// + /// The agreement text content. + /// [Newtonsoft.Json.JsonProperty("Agreement", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(10000, MinimumLength = 1)] public string Agreement1 { get; set; } - - /// The agreement URL. + + /// + /// The agreement URL. + /// [Newtonsoft.Json.JsonProperty("AgreementUrl", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(2048)] [System.ComponentModel.DataAnnotations.RegularExpression(@"^([Hh][Tt][Tt][Pp][Ss]?)://.+$")] public string AgreementUrl { get; set; } - - private System.Collections.Generic.IDictionary _additionalProperties = new System.Collections.Generic.Dictionary(); - + + + + private System.Collections.Generic.IDictionary _additionalProperties; + [Newtonsoft.Json.JsonExtensionData] public System.Collections.Generic.IDictionary AdditionalProperties { - get { return _additionalProperties; } + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); } set { _additionalProperties = value; } } - - + } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.3.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class Documentation + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "11.0.0.0 (Newtonsoft.Json v13.0.0.0)")] + public partial class Documentation { - /// The label of the documentation for providing software guides such as manuals and troubleshooting URLs. + /// + /// The label of the documentation for providing software guides such as manuals and troubleshooting URLs. + /// [Newtonsoft.Json.JsonProperty("DocumentLabel", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(100, MinimumLength = 1)] public string DocumentLabel { get; set; } - - /// The documentation URL. + + /// + /// The documentation URL. + /// [Newtonsoft.Json.JsonProperty("DocumentUrl", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(2048)] [System.ComponentModel.DataAnnotations.RegularExpression(@"^([Hh][Tt][Tt][Pp][Ss]?)://.+$")] public string DocumentUrl { get; set; } - - private System.Collections.Generic.IDictionary _additionalProperties = new System.Collections.Generic.Dictionary(); - + + + + private System.Collections.Generic.IDictionary _additionalProperties; + [Newtonsoft.Json.JsonExtensionData] public System.Collections.Generic.IDictionary AdditionalProperties { - get { return _additionalProperties; } + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); } set { _additionalProperties = value; } } - - + } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.3.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class Icon + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "11.0.0.0 (Newtonsoft.Json v13.0.0.0)")] + public partial class Icon { - /// The url of the hosted icon file + /// + /// The url of the hosted icon file + /// [Newtonsoft.Json.JsonProperty("IconUrl", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(2048)] [System.ComponentModel.DataAnnotations.RegularExpression(@"^([Hh][Tt][Tt][Pp][Ss]?)://.+$")] public string IconUrl { get; set; } - - /// The icon file type + + /// + /// The icon file type + /// [Newtonsoft.Json.JsonProperty("IconFileType", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] public IconFileType IconFileType { get; set; } - - /// Optional icon resolution + + /// + /// Optional icon resolution + /// [Newtonsoft.Json.JsonProperty("IconResolution", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] public IconResolution? IconResolution { get; set; } - - /// Optional icon theme + + /// + /// Optional icon theme + /// [Newtonsoft.Json.JsonProperty("IconTheme", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] public IconTheme? IconTheme { get; set; } - - /// Optional Sha256 of the icon file + + /// + /// Optional Sha256 of the icon file + /// [Newtonsoft.Json.JsonProperty("IconSha256", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.RegularExpression(@"^[A-Fa-f0-9]{64}$")] public string IconSha256 { get; set; } - - private System.Collections.Generic.IDictionary _additionalProperties = new System.Collections.Generic.Dictionary(); - + + + + private System.Collections.Generic.IDictionary _additionalProperties; + [Newtonsoft.Json.JsonExtensionData] public System.Collections.Generic.IDictionary AdditionalProperties { - get { return _additionalProperties; } + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); } set { _additionalProperties = value; } } - - + } - - /// Enumeration of supported installer types. InstallerType is required in either root level or individual Installer level - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.3.0 (Newtonsoft.Json v11.0.0.0)")] + + /// + /// Enumeration of supported installer types. InstallerType is required in either root level or individual Installer level + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "11.0.0.0 (Newtonsoft.Json v13.0.0.0)")] public enum InstallerType { + [System.Runtime.Serialization.EnumMember(Value = @"msix")] Msix = 0, - + + [System.Runtime.Serialization.EnumMember(Value = @"msi")] Msi = 1, - + + [System.Runtime.Serialization.EnumMember(Value = @"appx")] Appx = 2, - + + [System.Runtime.Serialization.EnumMember(Value = @"exe")] Exe = 3, - + + [System.Runtime.Serialization.EnumMember(Value = @"zip")] Zip = 4, - + + [System.Runtime.Serialization.EnumMember(Value = @"inno")] Inno = 5, - + + [System.Runtime.Serialization.EnumMember(Value = @"nullsoft")] Nullsoft = 6, - + + [System.Runtime.Serialization.EnumMember(Value = @"wix")] Wix = 7, - + + [System.Runtime.Serialization.EnumMember(Value = @"burn")] Burn = 8, - + + [System.Runtime.Serialization.EnumMember(Value = @"pwa")] Pwa = 9, - + + [System.Runtime.Serialization.EnumMember(Value = @"portable")] Portable = 10, - + + } - - /// Enumeration of supported nested installer types contained inside an archive file - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.3.0 (Newtonsoft.Json v11.0.0.0)")] + + /// + /// Enumeration of supported nested installer types contained inside an archive file + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "11.0.0.0 (Newtonsoft.Json v13.0.0.0)")] public enum NestedInstallerType { + [System.Runtime.Serialization.EnumMember(Value = @"msix")] Msix = 0, - + + [System.Runtime.Serialization.EnumMember(Value = @"msi")] Msi = 1, - + + [System.Runtime.Serialization.EnumMember(Value = @"appx")] Appx = 2, - + + [System.Runtime.Serialization.EnumMember(Value = @"exe")] Exe = 3, - + + [System.Runtime.Serialization.EnumMember(Value = @"inno")] Inno = 4, - + + [System.Runtime.Serialization.EnumMember(Value = @"nullsoft")] Nullsoft = 5, - + + [System.Runtime.Serialization.EnumMember(Value = @"wix")] Wix = 6, - + + [System.Runtime.Serialization.EnumMember(Value = @"burn")] Burn = 7, - + + [System.Runtime.Serialization.EnumMember(Value = @"portable")] Portable = 8, - + + } - - /// The installer target architecture - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.3.0 (Newtonsoft.Json v11.0.0.0)")] + + /// + /// The installer target architecture + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "11.0.0.0 (Newtonsoft.Json v13.0.0.0)")] public enum Architecture { + [System.Runtime.Serialization.EnumMember(Value = @"x86")] X86 = 0, - + + [System.Runtime.Serialization.EnumMember(Value = @"x64")] X64 = 1, - + + [System.Runtime.Serialization.EnumMember(Value = @"arm")] Arm = 2, - + + [System.Runtime.Serialization.EnumMember(Value = @"arm64")] Arm64 = 3, - + + [System.Runtime.Serialization.EnumMember(Value = @"neutral")] Neutral = 4, - + + } - - /// Scope indicates if the installer is per user or per machine - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.3.0 (Newtonsoft.Json v11.0.0.0)")] + + /// + /// Scope indicates if the installer is per user or per machine + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "11.0.0.0 (Newtonsoft.Json v13.0.0.0)")] public enum Scope { + [System.Runtime.Serialization.EnumMember(Value = @"user")] User = 0, - + + [System.Runtime.Serialization.EnumMember(Value = @"machine")] Machine = 1, - + + } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.3.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class InstallerSwitches + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "11.0.0.0 (Newtonsoft.Json v13.0.0.0)")] + public partial class InstallerSwitches { - /// Silent is the value that should be passed to the installer when user chooses a silent or quiet install + /// + /// Silent is the value that should be passed to the installer when user chooses a silent or quiet install + /// [Newtonsoft.Json.JsonProperty("Silent", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(512, MinimumLength = 1)] public string Silent { get; set; } - - /// SilentWithProgress is the value that should be passed to the installer when user chooses a non-interactive install + + /// + /// SilentWithProgress is the value that should be passed to the installer when user chooses a non-interactive install + /// [Newtonsoft.Json.JsonProperty("SilentWithProgress", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(512, MinimumLength = 1)] public string SilentWithProgress { get; set; } - - /// Interactive is the value that should be passed to the installer when user chooses an interactive install + + /// + /// Interactive is the value that should be passed to the installer when user chooses an interactive install + /// [Newtonsoft.Json.JsonProperty("Interactive", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(512, MinimumLength = 1)] public string Interactive { get; set; } - - /// InstallLocation is the value passed to the installer for custom install location. <INSTALLPATH> token can be included in the switch value so that winget will replace the token with user provided path + + /// + /// InstallLocation is the value passed to the installer for custom install location. <INSTALLPATH> token can be included in the switch value so that winget will replace the token with user provided path + /// [Newtonsoft.Json.JsonProperty("InstallLocation", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(512, MinimumLength = 1)] public string InstallLocation { get; set; } - - /// Log is the value passed to the installer for custom log file path. <LOGPATH> token can be included in the switch value so that winget will replace the token with user provided path + + /// + /// Log is the value passed to the installer for custom log file path. <LOGPATH> token can be included in the switch value so that winget will replace the token with user provided path + /// [Newtonsoft.Json.JsonProperty("Log", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(512, MinimumLength = 1)] public string Log { get; set; } - - /// Upgrade is the value that should be passed to the installer when user chooses an upgrade + + /// + /// Upgrade is the value that should be passed to the installer when user chooses an upgrade + /// [Newtonsoft.Json.JsonProperty("Upgrade", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(512, MinimumLength = 1)] public string Upgrade { get; set; } - - /// Custom switches will be passed directly to the installer by winget + + /// + /// Custom switches will be passed directly to the installer by winget + /// [Newtonsoft.Json.JsonProperty("Custom", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(2048, MinimumLength = 1)] public string Custom { get; set; } - - private System.Collections.Generic.IDictionary _additionalProperties = new System.Collections.Generic.Dictionary(); - + + /// + /// The 'Repair' value must be passed to the installer, ModifyPath ARP command, or uninstaller ARP command when the user opts for a repair + /// + [Newtonsoft.Json.JsonProperty("Repair", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [System.ComponentModel.DataAnnotations.StringLength(512, MinimumLength = 1)] + public string Repair { get; set; } + + + + private System.Collections.Generic.IDictionary _additionalProperties; + [Newtonsoft.Json.JsonExtensionData] public System.Collections.Generic.IDictionary AdditionalProperties { - get { return _additionalProperties; } + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); } set { _additionalProperties = value; } } - - + } - - /// The upgrade method - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.3.0 (Newtonsoft.Json v11.0.0.0)")] + + /// + /// The upgrade method + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "11.0.0.0 (Newtonsoft.Json v13.0.0.0)")] public enum UpgradeBehavior { + [System.Runtime.Serialization.EnumMember(Value = @"install")] Install = 0, - + + [System.Runtime.Serialization.EnumMember(Value = @"uninstallPrevious")] UninstallPrevious = 1, - + + [System.Runtime.Serialization.EnumMember(Value = @"deny")] Deny = 2, - + + } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.3.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class Dependencies + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "11.0.0.0 (Newtonsoft.Json v13.0.0.0)")] + public partial class Dependencies { - /// List of Windows feature dependencies + /// + /// List of Windows feature dependencies + /// [Newtonsoft.Json.JsonProperty("WindowsFeatures", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.MaxLength(16)] public System.Collections.Generic.List WindowsFeatures { get; set; } - - /// List of Windows library dependencies + + /// + /// List of Windows library dependencies + /// [Newtonsoft.Json.JsonProperty("WindowsLibraries", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.MaxLength(16)] public System.Collections.Generic.List WindowsLibraries { get; set; } - - /// List of package dependencies from current source + + /// + /// List of package dependencies from current source + /// [Newtonsoft.Json.JsonProperty("PackageDependencies", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.MaxLength(16)] public System.Collections.Generic.List PackageDependencies { get; set; } - - /// List of external package dependencies + + /// + /// List of external package dependencies + /// [Newtonsoft.Json.JsonProperty("ExternalDependencies", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.MaxLength(16)] public System.Collections.Generic.List ExternalDependencies { get; set; } - - private System.Collections.Generic.IDictionary _additionalProperties = new System.Collections.Generic.Dictionary(); - + + + + private System.Collections.Generic.IDictionary _additionalProperties; + [Newtonsoft.Json.JsonExtensionData] public System.Collections.Generic.IDictionary AdditionalProperties { - get { return _additionalProperties; } + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); } set { _additionalProperties = value; } } - - + } - - /// The installer markets - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.3.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class Markets + + /// + /// The installer markets + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "11.0.0.0 (Newtonsoft.Json v13.0.0.0)")] + public partial class Markets { - private System.Collections.Generic.IDictionary _additionalProperties = new System.Collections.Generic.Dictionary(); - + + + private System.Collections.Generic.IDictionary _additionalProperties; + [Newtonsoft.Json.JsonExtensionData] public System.Collections.Generic.IDictionary AdditionalProperties { - get { return _additionalProperties; } + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); } set { _additionalProperties = value; } } - - + } - - /// Various key values under installer's ARP entry - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.3.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class AppsAndFeaturesEntry + + /// + /// Various key values under installer's ARP entry + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "11.0.0.0 (Newtonsoft.Json v13.0.0.0)")] + public partial class AppsAndFeaturesEntry { - /// The DisplayName registry value + /// + /// The DisplayName registry value + /// [Newtonsoft.Json.JsonProperty("DisplayName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(256, MinimumLength = 1)] public string DisplayName { get; set; } - - /// The Publisher registry value + + /// + /// The Publisher registry value + /// [Newtonsoft.Json.JsonProperty("Publisher", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(256, MinimumLength = 1)] public string Publisher { get; set; } - - /// The DisplayVersion registry value + + /// + /// The DisplayVersion registry value + /// [Newtonsoft.Json.JsonProperty("DisplayVersion", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(128, MinimumLength = 1)] public string DisplayVersion { get; set; } - + [Newtonsoft.Json.JsonProperty("ProductCode", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(255, MinimumLength = 1)] public string ProductCode { get; set; } - + [Newtonsoft.Json.JsonProperty("UpgradeCode", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(255, MinimumLength = 1)] public string UpgradeCode { get; set; } - + [Newtonsoft.Json.JsonProperty("InstallerType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] public InstallerType? InstallerType { get; set; } - - private System.Collections.Generic.IDictionary _additionalProperties = new System.Collections.Generic.Dictionary(); - + + + + private System.Collections.Generic.IDictionary _additionalProperties; + [Newtonsoft.Json.JsonExtensionData] public System.Collections.Generic.IDictionary AdditionalProperties { - get { return _additionalProperties; } + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); } set { _additionalProperties = value; } } - - + } - - /// The installer's elevation requirement - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.3.0 (Newtonsoft.Json v11.0.0.0)")] + + /// + /// The installer's elevation requirement + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "11.0.0.0 (Newtonsoft.Json v13.0.0.0)")] public enum ElevationRequirement { + [System.Runtime.Serialization.EnumMember(Value = @"elevationRequired")] ElevationRequired = 0, - + + [System.Runtime.Serialization.EnumMember(Value = @"elevationProhibited")] ElevationProhibited = 1, - + + [System.Runtime.Serialization.EnumMember(Value = @"elevatesSelf")] ElevatesSelf = 2, - + + } - - /// Details about the installation. Used for deeper installation detection. - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.3.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class InstallationMetadata + + /// + /// Details about the installation. Used for deeper installation detection. + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "11.0.0.0 (Newtonsoft.Json v13.0.0.0)")] + public partial class InstallationMetadata { - /// Represents the default installed package location. Used for deeper installation detection. + /// + /// Represents the default installed package location. Used for deeper installation detection. + /// [Newtonsoft.Json.JsonProperty("DefaultInstallLocation", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(2048, MinimumLength = 1)] public string DefaultInstallLocation { get; set; } - - /// List of installed files. + + /// + /// List of installed files. + /// [Newtonsoft.Json.JsonProperty("Files", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.MaxLength(2048)] public System.Collections.Generic.List Files { get; set; } - - private System.Collections.Generic.IDictionary _additionalProperties = new System.Collections.Generic.Dictionary(); - + + + + private System.Collections.Generic.IDictionary _additionalProperties; + [Newtonsoft.Json.JsonExtensionData] public System.Collections.Generic.IDictionary AdditionalProperties { - get { return _additionalProperties; } + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); } set { _additionalProperties = value; } } - - + } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.3.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class Installer + + /// + /// The repair method + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "11.0.0.0 (Newtonsoft.Json v13.0.0.0)")] + public enum RepairBehavior + { + + [System.Runtime.Serialization.EnumMember(Value = @"modify")] + Modify = 0, + + + [System.Runtime.Serialization.EnumMember(Value = @"uninstaller")] + Uninstaller = 1, + + + [System.Runtime.Serialization.EnumMember(Value = @"installer")] + Installer = 2, + + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "11.0.0.0 (Newtonsoft.Json v13.0.0.0)")] + public partial class Installer { [Newtonsoft.Json.JsonProperty("InstallerLocale", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(20)] [System.ComponentModel.DataAnnotations.RegularExpression(@"^([a-zA-Z]{2,3}|[iI]-[a-zA-Z]+|[xX]-[a-zA-Z]{1,8})(-[a-zA-Z]{1,8})*$")] public string InstallerLocale { get; set; } - + [Newtonsoft.Json.JsonProperty("Platform", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore, ItemConverterType = typeof(Newtonsoft.Json.Converters.StringEnumConverter))] [System.ComponentModel.DataAnnotations.MaxLength(2)] public System.Collections.Generic.List Platform { get; set; } - + [Newtonsoft.Json.JsonProperty("MinimumOSVersion", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.RegularExpression(@"^(0|[1-9][0-9]{0,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])(\.(0|[1-9][0-9]{0,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])){0,3}$")] public string MinimumOSVersion { get; set; } - + [Newtonsoft.Json.JsonProperty("Architecture", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] public Architecture Architecture { get; set; } - + [Newtonsoft.Json.JsonProperty("InstallerType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] public InstallerType? InstallerType { get; set; } - + [Newtonsoft.Json.JsonProperty("NestedInstallerType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] public NestedInstallerType? NestedInstallerType { get; set; } - + [Newtonsoft.Json.JsonProperty("NestedInstallerFiles", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.MaxLength(1024)] public System.Collections.Generic.List NestedInstallerFiles { get; set; } - + [Newtonsoft.Json.JsonProperty("Scope", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] public Scope? Scope { get; set; } - - /// The installer Url + + /// + /// The installer Url + /// [Newtonsoft.Json.JsonProperty("InstallerUrl", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] [System.ComponentModel.DataAnnotations.StringLength(2048)] [System.ComponentModel.DataAnnotations.RegularExpression(@"^([Hh][Tt][Tt][Pp][Ss]?)://.+$")] public string InstallerUrl { get; set; } - - /// Sha256 is required. Sha256 of the installer + + /// + /// Sha256 is required. Sha256 of the installer + /// [Newtonsoft.Json.JsonProperty("InstallerSha256", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] [System.ComponentModel.DataAnnotations.RegularExpression(@"^[A-Fa-f0-9]{64}$")] public string InstallerSha256 { get; set; } - - /// SignatureSha256 is recommended for appx or msix. It is the sha256 of signature file inside appx or msix. Could be used during streaming install if applicable + + /// + /// SignatureSha256 is recommended for appx or msix. It is the sha256 of signature file inside appx or msix. Could be used during streaming install if applicable + /// [Newtonsoft.Json.JsonProperty("SignatureSha256", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.RegularExpression(@"^[A-Fa-f0-9]{64}$")] public string SignatureSha256 { get; set; } - + [Newtonsoft.Json.JsonProperty("InstallModes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore, ItemConverterType = typeof(Newtonsoft.Json.Converters.StringEnumConverter))] [System.ComponentModel.DataAnnotations.MaxLength(3)] public System.Collections.Generic.List InstallModes { get; set; } - + [Newtonsoft.Json.JsonProperty("InstallerSwitches", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public InstallerSwitches InstallerSwitches { get; set; } - + [Newtonsoft.Json.JsonProperty("InstallerSuccessCodes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.MaxLength(16)] public System.Collections.Generic.List InstallerSuccessCodes { get; set; } - + [Newtonsoft.Json.JsonProperty("ExpectedReturnCodes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.MaxLength(128)] public System.Collections.Generic.List ExpectedReturnCodes { get; set; } - + [Newtonsoft.Json.JsonProperty("UpgradeBehavior", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] public UpgradeBehavior? UpgradeBehavior { get; set; } - + [Newtonsoft.Json.JsonProperty("Commands", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.MaxLength(16)] public System.Collections.Generic.List Commands { get; set; } - + [Newtonsoft.Json.JsonProperty("Protocols", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.MaxLength(64)] public System.Collections.Generic.List Protocols { get; set; } - + [Newtonsoft.Json.JsonProperty("FileExtensions", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.MaxLength(512)] public System.Collections.Generic.List FileExtensions { get; set; } - + [Newtonsoft.Json.JsonProperty("Dependencies", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public Dependencies Dependencies { get; set; } - + [Newtonsoft.Json.JsonProperty("PackageFamilyName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(255)] [System.ComponentModel.DataAnnotations.RegularExpression(@"^[A-Za-z0-9][-\.A-Za-z0-9]+_[A-Za-z0-9]{13}$")] public string PackageFamilyName { get; set; } - + [Newtonsoft.Json.JsonProperty("ProductCode", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(255, MinimumLength = 1)] public string ProductCode { get; set; } - + [Newtonsoft.Json.JsonProperty("Capabilities", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.MaxLength(1000)] public System.Collections.Generic.List Capabilities { get; set; } - + [Newtonsoft.Json.JsonProperty("RestrictedCapabilities", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.MaxLength(1000)] public System.Collections.Generic.List RestrictedCapabilities { get; set; } - + [Newtonsoft.Json.JsonProperty("Markets", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public Markets2 Markets { get; set; } - + [Newtonsoft.Json.JsonProperty("InstallerAbortsTerminal", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public bool? InstallerAbortsTerminal { get; set; } - + [Newtonsoft.Json.JsonProperty("ReleaseDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [Newtonsoft.Json.JsonConverter(typeof(DateFormatConverter))] public System.DateTimeOffset? ReleaseDate { get; set; } - + [Newtonsoft.Json.JsonProperty("InstallLocationRequired", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public bool? InstallLocationRequired { get; set; } - + [Newtonsoft.Json.JsonProperty("RequireExplicitUpgrade", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public bool? RequireExplicitUpgrade { get; set; } - + [Newtonsoft.Json.JsonProperty("DisplayInstallWarnings", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public bool? DisplayInstallWarnings { get; set; } - + [Newtonsoft.Json.JsonProperty("UnsupportedOSArchitectures", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore, ItemConverterType = typeof(Newtonsoft.Json.Converters.StringEnumConverter))] public System.Collections.Generic.List UnsupportedOSArchitectures { get; set; } - + [Newtonsoft.Json.JsonProperty("UnsupportedArguments", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore, ItemConverterType = typeof(Newtonsoft.Json.Converters.StringEnumConverter))] public System.Collections.Generic.List UnsupportedArguments { get; set; } - + [Newtonsoft.Json.JsonProperty("AppsAndFeaturesEntries", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.MaxLength(128)] public System.Collections.Generic.List AppsAndFeaturesEntries { get; set; } - + [Newtonsoft.Json.JsonProperty("ElevationRequirement", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] public ElevationRequirement? ElevationRequirement { get; set; } - + [Newtonsoft.Json.JsonProperty("InstallationMetadata", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public InstallationMetadata InstallationMetadata { get; set; } - + [Newtonsoft.Json.JsonProperty("DownloadCommandProhibited", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public bool? DownloadCommandProhibited { get; set; } - - private System.Collections.Generic.IDictionary _additionalProperties = new System.Collections.Generic.Dictionary(); - + + [Newtonsoft.Json.JsonProperty("RepairBehavior", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] + public RepairBehavior? RepairBehavior { get; set; } + + [Newtonsoft.Json.JsonProperty("ArchiveBinariesDependOnPath", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool? ArchiveBinariesDependOnPath { get; set; } + + + + private System.Collections.Generic.IDictionary _additionalProperties; + [Newtonsoft.Json.JsonExtensionData] public System.Collections.Generic.IDictionary AdditionalProperties { - get { return _additionalProperties; } + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); } set { _additionalProperties = value; } } - - + } - - /// A representation of a single-file manifest representing an app in the OWC. v1.6.0 - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.3.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SingletonManifest + + /// + /// A representation of a single-file manifest representing an app in the OWC. v1.9.0 + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "11.0.0.0 (Newtonsoft.Json v13.0.0.0)")] + public partial class SingletonManifest { [Newtonsoft.Json.JsonProperty("PackageIdentifier", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] [System.ComponentModel.DataAnnotations.StringLength(128)] [System.ComponentModel.DataAnnotations.RegularExpression(@"^[^\.\s\\/:\*\?""<>\|\x01-\x1f]{1,32}(\.[^\.\s\\/:\*\?""<>\|\x01-\x1f]{1,32}){1,7}$")] public string PackageIdentifier { get; set; } - + [Newtonsoft.Json.JsonProperty("PackageVersion", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] [System.ComponentModel.DataAnnotations.StringLength(128)] [System.ComponentModel.DataAnnotations.RegularExpression(@"^[^\\/:\*\?""<>\|\x01-\x1f]+$")] public string PackageVersion { get; set; } - + [Newtonsoft.Json.JsonProperty("PackageLocale", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(20)] [System.ComponentModel.DataAnnotations.RegularExpression(@"^([a-zA-Z]{2,3}|[iI]-[a-zA-Z]+|[xX]-[a-zA-Z]{1,8})(-[a-zA-Z]{1,8})*$")] public string PackageLocale { get; set; } - - /// The publisher name + + /// + /// The publisher name + /// [Newtonsoft.Json.JsonProperty("Publisher", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.Required] [System.ComponentModel.DataAnnotations.StringLength(256, MinimumLength = 2)] public string Publisher { get; set; } - - /// The publisher home page + + /// + /// The publisher home page + /// [Newtonsoft.Json.JsonProperty("PublisherUrl", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(2048)] [System.ComponentModel.DataAnnotations.RegularExpression(@"^([Hh][Tt][Tt][Pp][Ss]?)://.+$")] public string PublisherUrl { get; set; } - - /// The publisher support page + + /// + /// The publisher support page + /// [Newtonsoft.Json.JsonProperty("PublisherSupportUrl", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(2048)] [System.ComponentModel.DataAnnotations.RegularExpression(@"^([Hh][Tt][Tt][Pp][Ss]?)://.+$")] public string PublisherSupportUrl { get; set; } - - /// The publisher privacy page or the package privacy page + + /// + /// The publisher privacy page or the package privacy page + /// [Newtonsoft.Json.JsonProperty("PrivacyUrl", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(2048)] [System.ComponentModel.DataAnnotations.RegularExpression(@"^([Hh][Tt][Tt][Pp][Ss]?)://.+$")] public string PrivacyUrl { get; set; } - - /// The package author + + /// + /// The package author + /// [Newtonsoft.Json.JsonProperty("Author", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(256, MinimumLength = 2)] public string Author { get; set; } - - /// The package name + + /// + /// The package name + /// [Newtonsoft.Json.JsonProperty("PackageName", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.Required] [System.ComponentModel.DataAnnotations.StringLength(256, MinimumLength = 2)] public string PackageName { get; set; } - - /// The package home page + + /// + /// The package home page + /// [Newtonsoft.Json.JsonProperty("PackageUrl", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(2048)] [System.ComponentModel.DataAnnotations.RegularExpression(@"^([Hh][Tt][Tt][Pp][Ss]?)://.+$")] public string PackageUrl { get; set; } - - /// The package license + + /// + /// The package license + /// [Newtonsoft.Json.JsonProperty("License", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.Required] [System.ComponentModel.DataAnnotations.StringLength(512, MinimumLength = 3)] public string License { get; set; } - - /// The license page + + /// + /// The license page + /// [Newtonsoft.Json.JsonProperty("LicenseUrl", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(2048)] [System.ComponentModel.DataAnnotations.RegularExpression(@"^([Hh][Tt][Tt][Pp][Ss]?)://.+$")] public string LicenseUrl { get; set; } - - /// The package copyright + + /// + /// The package copyright + /// [Newtonsoft.Json.JsonProperty("Copyright", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(512, MinimumLength = 3)] public string Copyright { get; set; } - - /// The package copyright page + + /// + /// The package copyright page + /// [Newtonsoft.Json.JsonProperty("CopyrightUrl", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(2048)] [System.ComponentModel.DataAnnotations.RegularExpression(@"^([Hh][Tt][Tt][Pp][Ss]?)://.+$")] public string CopyrightUrl { get; set; } - - /// The short package description + + /// + /// The short package description + /// [Newtonsoft.Json.JsonProperty("ShortDescription", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.Required] [System.ComponentModel.DataAnnotations.StringLength(256, MinimumLength = 3)] public string ShortDescription { get; set; } - - /// The full package description + + /// + /// The full package description + /// [Newtonsoft.Json.JsonProperty("Description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(10000, MinimumLength = 3)] public string Description { get; set; } - - /// The most common package term + + /// + /// The most common package term + /// [Newtonsoft.Json.JsonProperty("Moniker", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(40, MinimumLength = 1)] public string Moniker { get; set; } - - /// List of additional package search terms + + /// + /// List of additional package search terms + /// [Newtonsoft.Json.JsonProperty("Tags", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.MaxLength(16)] public System.Collections.Generic.List Tags { get; set; } - + [Newtonsoft.Json.JsonProperty("Agreements", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.MaxLength(128)] public System.Collections.Generic.List Agreements { get; set; } - - /// The package release notes + + /// + /// The package release notes + /// [Newtonsoft.Json.JsonProperty("ReleaseNotes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(10000, MinimumLength = 1)] public string ReleaseNotes { get; set; } - - /// The package release notes url + + /// + /// The package release notes url + /// [Newtonsoft.Json.JsonProperty("ReleaseNotesUrl", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(2048)] [System.ComponentModel.DataAnnotations.RegularExpression(@"^([Hh][Tt][Tt][Pp][Ss]?)://.+$")] public string ReleaseNotesUrl { get; set; } - - /// The purchase url for acquiring entitlement for the package. + + /// + /// The purchase url for acquiring entitlement for the package. + /// [Newtonsoft.Json.JsonProperty("PurchaseUrl", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(2048)] [System.ComponentModel.DataAnnotations.RegularExpression(@"^([Hh][Tt][Tt][Pp][Ss]?)://.+$")] public string PurchaseUrl { get; set; } - - /// The notes displayed to the user upon completion of a package installation. + + /// + /// The notes displayed to the user upon completion of a package installation. + /// [Newtonsoft.Json.JsonProperty("InstallationNotes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(10000, MinimumLength = 1)] public string InstallationNotes { get; set; } - + [Newtonsoft.Json.JsonProperty("Documentations", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.MaxLength(256)] public System.Collections.Generic.List Documentations { get; set; } - + [Newtonsoft.Json.JsonProperty("Icons", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.MaxLength(1024)] public System.Collections.Generic.List Icons { get; set; } - + [Newtonsoft.Json.JsonProperty("Channel", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(16, MinimumLength = 1)] public string Channel { get; set; } - + [Newtonsoft.Json.JsonProperty("InstallerLocale", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(20)] [System.ComponentModel.DataAnnotations.RegularExpression(@"^([a-zA-Z]{2,3}|[iI]-[a-zA-Z]+|[xX]-[a-zA-Z]{1,8})(-[a-zA-Z]{1,8})*$")] public string InstallerLocale { get; set; } - + [Newtonsoft.Json.JsonProperty("Platform", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore, ItemConverterType = typeof(Newtonsoft.Json.Converters.StringEnumConverter))] [System.ComponentModel.DataAnnotations.MaxLength(2)] public System.Collections.Generic.List Platform { get; set; } - + [Newtonsoft.Json.JsonProperty("MinimumOSVersion", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.RegularExpression(@"^(0|[1-9][0-9]{0,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])(\.(0|[1-9][0-9]{0,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])){0,3}$")] public string MinimumOSVersion { get; set; } - + [Newtonsoft.Json.JsonProperty("InstallerType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] public InstallerType? InstallerType { get; set; } - + [Newtonsoft.Json.JsonProperty("NestedInstallerType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] public NestedInstallerType? NestedInstallerType { get; set; } - + [Newtonsoft.Json.JsonProperty("NestedInstallerFiles", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.MaxLength(1024)] public System.Collections.Generic.List NestedInstallerFiles { get; set; } - + [Newtonsoft.Json.JsonProperty("Scope", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] public Scope? Scope { get; set; } - + [Newtonsoft.Json.JsonProperty("InstallModes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore, ItemConverterType = typeof(Newtonsoft.Json.Converters.StringEnumConverter))] [System.ComponentModel.DataAnnotations.MaxLength(3)] public System.Collections.Generic.List InstallModes { get; set; } - + [Newtonsoft.Json.JsonProperty("InstallerSwitches", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public InstallerSwitches InstallerSwitches { get; set; } - + [Newtonsoft.Json.JsonProperty("InstallerSuccessCodes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.MaxLength(16)] public System.Collections.Generic.List InstallerSuccessCodes { get; set; } - + [Newtonsoft.Json.JsonProperty("ExpectedReturnCodes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.MaxLength(128)] public System.Collections.Generic.List ExpectedReturnCodes { get; set; } - + [Newtonsoft.Json.JsonProperty("UpgradeBehavior", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] public UpgradeBehavior? UpgradeBehavior { get; set; } - + [Newtonsoft.Json.JsonProperty("Commands", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.MaxLength(16)] public System.Collections.Generic.List Commands { get; set; } - + [Newtonsoft.Json.JsonProperty("Protocols", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.MaxLength(64)] public System.Collections.Generic.List Protocols { get; set; } - + [Newtonsoft.Json.JsonProperty("FileExtensions", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.MaxLength(512)] public System.Collections.Generic.List FileExtensions { get; set; } - + [Newtonsoft.Json.JsonProperty("Dependencies", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public Dependencies Dependencies { get; set; } - + [Newtonsoft.Json.JsonProperty("PackageFamilyName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(255)] [System.ComponentModel.DataAnnotations.RegularExpression(@"^[A-Za-z0-9][-\.A-Za-z0-9]+_[A-Za-z0-9]{13}$")] public string PackageFamilyName { get; set; } - + [Newtonsoft.Json.JsonProperty("ProductCode", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(255, MinimumLength = 1)] public string ProductCode { get; set; } - + [Newtonsoft.Json.JsonProperty("Capabilities", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.MaxLength(1000)] public System.Collections.Generic.List Capabilities { get; set; } - + [Newtonsoft.Json.JsonProperty("RestrictedCapabilities", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.MaxLength(1000)] public System.Collections.Generic.List RestrictedCapabilities { get; set; } - + [Newtonsoft.Json.JsonProperty("Markets", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public Markets2 Markets { get; set; } - + [Newtonsoft.Json.JsonProperty("InstallerAbortsTerminal", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public bool? InstallerAbortsTerminal { get; set; } - + [Newtonsoft.Json.JsonProperty("ReleaseDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [Newtonsoft.Json.JsonConverter(typeof(DateFormatConverter))] public System.DateTimeOffset? ReleaseDate { get; set; } - + [Newtonsoft.Json.JsonProperty("InstallLocationRequired", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public bool? InstallLocationRequired { get; set; } - + [Newtonsoft.Json.JsonProperty("RequireExplicitUpgrade", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public bool? RequireExplicitUpgrade { get; set; } - + [Newtonsoft.Json.JsonProperty("DisplayInstallWarnings", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public bool? DisplayInstallWarnings { get; set; } - + [Newtonsoft.Json.JsonProperty("UnsupportedOSArchitectures", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore, ItemConverterType = typeof(Newtonsoft.Json.Converters.StringEnumConverter))] public System.Collections.Generic.List UnsupportedOSArchitectures { get; set; } - + [Newtonsoft.Json.JsonProperty("UnsupportedArguments", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore, ItemConverterType = typeof(Newtonsoft.Json.Converters.StringEnumConverter))] public System.Collections.Generic.List UnsupportedArguments { get; set; } - + [Newtonsoft.Json.JsonProperty("AppsAndFeaturesEntries", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.MaxLength(128)] public System.Collections.Generic.List AppsAndFeaturesEntries { get; set; } - + [Newtonsoft.Json.JsonProperty("ElevationRequirement", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] public ElevationRequirement? ElevationRequirement { get; set; } - + [Newtonsoft.Json.JsonProperty("InstallationMetadata", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public InstallationMetadata InstallationMetadata { get; set; } - + [Newtonsoft.Json.JsonProperty("DownloadCommandProhibited", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public bool? DownloadCommandProhibited { get; set; } - + + [Newtonsoft.Json.JsonProperty("RepairBehavior", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] + public RepairBehavior? RepairBehavior { get; set; } + + [Newtonsoft.Json.JsonProperty("ArchiveBinariesDependOnPath", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool? ArchiveBinariesDependOnPath { get; set; } + [Newtonsoft.Json.JsonProperty("Installers", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.Required] [System.ComponentModel.DataAnnotations.MinLength(1)] [System.ComponentModel.DataAnnotations.MaxLength(1)] public System.Collections.Generic.List Installers { get; set; } = new System.Collections.Generic.List(); - - /// The manifest type + + /// + /// The manifest type + /// [Newtonsoft.Json.JsonProperty("ManifestType", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] public string ManifestType { get; set; } = "singleton"; - - /// The manifest syntax version + + /// + /// The manifest syntax version + /// [Newtonsoft.Json.JsonProperty("ManifestVersion", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] [System.ComponentModel.DataAnnotations.RegularExpression(@"^(0|[1-9][0-9]{0,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])(\.(0|[1-9][0-9]{0,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])){2}$")] - public string ManifestVersion { get; set; } = "1.6.0"; - - private System.Collections.Generic.IDictionary _additionalProperties = new System.Collections.Generic.Dictionary(); - + public string ManifestVersion { get; set; } = "1.9.0"; + + + + private System.Collections.Generic.IDictionary _additionalProperties; + [Newtonsoft.Json.JsonExtensionData] public System.Collections.Generic.IDictionary AdditionalProperties { - get { return _additionalProperties; } + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); } set { _additionalProperties = value; } } - - + } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.3.0 (Newtonsoft.Json v11.0.0.0)")] + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "11.0.0.0 (Newtonsoft.Json v13.0.0.0)")] public enum IconFileType { + [System.Runtime.Serialization.EnumMember(Value = @"png")] Png = 0, - + + [System.Runtime.Serialization.EnumMember(Value = @"jpeg")] Jpeg = 1, - + + [System.Runtime.Serialization.EnumMember(Value = @"ico")] Ico = 2, - + + } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.3.0 (Newtonsoft.Json v11.0.0.0)")] + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "11.0.0.0 (Newtonsoft.Json v13.0.0.0)")] public enum IconResolution { + [System.Runtime.Serialization.EnumMember(Value = @"custom")] Custom = 0, - + + [System.Runtime.Serialization.EnumMember(Value = @"16x16")] _16x16 = 1, - + + [System.Runtime.Serialization.EnumMember(Value = @"20x20")] _20x20 = 2, - + + [System.Runtime.Serialization.EnumMember(Value = @"24x24")] _24x24 = 3, - + + [System.Runtime.Serialization.EnumMember(Value = @"30x30")] _30x30 = 4, - + + [System.Runtime.Serialization.EnumMember(Value = @"32x32")] _32x32 = 5, - + + [System.Runtime.Serialization.EnumMember(Value = @"36x36")] _36x36 = 6, - + + [System.Runtime.Serialization.EnumMember(Value = @"40x40")] _40x40 = 7, - + + [System.Runtime.Serialization.EnumMember(Value = @"48x48")] _48x48 = 8, - + + [System.Runtime.Serialization.EnumMember(Value = @"60x60")] _60x60 = 9, - + + [System.Runtime.Serialization.EnumMember(Value = @"64x64")] _64x64 = 10, - + + [System.Runtime.Serialization.EnumMember(Value = @"72x72")] _72x72 = 11, - + + [System.Runtime.Serialization.EnumMember(Value = @"80x80")] _80x80 = 12, - + + [System.Runtime.Serialization.EnumMember(Value = @"96x96")] _96x96 = 13, - + + [System.Runtime.Serialization.EnumMember(Value = @"256x256")] _256x256 = 14, - + + } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.3.0 (Newtonsoft.Json v11.0.0.0)")] + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "11.0.0.0 (Newtonsoft.Json v13.0.0.0)")] public enum IconTheme { + [System.Runtime.Serialization.EnumMember(Value = @"default")] Default = 0, - + + [System.Runtime.Serialization.EnumMember(Value = @"light")] Light = 1, - + + [System.Runtime.Serialization.EnumMember(Value = @"dark")] Dark = 2, - + + [System.Runtime.Serialization.EnumMember(Value = @"highContrast")] HighContrast = 3, - + + } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.3.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class PackageDependencies + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "11.0.0.0 (Newtonsoft.Json v13.0.0.0)")] + public partial class PackageDependencies { [Newtonsoft.Json.JsonProperty("PackageIdentifier", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] [System.ComponentModel.DataAnnotations.StringLength(128)] [System.ComponentModel.DataAnnotations.RegularExpression(@"^[^\.\s\\/:\*\?""<>\|\x01-\x1f]{1,32}(\.[^\.\s\\/:\*\?""<>\|\x01-\x1f]{1,32}){1,7}$")] public string PackageIdentifier { get; set; } - + [Newtonsoft.Json.JsonProperty("MinimumVersion", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(128)] [System.ComponentModel.DataAnnotations.RegularExpression(@"^[^\\/:\*\?""<>\|\x01-\x1f]+$")] public string MinimumVersion { get; set; } - - private System.Collections.Generic.IDictionary _additionalProperties = new System.Collections.Generic.Dictionary(); - + + + + private System.Collections.Generic.IDictionary _additionalProperties; + [Newtonsoft.Json.JsonExtensionData] public System.Collections.Generic.IDictionary AdditionalProperties { - get { return _additionalProperties; } + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); } set { _additionalProperties = value; } } - - + } - - /// Represents an installed file. - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.3.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class Files + + /// + /// Represents an installed file. + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "11.0.0.0 (Newtonsoft.Json v13.0.0.0)")] + public partial class Files { - /// The relative path to the installed file. + /// + /// The relative path to the installed file. + /// [Newtonsoft.Json.JsonProperty("RelativeFilePath", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.Required] [System.ComponentModel.DataAnnotations.StringLength(2048, MinimumLength = 1)] public string RelativeFilePath { get; set; } - - /// Optional Sha256 of the installed file. + + /// + /// Optional Sha256 of the installed file. + /// [Newtonsoft.Json.JsonProperty("FileSha256", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.RegularExpression(@"^[A-Fa-f0-9]{64}$")] public string FileSha256 { get; set; } - - /// The optional installed file type. If not specified, the file is treated as other. + + /// + /// The optional installed file type. If not specified, the file is treated as other. + /// [Newtonsoft.Json.JsonProperty("FileType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] public FilesFileType? FileType { get; set; } - - /// Optional parameter for invocable files. + + /// + /// Optional parameter for invocable files. + /// [Newtonsoft.Json.JsonProperty("InvocationParameter", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(2048, MinimumLength = 1)] public string InvocationParameter { get; set; } - - /// Optional display name for invocable files. + + /// + /// Optional display name for invocable files. + /// [Newtonsoft.Json.JsonProperty("DisplayName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(256, MinimumLength = 1)] public string DisplayName { get; set; } - - private System.Collections.Generic.IDictionary _additionalProperties = new System.Collections.Generic.Dictionary(); - + + + + private System.Collections.Generic.IDictionary _additionalProperties; + [Newtonsoft.Json.JsonExtensionData] public System.Collections.Generic.IDictionary AdditionalProperties { - get { return _additionalProperties; } + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); } set { _additionalProperties = value; } } - - + } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.3.0 (Newtonsoft.Json v11.0.0.0)")] + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "11.0.0.0 (Newtonsoft.Json v13.0.0.0)")] public enum Platform { + [System.Runtime.Serialization.EnumMember(Value = @"Windows.Desktop")] Windows_Desktop = 0, - + + [System.Runtime.Serialization.EnumMember(Value = @"Windows.Universal")] Windows_Universal = 1, - + + } - - /// A nested installer file contained inside an archive - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.3.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class NestedInstallerFile + + /// + /// A nested installer file contained inside an archive + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "11.0.0.0 (Newtonsoft.Json v13.0.0.0)")] + public partial class NestedInstallerFile { - /// The relative path to the nested installer file + /// + /// The relative path to the nested installer file + /// [Newtonsoft.Json.JsonProperty("RelativeFilePath", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.Required] [System.ComponentModel.DataAnnotations.StringLength(512, MinimumLength = 1)] public string RelativeFilePath { get; set; } - - /// The command alias to be used for calling the package. Only applies to the nested portable package + + /// + /// The command alias to be used for calling the package. Only applies to the nested portable package + /// [Newtonsoft.Json.JsonProperty("PortableCommandAlias", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(40, MinimumLength = 1)] public string PortableCommandAlias { get; set; } - - private System.Collections.Generic.IDictionary _additionalProperties = new System.Collections.Generic.Dictionary(); - + + + + private System.Collections.Generic.IDictionary _additionalProperties; + [Newtonsoft.Json.JsonExtensionData] public System.Collections.Generic.IDictionary AdditionalProperties { - get { return _additionalProperties; } + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); } set { _additionalProperties = value; } } - - + } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.3.0 (Newtonsoft.Json v11.0.0.0)")] + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "11.0.0.0 (Newtonsoft.Json v13.0.0.0)")] public enum InstallModes { + [System.Runtime.Serialization.EnumMember(Value = @"interactive")] Interactive = 0, - + + [System.Runtime.Serialization.EnumMember(Value = @"silent")] Silent = 1, - + + [System.Runtime.Serialization.EnumMember(Value = @"silentWithProgress")] SilentWithProgress = 2, - + + } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.3.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ExpectedReturnCode + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "11.0.0.0 (Newtonsoft.Json v13.0.0.0)")] + public partial class ExpectedReturnCode { [Newtonsoft.Json.JsonProperty("InstallerReturnCode", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.Range(-2147483648D, 4294967295D)] public long InstallerReturnCode { get; set; } - + [Newtonsoft.Json.JsonProperty("ReturnResponse", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] public ExpectedReturnCodeReturnResponse ReturnResponse { get; set; } - - /// The return response url to provide additional guidance for expected return codes + + /// + /// The return response url to provide additional guidance for expected return codes + /// [Newtonsoft.Json.JsonProperty("ReturnResponseUrl", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(2048)] [System.ComponentModel.DataAnnotations.RegularExpression(@"^([Hh][Tt][Tt][Pp][Ss]?)://.+$")] public string ReturnResponseUrl { get; set; } - - private System.Collections.Generic.IDictionary _additionalProperties = new System.Collections.Generic.Dictionary(); - + + + + private System.Collections.Generic.IDictionary _additionalProperties; + [Newtonsoft.Json.JsonExtensionData] public System.Collections.Generic.IDictionary AdditionalProperties { - get { return _additionalProperties; } + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); } set { _additionalProperties = value; } } - - + } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.3.0 (Newtonsoft.Json v11.0.0.0)")] + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "11.0.0.0 (Newtonsoft.Json v13.0.0.0)")] public enum UnsupportedOSArchitecture { + [System.Runtime.Serialization.EnumMember(Value = @"x86")] X86 = 0, - + + [System.Runtime.Serialization.EnumMember(Value = @"x64")] X64 = 1, - + + [System.Runtime.Serialization.EnumMember(Value = @"arm")] Arm = 2, - + + [System.Runtime.Serialization.EnumMember(Value = @"arm64")] Arm64 = 3, - + + } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.3.0 (Newtonsoft.Json v11.0.0.0)")] + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "11.0.0.0 (Newtonsoft.Json v13.0.0.0)")] public enum UnsupportedArgument { + [System.Runtime.Serialization.EnumMember(Value = @"log")] Log = 0, - + + [System.Runtime.Serialization.EnumMember(Value = @"location")] Location = 1, - + + } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.3.0 (Newtonsoft.Json v11.0.0.0)")] + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "11.0.0.0 (Newtonsoft.Json v13.0.0.0)")] public enum FilesFileType { + [System.Runtime.Serialization.EnumMember(Value = @"launch")] Launch = 0, - + + [System.Runtime.Serialization.EnumMember(Value = @"uninstall")] Uninstall = 1, - + + [System.Runtime.Serialization.EnumMember(Value = @"other")] Other = 2, - + + } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.3.0 (Newtonsoft.Json v11.0.0.0)")] + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "11.0.0.0 (Newtonsoft.Json v13.0.0.0)")] public enum ExpectedReturnCodeReturnResponse { + [System.Runtime.Serialization.EnumMember(Value = @"packageInUse")] PackageInUse = 0, - + + [System.Runtime.Serialization.EnumMember(Value = @"packageInUseByApplication")] PackageInUseByApplication = 1, - + + [System.Runtime.Serialization.EnumMember(Value = @"installInProgress")] InstallInProgress = 2, - + + [System.Runtime.Serialization.EnumMember(Value = @"fileInUse")] FileInUse = 3, - + + [System.Runtime.Serialization.EnumMember(Value = @"missingDependency")] MissingDependency = 4, - + + [System.Runtime.Serialization.EnumMember(Value = @"diskFull")] DiskFull = 5, - + + [System.Runtime.Serialization.EnumMember(Value = @"insufficientMemory")] InsufficientMemory = 6, - + + [System.Runtime.Serialization.EnumMember(Value = @"invalidParameter")] InvalidParameter = 7, - + + [System.Runtime.Serialization.EnumMember(Value = @"noNetwork")] NoNetwork = 8, - + + [System.Runtime.Serialization.EnumMember(Value = @"contactSupport")] ContactSupport = 9, - + + [System.Runtime.Serialization.EnumMember(Value = @"rebootRequiredToFinish")] RebootRequiredToFinish = 10, - + + [System.Runtime.Serialization.EnumMember(Value = @"rebootRequiredForInstall")] RebootRequiredForInstall = 11, - + + [System.Runtime.Serialization.EnumMember(Value = @"rebootInitiated")] RebootInitiated = 12, - + + [System.Runtime.Serialization.EnumMember(Value = @"cancelledByUser")] CancelledByUser = 13, - + + [System.Runtime.Serialization.EnumMember(Value = @"alreadyInstalled")] AlreadyInstalled = 14, - + + [System.Runtime.Serialization.EnumMember(Value = @"downgrade")] Downgrade = 15, - + + [System.Runtime.Serialization.EnumMember(Value = @"blockedByPolicy")] BlockedByPolicy = 16, - + + [System.Runtime.Serialization.EnumMember(Value = @"systemNotSupported")] SystemNotSupported = 17, - + + [System.Runtime.Serialization.EnumMember(Value = @"custom")] Custom = 18, - + + } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.3.0 (Newtonsoft.Json v11.0.0.0)")] + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "11.0.0.0 (Newtonsoft.Json v13.0.0.0)")] internal class DateFormatConverter : Newtonsoft.Json.Converters.IsoDateTimeConverter { public DateFormatConverter() diff --git a/src/WingetCreateCore/Models/VersionManifestModels.cs b/src/WingetCreateCore/Models/VersionManifestModels.cs index a0eecb76..91b3af74 100644 --- a/src/WingetCreateCore/Models/VersionManifestModels.cs +++ b/src/WingetCreateCore/Models/VersionManifestModels.cs @@ -1,58 +1,72 @@ //---------------------- // -// Generated using the NJsonSchema v10.4.3.0 (Newtonsoft.Json v11.0.0.0) (http://NJsonSchema.org) +// Generated using the NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0) (http://NJsonSchema.org) // //---------------------- + namespace Microsoft.WingetCreateCore.Models.Version { #pragma warning disable // Disable all warnings - /// A representation of a multi-file manifest representing an app version in the OWC. v1.6.0 - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.3.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class VersionManifest + /// + /// A representation of a multi-file manifest representing an app version in the OWC. v1.9.0 + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "11.0.0.0 (Newtonsoft.Json v13.0.0.0)")] + public partial class VersionManifest { - /// The package unique identifier + /// + /// The package unique identifier + /// [Newtonsoft.Json.JsonProperty("PackageIdentifier", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] [System.ComponentModel.DataAnnotations.StringLength(128)] [System.ComponentModel.DataAnnotations.RegularExpression(@"^[^\.\s\\/:\*\?""<>\|\x01-\x1f]{1,32}(\.[^\.\s\\/:\*\?""<>\|\x01-\x1f]{1,32}){1,7}$")] public string PackageIdentifier { get; set; } - - /// The package version + + /// + /// The package version + /// [Newtonsoft.Json.JsonProperty("PackageVersion", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] [System.ComponentModel.DataAnnotations.StringLength(128)] [System.ComponentModel.DataAnnotations.RegularExpression(@"^[^\\/:\*\?""<>\|\x01-\x1f]+$")] public string PackageVersion { get; set; } - - /// The default package meta-data locale + + /// + /// The default package meta-data locale + /// [Newtonsoft.Json.JsonProperty("DefaultLocale", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] [System.ComponentModel.DataAnnotations.StringLength(20)] [System.ComponentModel.DataAnnotations.RegularExpression(@"^([a-zA-Z]{2,3}|[iI]-[a-zA-Z]+|[xX]-[a-zA-Z]{1,8})(-[a-zA-Z]{1,8})*$")] public string DefaultLocale { get; set; } = "en-US"; - - /// The manifest type + + /// + /// The manifest type + /// [Newtonsoft.Json.JsonProperty("ManifestType", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] public string ManifestType { get; set; } = "version"; - - /// The manifest syntax version + + /// + /// The manifest syntax version + /// [Newtonsoft.Json.JsonProperty("ManifestVersion", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] [System.ComponentModel.DataAnnotations.RegularExpression(@"^(0|[1-9][0-9]{0,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])(\.(0|[1-9][0-9]{0,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])){2}$")] - public string ManifestVersion { get; set; } = "1.6.0"; - - private System.Collections.Generic.IDictionary _additionalProperties = new System.Collections.Generic.Dictionary(); - + public string ManifestVersion { get; set; } = "1.9.0"; + + + + private System.Collections.Generic.IDictionary _additionalProperties; + [Newtonsoft.Json.JsonExtensionData] public System.Collections.Generic.IDictionary AdditionalProperties { - get { return _additionalProperties; } + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); } set { _additionalProperties = value; } } - - + } } \ No newline at end of file diff --git a/src/WingetCreateCore/WingetCreateCore.csproj b/src/WingetCreateCore/WingetCreateCore.csproj index cd1a2184..f4df191a 100644 --- a/src/WingetCreateCore/WingetCreateCore.csproj +++ b/src/WingetCreateCore/WingetCreateCore.csproj @@ -4,7 +4,7 @@ true true Microsoft.WingetCreateCore - net6.0-windows10.0.22000.0 + net8.0-windows10.0.22000.0 x86;x64 win-x86;win-x64 true @@ -19,7 +19,7 @@ - + @@ -48,11 +48,11 @@ - - - - - + + + + + diff --git a/src/WingetCreateTests/WingetCreateTests/Resources/TestPublisher.DontMoveInstallerFieldsToRoot.yaml b/src/WingetCreateTests/WingetCreateTests/Resources/TestPublisher.DontMoveInstallerFieldsToRoot.yaml index 1864da89..3c2362e0 100644 --- a/src/WingetCreateTests/WingetCreateTests/Resources/TestPublisher.DontMoveInstallerFieldsToRoot.yaml +++ b/src/WingetCreateTests/WingetCreateTests/Resources/TestPublisher.DontMoveInstallerFieldsToRoot.yaml @@ -74,6 +74,9 @@ Installers: FileSha256: 69D84CA8899800A5575CE31798293CD4FEBAB1D734A07C2E51E56A28E0DF8C82 FileType: launch InvocationParameter: "/arg1" + DownloadCommandProhibited: true + RepairBehavior: modify + ArchiveBinariesDependOnPath: true - Architecture: x86 InstallerType: zip InstallerUrl: https://fakedomain.com/WingetCreateTestZipInstaller.zip @@ -141,6 +144,9 @@ Installers: FileSha256: 69D84CA8899800A5575CE31798293CD4FEBAB1D734A07C2E51E56A28E0DF8C82 FileType: launch InvocationParameter: "/arg2" + DownloadCommandProhibited: false + RepairBehavior: installer + ArchiveBinariesDependOnPath: false - Architecture: arm InstallerType: zip InstallerUrl: https://fakedomain.com/WingetCreateTestZipInstaller.zip @@ -208,6 +214,9 @@ Installers: FileSha256: 69D84CA8899800A5575CE31798293CD4FEBAB1D734A07C2E51E56A28E0DF8C82 FileType: launch InvocationParameter: "/arg2" + DownloadCommandProhibited: false + RepairBehavior: modify + ArchiveBinariesDependOnPath: false PackageLocale: en-US ManifestType: singleton -ManifestVersion: 1.4.0 \ No newline at end of file +ManifestVersion: 1.9.0 \ No newline at end of file diff --git a/src/WingetCreateTests/WingetCreateTests/Resources/TestPublisher.FullJsonSingleton1_6.json b/src/WingetCreateTests/WingetCreateTests/Resources/TestPublisher.FullJsonSingleton1_6.json new file mode 100644 index 00000000..e0ba9af8 --- /dev/null +++ b/src/WingetCreateTests/WingetCreateTests/Resources/TestPublisher.FullJsonSingleton1_6.json @@ -0,0 +1,154 @@ +{ + "PackageIdentifier": "TestPublisher.FullJsonSingleton1_5", + "PackageVersion": "0.1.2.3", + "PackageLocale": "en-US", + "DefaultLocale": "en-US", + "Publisher": "TestPublisher", + "PublisherUrl": "https://fakeTestUrl.com", + "PublisherSupportUrl": "https://fakeTestUrl.com", + "PrivacyUrl": "https://fakeTestUrl.com", + "Author": "fakeAuthor", + "PackageName": "Full Singleton 1.5 Test", + "PackageUrl": "https://fakeTestUrl.com", + "License": "MIT", + "LicenseUrl": "https://fakeTestUrl.com", + "Copyright": "fakeCopyright", + "CopyrightUrl": "https://fakeTestUrl.com", + "ShortDescription": "A manifest used to verify that all fields from a full 1.1 singleton manifest can be deserialized and updated.", + "Description": "A manifest used to verify that all fields from a full 1.1 singleton manifest can be deseri", + "Moniker": "testMoniker", + "Tags": [ + "testSingleton" + ], + "Agreements": [ + { + "AgreementLabel": "fakeAgreementLabel", + "AgreementUrl": "https://fakeTestUrl.com", + "Agreement": "fakeAgreementContent" + } + ], + "ReleaseNotes": "fakeReleaseNotes", + "ReleaseNotesUrl": "https://fakeTestUrl.com", + "PurchaseUrl": "https://fakeTestUrl.com", + "InstallationNotes": "fakeInstallationNotes", + "Documentations": [ + { + "DocumentLabel": "fakeDocumentLabel" + }, + { + "DocumentUrl": "fakeDocumentUrl" + } + ], + "Icons": [ + { + "IconUrl": "https://fakeTestIcon", + "IconFileType": "png", + "IconResolution": "32x32", + "IconTheme": "light", + "IconSha256": "69D84CA8899800A5575CE31798293CD4FEBAB1D734A07C2E51E56A28E0DF8321" + } + ], + "Installers": [ + { + "MinimumOSVersion": "10.0.0.0", + "Architecture": "x64", + "InstallerUrl": "https://fakedomain.com/WingetCreateTestExeInstaller.exe", + "InstallerType": "exe", + "InstallerSha256": "A7803233EEDB6A4B59B3024CCF9292A6FFFB94507DC998AA67C5B745D197A5DC", + "ProductCode": "FakeProductCode", + "PackageFamilyName": "FakePackageFamilyName", + "InstallModes": [ + "silent" + ], + "InstallerSwitches": { + "Silent": "/s", + "Upgrade": "/u" + }, + "InstallerSuccessCodes": [ + 1 + ], + "ExpectedReturnCodes": [ + { + "InstallerReturnCode": 123, + "ReturnResponse": "alreadyInstalled", + "ReturnResponseUrl": "https://fakeTestUrl.com" + } + ], + "UpgradeBehavior": "install", + "Commands": [ + "fakeCommand" + ], + "Protocols": [ + "fakeProtocol" + ], + "FileExtensions": [ + ".exe" + ], + "Dependencies": { + "WindowsFeatures": [ + "fakeValue" + ], + "WindowsLibraries": [ + "fakeValue" + ], + "PackageDependencies": [ + { + "MinimumVersion": "10.0.0.0" + } + ], + "ExternalDependencies": [ + "fakeValue" + ] + }, + "Markets": { + "AllowedMarkets": [ + "fakeAllowedMarket" + ], + "ExcludedMarkets": [ + "fakeExcludedMarket" + ] + }, + "InstallerAbortsTerminal": true, + "InstallLocationRequired": true, + "RequireExplicitUpgrade": true, + "UnsupportedOSArchitectures": [ + "arm64" + ], + "AppsAndFeaturesEntries": [ + { + "DisplayName": "testName", + "Publisher": "testPublisher", + "DisplayVersion": "testVersion", + "UpgradeCode": "fakeProductCode" + } + ], + "ElevationRequirement": "elevationRequired", + "ReleaseDate": "2022-01-01", + "DisplayInstallWarnings": true, + "UnsupportedArguments": [ + "log", + "location" + ], + "NestedInstallerFiles": [ + { + "RelativeFilePath": "RelativeFilePath", + "PortableCommandAlias": "PortableCommandAlias" + } + ], + "InstallationMetadata": { + "DefaultInstallLocation": "%ProgramFiles%\\TestApp", + "Files": [ + { + "RelativeFilePath": "main.exe", + "FileSha256": "69D84CA8899800A5575CE31798293CD4FEBAB1D734A07C2E51E56A28E0DF8C82", + "FileType": "launch", + "InvocationParameter": "/arg" + } + ] + }, + "DownloadCommandProhibited": true + } + ], + "ManifestType": "singleton", + "ManifestVersion": "1.6.0" +} \ No newline at end of file diff --git a/src/WingetCreateTests/WingetCreateTests/Resources/TestPublisher.FullJsonSingleton1_7.json b/src/WingetCreateTests/WingetCreateTests/Resources/TestPublisher.FullJsonSingleton1_7.json new file mode 100644 index 00000000..7e5cdd63 --- /dev/null +++ b/src/WingetCreateTests/WingetCreateTests/Resources/TestPublisher.FullJsonSingleton1_7.json @@ -0,0 +1,156 @@ +{ + "PackageIdentifier": "TestPublisher.FullJsonSingleton1_5", + "PackageVersion": "0.1.2.3", + "PackageLocale": "en-US", + "DefaultLocale": "en-US", + "Publisher": "TestPublisher", + "PublisherUrl": "https://fakeTestUrl.com", + "PublisherSupportUrl": "https://fakeTestUrl.com", + "PrivacyUrl": "https://fakeTestUrl.com", + "Author": "fakeAuthor", + "PackageName": "Full Singleton 1.5 Test", + "PackageUrl": "https://fakeTestUrl.com", + "License": "MIT", + "LicenseUrl": "https://fakeTestUrl.com", + "Copyright": "fakeCopyright", + "CopyrightUrl": "https://fakeTestUrl.com", + "ShortDescription": "A manifest used to verify that all fields from a full 1.1 singleton manifest can be deserialized and updated.", + "Description": "A manifest used to verify that all fields from a full 1.1 singleton manifest can be deseri", + "Moniker": "testMoniker", + "Tags": [ + "testSingleton" + ], + "Agreements": [ + { + "AgreementLabel": "fakeAgreementLabel", + "AgreementUrl": "https://fakeTestUrl.com", + "Agreement": "fakeAgreementContent" + } + ], + "ReleaseNotes": "fakeReleaseNotes", + "ReleaseNotesUrl": "https://fakeTestUrl.com", + "PurchaseUrl": "https://fakeTestUrl.com", + "InstallationNotes": "fakeInstallationNotes", + "Documentations": [ + { + "DocumentLabel": "fakeDocumentLabel" + }, + { + "DocumentUrl": "fakeDocumentUrl" + } + ], + "Icons": [ + { + "IconUrl": "https://fakeTestIcon", + "IconFileType": "png", + "IconResolution": "32x32", + "IconTheme": "light", + "IconSha256": "69D84CA8899800A5575CE31798293CD4FEBAB1D734A07C2E51E56A28E0DF8321" + } + ], + "Installers": [ + { + "MinimumOSVersion": "10.0.0.0", + "Architecture": "x64", + "InstallerUrl": "https://fakedomain.com/WingetCreateTestExeInstaller.exe", + "InstallerType": "exe", + "InstallerSha256": "A7803233EEDB6A4B59B3024CCF9292A6FFFB94507DC998AA67C5B745D197A5DC", + "ProductCode": "FakeProductCode", + "PackageFamilyName": "FakePackageFamilyName", + "InstallModes": [ + "silent" + ], + "InstallerSwitches": { + "Silent": "/s", + "Upgrade": "/u", + "Repair": "/r" + }, + "InstallerSuccessCodes": [ + 1 + ], + "ExpectedReturnCodes": [ + { + "InstallerReturnCode": 123, + "ReturnResponse": "alreadyInstalled", + "ReturnResponseUrl": "https://fakeTestUrl.com" + } + ], + "UpgradeBehavior": "install", + "Commands": [ + "fakeCommand" + ], + "Protocols": [ + "fakeProtocol" + ], + "FileExtensions": [ + ".exe" + ], + "Dependencies": { + "WindowsFeatures": [ + "fakeValue" + ], + "WindowsLibraries": [ + "fakeValue" + ], + "PackageDependencies": [ + { + "MinimumVersion": "10.0.0.0" + } + ], + "ExternalDependencies": [ + "fakeValue" + ] + }, + "Markets": { + "AllowedMarkets": [ + "fakeAllowedMarket" + ], + "ExcludedMarkets": [ + "fakeExcludedMarket" + ] + }, + "InstallerAbortsTerminal": true, + "InstallLocationRequired": true, + "RequireExplicitUpgrade": true, + "UnsupportedOSArchitectures": [ + "arm64" + ], + "AppsAndFeaturesEntries": [ + { + "DisplayName": "testName", + "Publisher": "testPublisher", + "DisplayVersion": "testVersion", + "UpgradeCode": "fakeProductCode" + } + ], + "ElevationRequirement": "elevationRequired", + "ReleaseDate": "2022-01-01", + "DisplayInstallWarnings": true, + "UnsupportedArguments": [ + "log", + "location" + ], + "NestedInstallerFiles": [ + { + "RelativeFilePath": "RelativeFilePath", + "PortableCommandAlias": "PortableCommandAlias" + } + ], + "InstallationMetadata": { + "DefaultInstallLocation": "%ProgramFiles%\\TestApp", + "Files": [ + { + "RelativeFilePath": "main.exe", + "FileSha256": "69D84CA8899800A5575CE31798293CD4FEBAB1D734A07C2E51E56A28E0DF8C82", + "FileType": "launch", + "InvocationParameter": "/arg" + } + ] + }, + "DownloadCommandProhibited": true, + "RepairBehavior": "modify" + } + ], + "ManifestType": "singleton", + "ManifestVersion": "1.7.0" +} \ No newline at end of file diff --git a/src/WingetCreateTests/WingetCreateTests/Resources/TestPublisher.FullJsonSingleton1_9.json b/src/WingetCreateTests/WingetCreateTests/Resources/TestPublisher.FullJsonSingleton1_9.json new file mode 100644 index 00000000..c47e4980 --- /dev/null +++ b/src/WingetCreateTests/WingetCreateTests/Resources/TestPublisher.FullJsonSingleton1_9.json @@ -0,0 +1,157 @@ +{ + "PackageIdentifier": "TestPublisher.FullJsonSingleton1_5", + "PackageVersion": "0.1.2.3", + "PackageLocale": "en-US", + "DefaultLocale": "en-US", + "Publisher": "TestPublisher", + "PublisherUrl": "https://fakeTestUrl.com", + "PublisherSupportUrl": "https://fakeTestUrl.com", + "PrivacyUrl": "https://fakeTestUrl.com", + "Author": "fakeAuthor", + "PackageName": "Full Singleton 1.5 Test", + "PackageUrl": "https://fakeTestUrl.com", + "License": "MIT", + "LicenseUrl": "https://fakeTestUrl.com", + "Copyright": "fakeCopyright", + "CopyrightUrl": "https://fakeTestUrl.com", + "ShortDescription": "A manifest used to verify that all fields from a full 1.1 singleton manifest can be deserialized and updated.", + "Description": "A manifest used to verify that all fields from a full 1.1 singleton manifest can be deseri", + "Moniker": "testMoniker", + "Tags": [ + "testSingleton" + ], + "Agreements": [ + { + "AgreementLabel": "fakeAgreementLabel", + "AgreementUrl": "https://fakeTestUrl.com", + "Agreement": "fakeAgreementContent" + } + ], + "ReleaseNotes": "fakeReleaseNotes", + "ReleaseNotesUrl": "https://fakeTestUrl.com", + "PurchaseUrl": "https://fakeTestUrl.com", + "InstallationNotes": "fakeInstallationNotes", + "Documentations": [ + { + "DocumentLabel": "fakeDocumentLabel" + }, + { + "DocumentUrl": "fakeDocumentUrl" + } + ], + "Icons": [ + { + "IconUrl": "https://fakeTestIcon", + "IconFileType": "png", + "IconResolution": "32x32", + "IconTheme": "light", + "IconSha256": "69D84CA8899800A5575CE31798293CD4FEBAB1D734A07C2E51E56A28E0DF8321" + } + ], + "Installers": [ + { + "MinimumOSVersion": "10.0.0.0", + "Architecture": "x64", + "InstallerUrl": "https://fakedomain.com/WingetCreateTestExeInstaller.exe", + "InstallerType": "exe", + "InstallerSha256": "A7803233EEDB6A4B59B3024CCF9292A6FFFB94507DC998AA67C5B745D197A5DC", + "ProductCode": "FakeProductCode", + "PackageFamilyName": "FakePackageFamilyName", + "InstallModes": [ + "silent" + ], + "InstallerSwitches": { + "Silent": "/s", + "Upgrade": "/u", + "Repair": "/r" + }, + "InstallerSuccessCodes": [ + 1 + ], + "ExpectedReturnCodes": [ + { + "InstallerReturnCode": 123, + "ReturnResponse": "alreadyInstalled", + "ReturnResponseUrl": "https://fakeTestUrl.com" + } + ], + "UpgradeBehavior": "install", + "Commands": [ + "fakeCommand" + ], + "Protocols": [ + "fakeProtocol" + ], + "FileExtensions": [ + ".exe" + ], + "Dependencies": { + "WindowsFeatures": [ + "fakeValue" + ], + "WindowsLibraries": [ + "fakeValue" + ], + "PackageDependencies": [ + { + "MinimumVersion": "10.0.0.0" + } + ], + "ExternalDependencies": [ + "fakeValue" + ] + }, + "Markets": { + "AllowedMarkets": [ + "fakeAllowedMarket" + ], + "ExcludedMarkets": [ + "fakeExcludedMarket" + ] + }, + "InstallerAbortsTerminal": true, + "InstallLocationRequired": true, + "RequireExplicitUpgrade": true, + "UnsupportedOSArchitectures": [ + "arm64" + ], + "AppsAndFeaturesEntries": [ + { + "DisplayName": "testName", + "Publisher": "testPublisher", + "DisplayVersion": "testVersion", + "UpgradeCode": "fakeProductCode" + } + ], + "ElevationRequirement": "elevationRequired", + "ReleaseDate": "2022-01-01", + "DisplayInstallWarnings": true, + "UnsupportedArguments": [ + "log", + "location" + ], + "NestedInstallerFiles": [ + { + "RelativeFilePath": "RelativeFilePath", + "PortableCommandAlias": "PortableCommandAlias" + } + ], + "InstallationMetadata": { + "DefaultInstallLocation": "%ProgramFiles%\\TestApp", + "Files": [ + { + "RelativeFilePath": "main.exe", + "FileSha256": "69D84CA8899800A5575CE31798293CD4FEBAB1D734A07C2E51E56A28E0DF8C82", + "FileType": "launch", + "InvocationParameter": "/arg" + } + ] + }, + "DownloadCommandProhibited": true, + "RepairBehavior": "modify", + "ArchiveBinariesDependOnPath": true + } + ], + "ManifestType": "singleton", + "ManifestVersion": "1.9.0" +} \ No newline at end of file diff --git a/src/WingetCreateTests/WingetCreateTests/Resources/TestPublisher.FullYamlSingleton1_6.yaml b/src/WingetCreateTests/WingetCreateTests/Resources/TestPublisher.FullYamlSingleton1_6.yaml new file mode 100644 index 00000000..9250966d --- /dev/null +++ b/src/WingetCreateTests/WingetCreateTests/Resources/TestPublisher.FullYamlSingleton1_6.yaml @@ -0,0 +1,106 @@ +PackageIdentifier: TestPublisher.FullYamlSingleton1_5 +PackageVersion: 0.1.2.3 +PackageLocale: en-US +DefaultLocale: en-US +Publisher: TestPublisher +PublisherUrl: https://fakeTestUrl.com +PublisherSupportUrl: https://fakeTestUrl.com +PrivacyUrl: https://fakeTestUrl.com +Author: fakeAuthor +PackageName: Full Singleton 1.5 Test +PackageUrl: https://fakeTestUrl.com +License: MIT +LicenseUrl: https://fakeTestUrl.com +Copyright: fakeCopyright +CopyrightUrl: https://fakeTestUrl.com +ShortDescription: A manifest used to verify that all fields from a full 1.1 singleton manifest can be deserialized and updated. +Description: A manifest used to verify that all fields from a full 1.1 singleton manifest can be deseri +Moniker: testMoniker +Tags: +- testSingleton +Agreements: +- AgreementLabel: fakeAgreementLabel + AgreementUrl: https://fakeTestUrl.com + Agreement: fakeAgreementContent +ReleaseNotes: fakeReleaseNotes +ReleaseNotesUrl: https://fakeTestUrl.com +PurchaseUrl: https://fakeTestUrl.com +InstallationNotes: fakeInstallationNotes +Documentations: +- DocumentLabel: fakeDocumentLabel +- DocumentUrl: fakeDocumentUrl +Icons: + - IconUrl: https://fakeTestIcon + IconFileType: png + IconResolution: 32x32 + IconTheme: light + IconSha256: 69D84CA8899800A5575CE31798293CD4FEBAB1D734A07C2E51E56A28E0DF8321 +Installers: +- MinimumOSVersion: 10.0.0.0 + Architecture: x64 + InstallerUrl: https://fakedomain.com/WingetCreateTestExeInstaller.exe + InstallerType: exe + InstallerSha256: A7803233EEDB6A4B59B3024CCF9292A6FFFB94507DC998AA67C5B745D197A5DC + ProductCode: FakeProductCode + PackageFamilyName: FakePackageFamilyName + InstallModes: + - silent + InstallerSwitches: + Silent: /s + Upgrade: /u + InstallerSuccessCodes: + - 1 + ExpectedReturnCodes: + - InstallerReturnCode: 123 + ReturnResponse: alreadyInstalled + ReturnResponseUrl: https://fakeTestUrl.com + UpgradeBehavior: install + Commands: + - fakeCommand + Protocols: + - fakeProtocol + FileExtensions: + - .exe + Dependencies: + WindowsFeatures: + - fakeValue + WindowsLibraries: + - fakeValue + PackageDependencies: + - MinimumVersion: 10.0.0.0 + ExternalDependencies: + - fakeValue + Markets: + AllowedMarkets: + - fakeAllowedMarket + ExcludedMarkets: + - fakeExcludedMarket + InstallerAbortsTerminal: true + InstallLocationRequired: true + RequireExplicitUpgrade: true + UnsupportedOSArchitectures: + - arm64 + AppsAndFeaturesEntries: + - DisplayName: testName + Publisher: testPublisher + DisplayVersion: testVersion + UpgradeCode: fakeProductCode + ElevationRequirement: elevationRequired + ReleaseDate: 1-1-2022 + DisplayInstallWarnings: true + UnsupportedArguments: + - log + - location + NestedInstallerFiles: + - RelativeFilePath: RelativeFilePath + PortableCommandAlias: PortableCommandAlias + InstallationMetadata: + DefaultInstallLocation: "%ProgramFiles%\\TestApp" + Files: + - RelativeFilePath: "main.exe" + FileSha256: 69D84CA8899800A5575CE31798293CD4FEBAB1D734A07C2E51E56A28E0DF8C82 + FileType: launch + InvocationParameter: "/arg" + DownloadCommandProhibited: true +ManifestType: singleton +ManifestVersion: 1.6.0 \ No newline at end of file diff --git a/src/WingetCreateTests/WingetCreateTests/Resources/TestPublisher.FullYamlSingleton1_7.yaml b/src/WingetCreateTests/WingetCreateTests/Resources/TestPublisher.FullYamlSingleton1_7.yaml new file mode 100644 index 00000000..b4c4e845 --- /dev/null +++ b/src/WingetCreateTests/WingetCreateTests/Resources/TestPublisher.FullYamlSingleton1_7.yaml @@ -0,0 +1,108 @@ +PackageIdentifier: TestPublisher.FullYamlSingleton1_5 +PackageVersion: 0.1.2.3 +PackageLocale: en-US +DefaultLocale: en-US +Publisher: TestPublisher +PublisherUrl: https://fakeTestUrl.com +PublisherSupportUrl: https://fakeTestUrl.com +PrivacyUrl: https://fakeTestUrl.com +Author: fakeAuthor +PackageName: Full Singleton 1.5 Test +PackageUrl: https://fakeTestUrl.com +License: MIT +LicenseUrl: https://fakeTestUrl.com +Copyright: fakeCopyright +CopyrightUrl: https://fakeTestUrl.com +ShortDescription: A manifest used to verify that all fields from a full 1.1 singleton manifest can be deserialized and updated. +Description: A manifest used to verify that all fields from a full 1.1 singleton manifest can be deseri +Moniker: testMoniker +Tags: +- testSingleton +Agreements: +- AgreementLabel: fakeAgreementLabel + AgreementUrl: https://fakeTestUrl.com + Agreement: fakeAgreementContent +ReleaseNotes: fakeReleaseNotes +ReleaseNotesUrl: https://fakeTestUrl.com +PurchaseUrl: https://fakeTestUrl.com +InstallationNotes: fakeInstallationNotes +Documentations: +- DocumentLabel: fakeDocumentLabel +- DocumentUrl: fakeDocumentUrl +Icons: + - IconUrl: https://fakeTestIcon + IconFileType: png + IconResolution: 32x32 + IconTheme: light + IconSha256: 69D84CA8899800A5575CE31798293CD4FEBAB1D734A07C2E51E56A28E0DF8321 +Installers: +- MinimumOSVersion: 10.0.0.0 + Architecture: x64 + InstallerUrl: https://fakedomain.com/WingetCreateTestExeInstaller.exe + InstallerType: exe + InstallerSha256: A7803233EEDB6A4B59B3024CCF9292A6FFFB94507DC998AA67C5B745D197A5DC + ProductCode: FakeProductCode + PackageFamilyName: FakePackageFamilyName + InstallModes: + - silent + InstallerSwitches: + Silent: /s + Upgrade: /u + Repair: /r + InstallerSuccessCodes: + - 1 + ExpectedReturnCodes: + - InstallerReturnCode: 123 + ReturnResponse: alreadyInstalled + ReturnResponseUrl: https://fakeTestUrl.com + UpgradeBehavior: install + Commands: + - fakeCommand + Protocols: + - fakeProtocol + FileExtensions: + - .exe + Dependencies: + WindowsFeatures: + - fakeValue + WindowsLibraries: + - fakeValue + PackageDependencies: + - MinimumVersion: 10.0.0.0 + ExternalDependencies: + - fakeValue + Markets: + AllowedMarkets: + - fakeAllowedMarket + ExcludedMarkets: + - fakeExcludedMarket + InstallerAbortsTerminal: true + InstallLocationRequired: true + RequireExplicitUpgrade: true + UnsupportedOSArchitectures: + - arm64 + AppsAndFeaturesEntries: + - DisplayName: testName + Publisher: testPublisher + DisplayVersion: testVersion + UpgradeCode: fakeProductCode + ElevationRequirement: elevationRequired + ReleaseDate: 1-1-2022 + DisplayInstallWarnings: true + UnsupportedArguments: + - log + - location + NestedInstallerFiles: + - RelativeFilePath: RelativeFilePath + PortableCommandAlias: PortableCommandAlias + InstallationMetadata: + DefaultInstallLocation: "%ProgramFiles%\\TestApp" + Files: + - RelativeFilePath: "main.exe" + FileSha256: 69D84CA8899800A5575CE31798293CD4FEBAB1D734A07C2E51E56A28E0DF8C82 + FileType: launch + InvocationParameter: "/arg" + DownloadCommandProhibited: true + RepairBehavior: modify +ManifestType: singleton +ManifestVersion: 1.7.0 \ No newline at end of file diff --git a/src/WingetCreateTests/WingetCreateTests/Resources/TestPublisher.FullYamlSingleton1_9.yaml b/src/WingetCreateTests/WingetCreateTests/Resources/TestPublisher.FullYamlSingleton1_9.yaml new file mode 100644 index 00000000..c85c8d18 --- /dev/null +++ b/src/WingetCreateTests/WingetCreateTests/Resources/TestPublisher.FullYamlSingleton1_9.yaml @@ -0,0 +1,109 @@ +PackageIdentifier: TestPublisher.FullYamlSingleton1_5 +PackageVersion: 0.1.2.3 +PackageLocale: en-US +DefaultLocale: en-US +Publisher: TestPublisher +PublisherUrl: https://fakeTestUrl.com +PublisherSupportUrl: https://fakeTestUrl.com +PrivacyUrl: https://fakeTestUrl.com +Author: fakeAuthor +PackageName: Full Singleton 1.5 Test +PackageUrl: https://fakeTestUrl.com +License: MIT +LicenseUrl: https://fakeTestUrl.com +Copyright: fakeCopyright +CopyrightUrl: https://fakeTestUrl.com +ShortDescription: A manifest used to verify that all fields from a full 1.1 singleton manifest can be deserialized and updated. +Description: A manifest used to verify that all fields from a full 1.1 singleton manifest can be deseri +Moniker: testMoniker +Tags: +- testSingleton +Agreements: +- AgreementLabel: fakeAgreementLabel + AgreementUrl: https://fakeTestUrl.com + Agreement: fakeAgreementContent +ReleaseNotes: fakeReleaseNotes +ReleaseNotesUrl: https://fakeTestUrl.com +PurchaseUrl: https://fakeTestUrl.com +InstallationNotes: fakeInstallationNotes +Documentations: +- DocumentLabel: fakeDocumentLabel +- DocumentUrl: fakeDocumentUrl +Icons: + - IconUrl: https://fakeTestIcon + IconFileType: png + IconResolution: 32x32 + IconTheme: light + IconSha256: 69D84CA8899800A5575CE31798293CD4FEBAB1D734A07C2E51E56A28E0DF8321 +Installers: +- MinimumOSVersion: 10.0.0.0 + Architecture: x64 + InstallerUrl: https://fakedomain.com/WingetCreateTestExeInstaller.exe + InstallerType: exe + InstallerSha256: A7803233EEDB6A4B59B3024CCF9292A6FFFB94507DC998AA67C5B745D197A5DC + ProductCode: FakeProductCode + PackageFamilyName: FakePackageFamilyName + InstallModes: + - silent + InstallerSwitches: + Silent: /s + Upgrade: /u + Repair: /r + InstallerSuccessCodes: + - 1 + ExpectedReturnCodes: + - InstallerReturnCode: 123 + ReturnResponse: alreadyInstalled + ReturnResponseUrl: https://fakeTestUrl.com + UpgradeBehavior: install + Commands: + - fakeCommand + Protocols: + - fakeProtocol + FileExtensions: + - .exe + Dependencies: + WindowsFeatures: + - fakeValue + WindowsLibraries: + - fakeValue + PackageDependencies: + - MinimumVersion: 10.0.0.0 + ExternalDependencies: + - fakeValue + Markets: + AllowedMarkets: + - fakeAllowedMarket + ExcludedMarkets: + - fakeExcludedMarket + InstallerAbortsTerminal: true + InstallLocationRequired: true + RequireExplicitUpgrade: true + UnsupportedOSArchitectures: + - arm64 + AppsAndFeaturesEntries: + - DisplayName: testName + Publisher: testPublisher + DisplayVersion: testVersion + UpgradeCode: fakeProductCode + ElevationRequirement: elevationRequired + ReleaseDate: 1-1-2022 + DisplayInstallWarnings: true + UnsupportedArguments: + - log + - location + NestedInstallerFiles: + - RelativeFilePath: RelativeFilePath + PortableCommandAlias: PortableCommandAlias + InstallationMetadata: + DefaultInstallLocation: "%ProgramFiles%\\TestApp" + Files: + - RelativeFilePath: "main.exe" + FileSha256: 69D84CA8899800A5575CE31798293CD4FEBAB1D734A07C2E51E56A28E0DF8C82 + FileType: launch + InvocationParameter: "/arg" + DownloadCommandProhibited: true + RepairBehavior: modify + ArchiveBinariesDependOnPath: true +ManifestType: singleton +ManifestVersion: 1.9.0 \ No newline at end of file diff --git a/src/WingetCreateTests/WingetCreateTests/Resources/TestPublisher.MoveInstallerFieldsToRoot.yaml b/src/WingetCreateTests/WingetCreateTests/Resources/TestPublisher.MoveInstallerFieldsToRoot.yaml index c84e8c56..fc9586f4 100644 --- a/src/WingetCreateTests/WingetCreateTests/Resources/TestPublisher.MoveInstallerFieldsToRoot.yaml +++ b/src/WingetCreateTests/WingetCreateTests/Resources/TestPublisher.MoveInstallerFieldsToRoot.yaml @@ -73,6 +73,9 @@ Installers: FileSha256: 69D84CA8899800A5575CE31798293CD4FEBAB1D734A07C2E51E56A28E0DF8C82 FileType: launch InvocationParameter: "/arg" + DownloadCommandProhibited: true + RepairBehavior: modify + ArchiveBinariesDependOnPath: true - Architecture: x86 InstallerType: zip InstallerUrl: https://fakedomain.com/WingetCreateTestZipInstaller.zip @@ -140,6 +143,9 @@ Installers: FileSha256: 69D84CA8899800A5575CE31798293CD4FEBAB1D734A07C2E51E56A28E0DF8C82 FileType: launch InvocationParameter: "/arg" + DownloadCommandProhibited: true + RepairBehavior: modify + ArchiveBinariesDependOnPath: true - Architecture: arm InstallerType: zip InstallerUrl: https://fakedomain.com/WingetCreateTestZipInstaller.zip @@ -157,6 +163,7 @@ Installers: InstallerSwitches: Silent: /silent SilentWithProgress: /silentwithprogress + Repair: /repair Dependencies: PackageDependencies: - PackageIdentifier: TestPackageDependency @@ -207,6 +214,9 @@ Installers: FileSha256: 69D84CA8899800A5575CE31798293CD4FEBAB1D734A07C2E51E56A28E0DF8C82 FileType: launch InvocationParameter: "/arg" + DownloadCommandProhibited: true + RepairBehavior: modify + ArchiveBinariesDependOnPath: true PackageLocale: en-US ManifestType: singleton -ManifestVersion: 1.4.0 \ No newline at end of file +ManifestVersion: 1.9.0 \ No newline at end of file diff --git a/src/WingetCreateTests/WingetCreateTests/UnitTests/UpdateCommandTests.cs b/src/WingetCreateTests/WingetCreateTests/UnitTests/UpdateCommandTests.cs index 5a0d092f..2e7d1924 100644 --- a/src/WingetCreateTests/WingetCreateTests/UnitTests/UpdateCommandTests.cs +++ b/src/WingetCreateTests/WingetCreateTests/UnitTests/UpdateCommandTests.cs @@ -921,6 +921,45 @@ public async Task UpdateFullYamlSingletonVersion1_5() ClassicAssert.IsNotNull(updatedManifests, "Command should have succeeded"); } + /// + /// Ensures that all fields from the YAML Singleton v1.6 manifest can be deserialized and updated correctly. + /// + /// A representing the result of the asynchronous operation. + [Test] + public async Task UpdateFullYamlSingletonVersion1_6() + { + TestUtils.InitializeMockDownloads(TestConstants.TestExeInstaller); + (UpdateCommand command, var initialManifestContent) = GetUpdateCommandAndManifestData("TestPublisher.FullYamlSingleton1_6", null, this.tempPath, null); + var updatedManifests = await RunUpdateCommand(command, initialManifestContent); + ClassicAssert.IsNotNull(updatedManifests, "Command should have succeeded"); + } + + /// + /// Ensures that all fields from the YAML Singleton v1.7 manifest can be deserialized and updated correctly. + /// + /// A representing the result of the asynchronous operation. + [Test] + public async Task UpdateFullYamlSingletonVersion1_7() + { + TestUtils.InitializeMockDownloads(TestConstants.TestExeInstaller); + (UpdateCommand command, var initialManifestContent) = GetUpdateCommandAndManifestData("TestPublisher.FullYamlSingleton1_7", null, this.tempPath, null); + var updatedManifests = await RunUpdateCommand(command, initialManifestContent); + ClassicAssert.IsNotNull(updatedManifests, "Command should have succeeded"); + } + + /// + /// Ensures that all fields from the YAML Singleton v1.9 manifest can be deserialized and updated correctly. + /// + /// A representing the result of the asynchronous operation. + [Test] + public async Task UpdateFullYamlSingletonVersion1_9() + { + TestUtils.InitializeMockDownloads(TestConstants.TestExeInstaller); + (UpdateCommand command, var initialManifestContent) = GetUpdateCommandAndManifestData("TestPublisher.FullYamlSingleton1_9", null, this.tempPath, null); + var updatedManifests = await RunUpdateCommand(command, initialManifestContent); + ClassicAssert.IsNotNull(updatedManifests, "Command should have succeeded"); + } + /// /// Ensures that all fields from the JSON Singleton v1.1 manifest can be deserialized and updated correctly. /// @@ -973,6 +1012,45 @@ public async Task UpdateFullJsonSingletonVersion1_5() ClassicAssert.IsNotNull(updatedManifests, "Command should have succeeded"); } + /// + /// Ensures that all fields from the Singleton JSON v1.6 manifest can be deserialized and updated correctly. + /// + /// A representing the result of the asynchronous operation. + [Test] + public async Task UpdateFullJsonSingletonVersion1_6() + { + TestUtils.InitializeMockDownloads(TestConstants.TestExeInstaller); + (UpdateCommand command, var initialManifestContent) = GetUpdateCommandAndManifestData("TestPublisher.FullJsonSingleton1_6", null, this.tempPath, null, manifestFormat: ManifestFormat.Json); + var updatedManifests = await RunUpdateCommand(command, initialManifestContent); + ClassicAssert.IsNotNull(updatedManifests, "Command should have succeeded"); + } + + /// + /// Ensures that all fields from the Singleton JSON v1.7 manifest can be deserialized and updated correctly. + /// + /// A representing the result of the asynchronous operation. + [Test] + public async Task UpdateFullJsonSingletonVersion1_7() + { + TestUtils.InitializeMockDownloads(TestConstants.TestExeInstaller); + (UpdateCommand command, var initialManifestContent) = GetUpdateCommandAndManifestData("TestPublisher.FullJsonSingleton1_7", null, this.tempPath, null, manifestFormat: ManifestFormat.Json); + var updatedManifests = await RunUpdateCommand(command, initialManifestContent); + ClassicAssert.IsNotNull(updatedManifests, "Command should have succeeded"); + } + + /// + /// Ensures that all fields from the Singleton JSON v1.9 manifest can be deserialized and updated correctly. + /// + /// A representing the result of the asynchronous operation. + [Test] + public async Task UpdateFullJsonSingletonVersion1_9() + { + TestUtils.InitializeMockDownloads(TestConstants.TestExeInstaller); + (UpdateCommand command, var initialManifestContent) = GetUpdateCommandAndManifestData("TestPublisher.FullJsonSingleton1_9", null, this.tempPath, null, manifestFormat: ManifestFormat.Json); + var updatedManifests = await RunUpdateCommand(command, initialManifestContent); + ClassicAssert.IsNotNull(updatedManifests, "Command should have succeeded"); + } + /// /// Ensures that version specific fields are reset after an update when using YAML manifests. /// @@ -1323,6 +1401,10 @@ public async Task MoveInstallerFieldsToRoot() ClassicAssert.IsNotNull(updatedInstallerManifest.InstallerSuccessCodes, "InstallerSuccessCodes at the root level should not be null"); ClassicAssert.IsNotNull(updatedInstallerManifest.UnsupportedArguments, "UnsupportedArguments at the root level should not be null"); ClassicAssert.IsNotNull(updatedInstallerManifest.InstallationMetadata, "InstallationMetadata at the root level should not be null"); + ClassicAssert.IsTrue(updatedInstallerManifest.DownloadCommandProhibited == true, "DownloadCommandProhibited at the root level should be true"); + ClassicAssert.IsNotNull(updatedInstallerManifest.RepairBehavior, "RepairBehavior at the root level should not be null"); + ClassicAssert.IsTrue(updatedInstallerManifest.ArchiveBinariesDependOnPath == true, "ArchiveBinariesDependOnPath at the root level should be true"); + foreach (var installer in updatedInstallerManifest.Installers) { ClassicAssert.IsNull(installer.InstallerType, "InstallerType at the installer level should be null"); @@ -1352,6 +1434,9 @@ public async Task MoveInstallerFieldsToRoot() ClassicAssert.IsNull(installer.InstallerSuccessCodes, "InstallerSuccessCodes at the installer level should be null"); ClassicAssert.IsNull(installer.UnsupportedArguments, "UnsupportedArguments at the installer level should be null"); ClassicAssert.IsNull(installer.InstallationMetadata, "InstallationMetadata at the installer level should be null"); + ClassicAssert.IsNull(installer.DownloadCommandProhibited, "DownloadCommandProhibited at the installer level should be null"); + ClassicAssert.IsNull(installer.RepairBehavior, "RepairBehavior at the installer level should be null"); + ClassicAssert.IsNull(installer.ArchiveBinariesDependOnPath, "ArchiveBinariesDependOnPath at the installer level should be null"); } } @@ -1398,6 +1483,9 @@ public async Task DontMoveInstallerFieldsToRoot() ClassicAssert.IsNull(updatedInstallerManifest.InstallerSuccessCodes, "InstallerSuccessCodes at the root level should be null"); ClassicAssert.IsNull(updatedInstallerManifest.UnsupportedArguments, "UnsupportedArguments at the root level should be null"); ClassicAssert.IsNull(updatedInstallerManifest.InstallationMetadata, "InstallationMetadata at the root level should be null"); + ClassicAssert.IsNull(updatedInstallerManifest.DownloadCommandProhibited, "DownloadCommandProhibited at the root level should be null"); + ClassicAssert.IsNull(updatedInstallerManifest.RepairBehavior, "RepairBehavior at the root level should be null"); + ClassicAssert.IsNull(updatedInstallerManifest.ArchiveBinariesDependOnPath, "ArchiveBinariesDependOnPath at the root level should be null"); foreach (var installer in updatedInstallerManifest.Installers) { @@ -1428,6 +1516,9 @@ public async Task DontMoveInstallerFieldsToRoot() ClassicAssert.IsNotNull(installer.InstallerSuccessCodes, "InstallerSuccessCodes at the installer level should not be null"); ClassicAssert.IsNotNull(installer.UnsupportedArguments, "UnsupportedArguments at the installer level should not be null"); ClassicAssert.IsNotNull(installer.InstallationMetadata, "InstallationMetadata at the installer level should not be null"); + ClassicAssert.IsNotNull(installer.DownloadCommandProhibited, "DownloadCommandProhibited at the installer level should not be null"); + ClassicAssert.IsNotNull(installer.RepairBehavior, "RepairBehavior at the installer level should not be null"); + ClassicAssert.IsNotNull(installer.ArchiveBinariesDependOnPath, "ArchiveBinariesDependOnPath at the installer level should not be null"); } } diff --git a/src/WingetCreateTests/WingetCreateTests/WingetCreateTests.csproj b/src/WingetCreateTests/WingetCreateTests/WingetCreateTests.csproj index 966a9442..80a5e1d6 100644 --- a/src/WingetCreateTests/WingetCreateTests/WingetCreateTests.csproj +++ b/src/WingetCreateTests/WingetCreateTests/WingetCreateTests.csproj @@ -1,7 +1,7 @@  - net6.0-windows10.0.22000.0 + net8.0-windows10.0.22000.0 false true x64;x86 @@ -63,6 +63,24 @@ PreserveNewest + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + PreserveNewest From ba7b6ddc43005f0932f05518fa5e86495f55d65f Mon Sep 17 00:00:00 2001 From: ryfu-msft Date: Mon, 11 Nov 2024 14:31:23 -0800 Subject: [PATCH 2/3] fix version --- pipelines/azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pipelines/azure-pipelines.yml b/pipelines/azure-pipelines.yml index 2835b0da..435f195c 100644 --- a/pipelines/azure-pipelines.yml +++ b/pipelines/azure-pipelines.yml @@ -34,7 +34,7 @@ variables: buildPlatform: "x64" # Target framework - targetFramework: "net6.0-windows10.0.22000.0" + targetFramework: "net8.0-windows10.0.22000.0" resources: repositories: From 296961ae2381405937997636a846d6cbfbe5c4ad Mon Sep 17 00:00:00 2001 From: ryfu-msft Date: Mon, 11 Nov 2024 15:10:11 -0800 Subject: [PATCH 3/3] update publish profile --- .../PublishProfiles/x64ReleasePublishProfile.pubxml | 4 ++-- .../PublishProfiles/x86ReleasePublishProfile.pubxml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/WingetCreateCLI/Properties/PublishProfiles/x64ReleasePublishProfile.pubxml b/src/WingetCreateCLI/Properties/PublishProfiles/x64ReleasePublishProfile.pubxml index 7e6b9caf..b16e25e9 100644 --- a/src/WingetCreateCLI/Properties/PublishProfiles/x64ReleasePublishProfile.pubxml +++ b/src/WingetCreateCLI/Properties/PublishProfiles/x64ReleasePublishProfile.pubxml @@ -6,9 +6,9 @@ https://go.microsoft.com/fwlink/?LinkID=208121. Release x64 - bin\x64\Release\net6.0-windows10.0.22000.0\win-x64\publish\ + bin\x64\Release\net8.0-windows10.0.22000.0\win-x64\publish\ FileSystem - net6.0-windows10.0.22000.0 + net8.0-windows10.0.22000.0 win-x64 true False diff --git a/src/WingetCreateCLI/Properties/PublishProfiles/x86ReleasePublishProfile.pubxml b/src/WingetCreateCLI/Properties/PublishProfiles/x86ReleasePublishProfile.pubxml index 8fc1cfb0..a00c2386 100644 --- a/src/WingetCreateCLI/Properties/PublishProfiles/x86ReleasePublishProfile.pubxml +++ b/src/WingetCreateCLI/Properties/PublishProfiles/x86ReleasePublishProfile.pubxml @@ -6,9 +6,9 @@ https://go.microsoft.com/fwlink/?LinkID=208121. Release x86 - bin\x86\Release\net6.0-windows10.0.22000.0\win-x86\publish\ + bin\x86\Release\net8.0-windows10.0.22000.0\win-x86\publish\ FileSystem - net6.0-windows10.0.22000.0 + net8.0-windows10.0.22000.0 win-x86 true False