Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions src/WingetCreateCLI/Commands/NewCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,10 @@ public override async Task<bool> Execute()
try
{
PackageParser.ParsePackages(installerUpdateList, manifests);

// The CLI parses ARP entries uses them in update flow to update existing AppsAndFeaturesEntries in the manifest.
// AppsAndFeaturesEntries should not be set for a new package as they may cause more harm than good.
RemoveARPEntries(manifests.InstallerManifest);
DisplayArchitectureWarnings(installerUpdateList);
}
catch (IOException iOException) when (iOException.HResult == -2147024671)
Expand Down Expand Up @@ -508,6 +512,15 @@ private static void MergeNestedInstallerFilesIfApplicable(InstallerManifest inst
}
}

private static void RemoveARPEntries(InstallerManifest installerManifest)
{
installerManifest.AppsAndFeaturesEntries = null;
foreach (var installer in installerManifest.Installers)
{
installer.AppsAndFeaturesEntries = null;
}
}

/// <summary>
/// Prompts for the package identifier and applies the value to all manifests.
/// </summary>
Expand Down