diff --git a/.nuspec/Microsoft.Maui.Resizetizer.targets b/.nuspec/Microsoft.Maui.Resizetizer.targets
index 825e330b4d82..bc76550fb61d 100644
--- a/.nuspec/Microsoft.Maui.Resizetizer.targets
+++ b/.nuspec/Microsoft.Maui.Resizetizer.targets
@@ -41,6 +41,10 @@
AssemblyFile="$(_ResizetizerTaskAssemblyName)"
TaskName="Microsoft.Maui.Resizetizer.GetMauiAssetPath" />
+
+
$(CleanDependsOn);
@@ -53,11 +57,13 @@
<_MauiFontStampFile>$(IntermediateOutputPath)mauifont.stamp
<_MauiSplashInputsFile>$(IntermediateOutputPath)mauisplash.inputs
<_MauiSplashStampFile>$(IntermediateOutputPath)mauisplash.stamp
+ <_MauiManifestStampFile>$(IntermediateOutputPath)mauimanifest.stamp
<_ResizetizerIntermediateOutputRoot>$(IntermediateOutputPath)resizetizer\
<_MauiIntermediateImages>$(_ResizetizerIntermediateOutputRoot)r\
<_MauiIntermediateFonts>$(_ResizetizerIntermediateOutputRoot)f\
<_MauiIntermediateSplashScreen>$(_ResizetizerIntermediateOutputRoot)sp\
+ <_MauiIntermediateManifest>$(_ResizetizerIntermediateOutputRoot)m\
<_MauiIntermediateColors>$(_MauiIntermediateSplashScreen)maui_colors.xml
<_MauiIntermediateDrawable>$(_MauiIntermediateSplashScreen)maui_splash_image.xml
<_MauiIntermediateStoryboard>$(_MauiIntermediateSplashScreen)MauiSplash.storyboard
@@ -162,6 +168,11 @@
$(ProcessMauiFontsBeforeTargets);
AssignTargetPaths;
+
+
+ $(MauiGeneratePackageAppxManifestDependsOnTargets);
+ ResizetizeCollectItems;
+
@@ -546,6 +557,40 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/eng/cake/dotnet.cake b/eng/cake/dotnet.cake
index cdcfe3a0bbc8..7422faee062c 100644
--- a/eng/cake/dotnet.cake
+++ b/eng/cake/dotnet.cake
@@ -67,7 +67,8 @@ Task("dotnet-samples")
.Does(() =>
{
RunMSBuildWithDotNet("./Microsoft.Maui.Samples.slnf", new Dictionary {
- ["UseWorkload"] = bool.TrueString,
+ ["UseWorkload"] = "true",
+ ["GenerateAppxPackageOnBuild"] = "true",
});
});
@@ -102,6 +103,7 @@ Task("dotnet-templates")
var properties = new Dictionary {
// Properties that ensure we don't use cached packages, and *only* the empty NuGet.config
{ "RestoreNoCache", "true" },
+ { "GenerateAppxPackageOnBuild", "true" },
{ "RestorePackagesPath", MakeAbsolute(templatesTest.CombineWithFilePath("packages")).FullPath },
{ "RestoreConfigFile", MakeAbsolute(templatesTest.CombineWithFilePath("nuget.config")).FullPath },
diff --git a/src/Controls/samples/Controls.Sample.SingleProject/Maui.Controls.Sample.SingleProject.csproj b/src/Controls/samples/Controls.Sample.SingleProject/Maui.Controls.Sample.SingleProject.csproj
index 891177798410..82018b9d4e83 100644
--- a/src/Controls/samples/Controls.Sample.SingleProject/Maui.Controls.Sample.SingleProject.csproj
+++ b/src/Controls/samples/Controls.Sample.SingleProject/Maui.Controls.Sample.SingleProject.csproj
@@ -13,6 +13,8 @@
None
.NET MAUI Controls
com.microsoft.maui.sample
+ f9e4fa3e-3505-4742-9b2b-d1acdaff4ec8
+ 1.0
1
<_FastDeploymentDiagnosticLogging>True
AnyCPU;x86
diff --git a/src/Controls/samples/Controls.Sample.SingleProject/Platforms/Windows/Package.appxmanifest b/src/Controls/samples/Controls.Sample.SingleProject/Platforms/Windows/Package.appxmanifest
index 88ae00d83141..bfdb1c448a12 100644
--- a/src/Controls/samples/Controls.Sample.SingleProject/Platforms/Windows/Package.appxmanifest
+++ b/src/Controls/samples/Controls.Sample.SingleProject/Platforms/Windows/Package.appxmanifest
@@ -1,58 +1,26 @@
-
-
-
-
-
+
+
- .NET MAUI Controls
.NET Foundation
- appiconStoreLogo.png
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
+
-
+
\ No newline at end of file
diff --git a/src/SingleProject/Resizetizer/src/GeneratePackageAppxManifest.cs b/src/SingleProject/Resizetizer/src/GeneratePackageAppxManifest.cs
new file mode 100644
index 000000000000..8f95dec8c624
--- /dev/null
+++ b/src/SingleProject/Resizetizer/src/GeneratePackageAppxManifest.cs
@@ -0,0 +1,387 @@
+#nullable enable
+using System;
+using System.IO;
+using System.Linq;
+using System.Xml.Linq;
+using Microsoft.Build.Framework;
+using Microsoft.Build.Utilities;
+
+namespace Microsoft.Maui.Resizetizer
+{
+ public class GeneratePackageAppxManifest : Task
+ {
+ const string ErrorInvalidApplicationId = "ApplicationId '{0}' was not a valid GUID. Windows apps use a GUID for an application ID instead of the reverse domain used by Android and/or iOS apps.";
+ const string ErrorVersionNumberCombination = "ApplicationDisplayVersion '{0}' was not a valid 3 part semver version number and/or ApplicationVersion '{1}' was not a valid integer.";
+
+ static readonly XNamespace xmlnsUap = "http://schemas.microsoft.com/appx/manifest/uap/windows10";
+
+ [Required]
+ public string IntermediateOutputPath { get; set; } = null!;
+
+ [Required]
+ public ITaskItem AppxManifest { get; set; } = null!;
+
+ public string? GeneratedFilename { get; set; }
+
+ public string? ApplicationId { get; set; }
+
+ public string? ApplicationDisplayVersion { get; set; }
+
+ public string? ApplicationVersion { get; set; }
+
+ public string? ApplicationTitle { get; set; }
+
+ public ITaskItem[]? AppIcon { get; set; }
+
+ public ITaskItem[]? SplashScreen { get; set; }
+
+ [Output]
+ public ITaskItem GeneratedAppxManifest { get; set; } = null!;
+
+ public override bool Execute()
+ {
+ try
+ {
+ Directory.CreateDirectory(IntermediateOutputPath);
+
+ var filename = Path.Combine(IntermediateOutputPath, GeneratedFilename ?? "Package.appxmanifest");
+
+ var appx = XDocument.Load(AppxManifest.ItemSpec);
+
+ UpdateManifest(appx);
+
+ appx.Save(filename);
+
+ GeneratedAppxManifest = new TaskItem(filename);
+ }
+ catch (Exception ex)
+ {
+ Log.LogErrorFromException(ex);
+ }
+
+ return !Log.HasLoggedErrors;
+ }
+
+ void UpdateManifest(XDocument appx)
+ {
+ var appIconInfo = AppIcon?.Length > 0 ? ResizeImageInfo.Parse(AppIcon[0]) : null;
+ var splashInfo = SplashScreen?.Length > 0 ? ResizeImageInfo.Parse(SplashScreen[0]) : null;
+ var imageExtension = ".png";
+
+ var xmlns = appx.Root!.GetDefaultNamespace();
+
+ //
+ if (!string.IsNullOrEmpty(ApplicationId) || !string.IsNullOrEmpty(ApplicationDisplayVersion) || !string.IsNullOrEmpty(ApplicationVersion))
+ {
+ //
+ var xidentity = xmlns + "Identity";
+ var identity = appx.Root.Element(xidentity);
+ if (identity == null)
+ {
+ identity = new XElement(xidentity);
+ appx.Root.Add(identity);
+ }
+
+ // Name=""
+ if (!string.IsNullOrEmpty(ApplicationId))
+ {
+ var xname = "Name";
+ var attr = identity.Attribute(xname);
+ if (attr == null || string.IsNullOrEmpty(attr.Value))
+ {
+ if (!Guid.TryParse(ApplicationId, out _))
+ {
+ Log.LogError(ErrorInvalidApplicationId, ApplicationId);
+ return;
+ }
+
+ identity.SetAttributeValue(xname, ApplicationId);
+ }
+ }
+
+ // Version=""
+ if (!string.IsNullOrEmpty(ApplicationDisplayVersion) || !string.IsNullOrEmpty(ApplicationVersion))
+ {
+ var xname = "Version";
+ var attr = identity.Attribute(xname);
+ if (attr == null || string.IsNullOrEmpty(attr.Value))
+ {
+ if (!TryMergeVersionNumbers(ApplicationDisplayVersion, ApplicationVersion, out var finalVersion))
+ {
+ Log.LogError(ErrorVersionNumberCombination, ApplicationDisplayVersion, ApplicationVersion);
+ return;
+ }
+
+ identity.SetAttributeValue(xname, finalVersion);
+ }
+ }
+ }
+
+ //
+ //
+ //
+ //
+ if (!string.IsNullOrEmpty(ApplicationTitle) || appIconInfo != null)
+ {
+ //
+ var xproperties = xmlns + "Properties";
+ var properties = appx.Root.Element(xproperties);
+ if (properties == null)
+ {
+ properties = new XElement(xproperties);
+ appx.Root.Add(properties);
+ }
+
+ //
+ if (!string.IsNullOrEmpty(ApplicationTitle))
+ {
+ var xname = xmlns + "DisplayName";
+ var xelem = properties.Element(xname);
+ if (xelem == null || string.IsNullOrEmpty(xelem.Value))
+ properties.SetElementValue(xname, ApplicationTitle);
+ }
+
+ //
+ if (appIconInfo != null)
+ {
+ var xname = xmlns + "Logo";
+ var xelem = properties.Element(xname);
+ if (xelem == null || string.IsNullOrEmpty(xelem.Value))
+ {
+ var dpi = DpiPath.Windows.StoreLogo[0];
+ var path = Path.Combine(dpi.Path, appIconInfo.OutputName + dpi.NameSuffix + imageExtension);
+ properties.SetElementValue(xname, path);
+ }
+ }
+ }
+
+ //
+ //
+ //
+ //
+ //
+ //
+ //
+ //
+ //
+ //
+ //
+ //
+ if (!string.IsNullOrEmpty(ApplicationTitle) || appIconInfo != null || splashInfo != null)
+ {
+ //
+ var xapplications = xmlns + "Applications";
+ var applications = appx.Root.Element(xapplications);
+ if (applications == null)
+ {
+ applications = new XElement(xapplications);
+ appx.Root.Add(applications);
+ }
+
+ //
+ var xapplication = xmlns + "Application";
+ var application = applications.Element(xapplication);
+ if (application == null)
+ {
+ application = new XElement(xapplication);
+ applications.Add(application);
+ }
+
+ //
+ var xvisual = xmlnsUap + "VisualElements";
+ var visual = application.Element(xvisual);
+ if (visual == null)
+ {
+ visual = new XElement(xvisual);
+ application.Add(visual);
+ }
+
+ if (!string.IsNullOrEmpty(ApplicationTitle))
+ {
+ // DisplayName=""
+ {
+ var xname = "DisplayName";
+ var attr = visual.Attribute(xname);
+ if (attr == null || string.IsNullOrEmpty(attr.Value))
+ visual.SetAttributeValue(xname, ApplicationTitle);
+ }
+
+ // Description=""
+ {
+ var xname = "Description";
+ var attr = visual.Attribute(xname);
+ if (attr == null || string.IsNullOrEmpty(attr.Value))
+ visual.SetAttributeValue(xname, ApplicationTitle);
+ }
+ }
+
+ // BackgroundColor=""
+ {
+ var xname = "BackgroundColor";
+ var attr = visual.Attribute(xname);
+ if (attr == null || string.IsNullOrEmpty(attr.Value))
+ visual.SetAttributeValue(xname, "transparent");
+ }
+
+ if (appIconInfo != null)
+ {
+ // Square150x150Logo=""
+ {
+ var xname = "Square150x150Logo";
+ var attr = visual.Attribute(xname);
+ if (attr == null || string.IsNullOrEmpty(attr.Value))
+ {
+ var dpi = DpiPath.Windows.MediumTile[0];
+ var path = Path.Combine(dpi.Path, appIconInfo.OutputName + dpi.NameSuffix + imageExtension);
+ visual.SetAttributeValue(xname, path);
+ }
+ }
+
+ // Square44x44Logo=""
+ {
+ var xname = "Square44x44Logo";
+ var attr = visual.Attribute(xname);
+ if (attr == null || string.IsNullOrEmpty(attr.Value))
+ {
+ var dpi = DpiPath.Windows.Logo[0];
+ var path = Path.Combine(dpi.Path, appIconInfo.OutputName + dpi.NameSuffix + imageExtension);
+ visual.SetAttributeValue(xname, path);
+ }
+ }
+ }
+
+ //
+ var xtile = xmlnsUap + "DefaultTile";
+ var tile = visual.Element(xtile);
+ if (tile == null)
+ {
+ tile = new XElement(xtile);
+ visual.Add(tile);
+ }
+
+ if (appIconInfo != null)
+ {
+ // Wide310x150Logo=""
+ {
+ var xname = "Wide310x150Logo";
+ var attr = tile.Attribute(xname);
+ if (attr == null || string.IsNullOrEmpty(attr.Value))
+ {
+ var dpi = DpiPath.Windows.WideTile[0];
+ var path = Path.Combine(dpi.Path, appIconInfo.OutputName + dpi.NameSuffix + imageExtension);
+ tile.SetAttributeValue(xname, path);
+ }
+ }
+
+ // Square71x71Logo=""
+ {
+ var xname = "Square71x71Logo";
+ var attr = tile.Attribute(xname);
+ if (attr == null || string.IsNullOrEmpty(attr.Value))
+ {
+ var dpi = DpiPath.Windows.SmallTile[0];
+ var path = Path.Combine(dpi.Path, appIconInfo.OutputName + dpi.NameSuffix + imageExtension);
+ tile.SetAttributeValue(xname, path);
+ }
+ }
+
+ // Square310x310Logo=""
+ {
+ var xname = "Square310x310Logo";
+ var attr = tile.Attribute(xname);
+ if (attr == null || string.IsNullOrEmpty(attr.Value))
+ {
+ var dpi = DpiPath.Windows.LargeTile[0];
+ var path = Path.Combine(dpi.Path, appIconInfo.OutputName + dpi.NameSuffix + imageExtension);
+ tile.SetAttributeValue(xname, path);
+ }
+ }
+ }
+
+ // ShortName=""
+ if (!string.IsNullOrEmpty(ApplicationTitle))
+ {
+ var xname = "ShortName";
+ var attr = tile.Attribute(xname);
+ if (attr == null || string.IsNullOrEmpty(attr.Value))
+ tile.SetAttributeValue(xname, ApplicationTitle);
+ }
+
+ //
+ var xshowname = xmlnsUap + "ShowNameOnTiles";
+ var showname = tile.Element(xshowname);
+ if (showname == null)
+ {
+ showname = new XElement(xshowname);
+ tile.Add(showname);
+ }
+
+ //
+ var xshowon = xmlnsUap + "ShowOn";
+ var showons = showname.Elements(xshowon).ToArray();
+ if (showons.All(x => x.Attribute("Tile")?.Value != "square150x150Logo"))
+ showname.Add(new XElement(xshowon, new XAttribute("Tile", "square150x150Logo")));
+ if (showons.All(x => x.Attribute("Tile")?.Value != "wide310x150Logo"))
+ showname.Add(new XElement(xshowon, new XAttribute("Tile", "wide310x150Logo")));
+
+ if (splashInfo != null)
+ {
+ //
+ var xsplash = xmlnsUap + "SplashScreen";
+ var splash = visual.Element(xsplash);
+ if (splash == null)
+ {
+ splash = new XElement(xsplash);
+ visual.Add(splash);
+ }
+
+ // Image=""
+ {
+ var xname = "Image";
+ var attr = splash.Attribute(xname);
+ if (attr == null || string.IsNullOrEmpty(attr.Value))
+ {
+ var dpi = DpiPath.Windows.SplashScreen[0];
+ var path = Path.Combine(dpi.Path, splashInfo.OutputName + dpi.NameSuffix + imageExtension);
+ splash.SetAttributeValue(xname, path);
+ }
+ }
+ }
+ }
+ }
+
+ public static bool TryMergeVersionNumbers(string? displayVersion, string? version, out string? finalVersion)
+ {
+ displayVersion = displayVersion?.Trim();
+ version = version?.Trim();
+ finalVersion = null;
+
+ // either a 4 part display version and no version or a 3 part display and an int version
+ var parts = displayVersion?.Split('.') ?? Array.Empty();
+ if (parts.Length > 3 && !string.IsNullOrEmpty(version))
+ return false;
+ else if (parts.Length > 4)
+ return false;
+
+ var v = new int[4];
+ for (var i = 0; i < 4 && i < parts.Length; i++)
+ {
+ if (!int.TryParse(parts[i], out var parsed))
+ return false;
+
+ v[i] = parsed;
+ }
+
+ if (!string.IsNullOrEmpty(version))
+ {
+ if (!int.TryParse(version, out var parsed))
+ return false;
+
+ v[3] = parsed;
+ }
+
+ finalVersion = $"{v[0]:0}.{v[1]:0}.{v[2]:0}.{v[3]:0}";
+ return true;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/SingleProject/Resizetizer/test/UnitTests/GeneratePackageAppxManifestTests.cs b/src/SingleProject/Resizetizer/test/UnitTests/GeneratePackageAppxManifestTests.cs
new file mode 100644
index 000000000000..094e83ff7c40
--- /dev/null
+++ b/src/SingleProject/Resizetizer/test/UnitTests/GeneratePackageAppxManifestTests.cs
@@ -0,0 +1,138 @@
+#nullable enable
+using System.IO;
+using System.Linq;
+using System.Xml.Linq;
+using Microsoft.Build.Framework;
+using Microsoft.Build.Utilities;
+using Xunit;
+
+namespace Microsoft.Maui.Resizetizer.Tests
+{
+ public class GeneratePackageAppxManifestTests : MSBuildTaskTestFixture
+ {
+ protected GeneratePackageAppxManifest GetNewTask(string manifest,
+ string? generatedFilename = null,
+ string? guid = null,
+ string? displayVersion = null,
+ string? version = null,
+ string? displayName = null,
+ ITaskItem? appIcon = null,
+ ITaskItem? splashScreen = null) =>
+ new()
+ {
+ IntermediateOutputPath = DestinationDirectory,
+ BuildEngine = this,
+ GeneratedFilename = generatedFilename,
+ AppxManifest = new TaskItem(manifest),
+ ApplicationId = guid,
+ ApplicationDisplayVersion = displayVersion,
+ ApplicationVersion = version,
+ ApplicationTitle = displayName,
+ AppIcon = appIcon == null ? null : new[] { appIcon },
+ SplashScreen = splashScreen == null ? null : new[] { splashScreen },
+ };
+
+ [Theory]
+ [InlineData(null, "Package.appxmanifest")]
+ [InlineData("GenPkg.appxmanifest", "GenPkg.appxmanifest")]
+ public void FileIsGenerated(string? specificFn, string outputFn)
+ {
+ var task = GetNewTask($"testdata/appxmanifest/typical.appxmanifest", generatedFilename: specificFn);
+
+ var success = task.Execute();
+ Assert.True(success, $"{task.GetType()}.Execute() failed: " + LogErrorEvents.FirstOrDefault()?.Message);
+
+ Assert.True(File.Exists(Path.Combine(DestinationDirectory, outputFn)), "Package.appxmanifest file was not generated.");
+ }
+
+ [Fact]
+ public void ManifestTakesPriority()
+ {
+ var appIcon = new TaskItem("images/camera.svg");
+ appIcon.SetMetadata("ForegroundFile", "images/loginbg.png");
+ appIcon.SetMetadata("IsAppIcon", "true");
+
+ var splashScreen = new TaskItem("images/dotnet_logo.svg");
+ splashScreen.SetMetadata("Color", "#FFFFFF");
+
+ var inputFilename = $"testdata/appxmanifest/typical.appxmanifest";
+ var task = GetNewTask(inputFilename,
+ guid: "3505f9e4-fa3e-4742-d1ac-daff4ec89b2b",
+ displayVersion: "2.5",
+ version: "3",
+ displayName: "Fishy Things",
+ appIcon: appIcon,
+ splashScreen: splashScreen);
+
+ var success = task.Execute();
+ Assert.True(success, $"{task.GetType()}.Execute() failed: " + LogErrorEvents.FirstOrDefault()?.Message);
+
+ var outputFilename = Path.Combine(DestinationDirectory, "Package.appxmanifest");
+ var expectedFilename = $"testdata/appxmanifest/typical.appxmanifest";
+
+ var outputDoc = XDocument.Load(outputFilename);
+ var expectedDoc = XDocument.Load(expectedFilename);
+
+ if (!XNode.DeepEquals(outputDoc, expectedDoc))
+ Assert.Equal(expectedDoc.ToString(), outputDoc.ToString());
+ }
+
+ [Theory]
+ [InlineData("typical", "typical")]
+ [InlineData("empty", "typical")]
+ public void CorrectGeneration(string input, string expected)
+ {
+ var appIcon = new TaskItem("images/appicon.svg");
+ appIcon.SetMetadata("ForegroundFile", "images/appiconfg.svg");
+ appIcon.SetMetadata("IsAppIcon", "true");
+
+ var splashScreen = new TaskItem("images/dotnet_bot.svg");
+ splashScreen.SetMetadata("Color", "#FFFFFF");
+
+ var inputFilename = $"testdata/appxmanifest/{input}.appxmanifest";
+ var task = GetNewTask(inputFilename,
+ guid: "f9e4fa3e-3505-4742-9b2b-d1acdaff4ec8",
+ displayVersion: "1.0.0",
+ version: "1",
+ displayName: "Sample App",
+ appIcon: appIcon,
+ splashScreen: splashScreen);
+
+ var success = task.Execute();
+ Assert.True(success, $"{task.GetType()}.Execute() failed: " + LogErrorEvents.FirstOrDefault()?.Message);
+
+ var outputFilename = Path.Combine(DestinationDirectory, "Package.appxmanifest");
+ var expectedFilename = $"testdata/appxmanifest/{expected}.appxmanifest";
+
+ var outputDoc = XDocument.Load(outputFilename);
+ var expectedDoc = XDocument.Load(expectedFilename);
+
+ if (!XNode.DeepEquals(outputDoc, expectedDoc))
+ Assert.Equal(expectedDoc.ToString(), outputDoc.ToString());
+ }
+
+ [Theory]
+ [InlineData("2", "42", "2.0.0.42")]
+ [InlineData("2.1", "42", "2.1.0.42")]
+ [InlineData("3.2.1", "42", "3.2.1.42")]
+ [InlineData("4.3.2.1", "", "4.3.2.1")]
+ public void ValidMergeVersionNumbers(string displayVersion, string appVersion, string expectedResult)
+ {
+ var result = GeneratePackageAppxManifest.TryMergeVersionNumbers(displayVersion, appVersion, out var merged);
+ Assert.True(result);
+ Assert.Equal(expectedResult, merged);
+ }
+
+ [Theory]
+ [InlineData("2.1", "42.31")]
+ [InlineData("4.3.2.1", "42")]
+ [InlineData("1.0.0", "1.0.0")]
+ [InlineData("3.1.3a1", "42")]
+ [InlineData("6.0-preview.7", "42")]
+ public void InvalidMergeVersionNumbers(string displayVersion, string appVersion)
+ {
+ var result = GeneratePackageAppxManifest.TryMergeVersionNumbers(displayVersion, appVersion, out var merged);
+ Assert.False(result);
+ }
+ }
+}
diff --git a/src/SingleProject/Resizetizer/test/UnitTests/testdata/appxmanifest/empty.appxmanifest b/src/SingleProject/Resizetizer/test/UnitTests/testdata/appxmanifest/empty.appxmanifest
new file mode 100644
index 000000000000..04a613a8f152
--- /dev/null
+++ b/src/SingleProject/Resizetizer/test/UnitTests/testdata/appxmanifest/empty.appxmanifest
@@ -0,0 +1,24 @@
+
+
+
+
+ .NET Foundation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/SingleProject/Resizetizer/test/UnitTests/testdata/appxmanifest/typical.appxmanifest b/src/SingleProject/Resizetizer/test/UnitTests/testdata/appxmanifest/typical.appxmanifest
new file mode 100644
index 000000000000..461cee694391
--- /dev/null
+++ b/src/SingleProject/Resizetizer/test/UnitTests/testdata/appxmanifest/typical.appxmanifest
@@ -0,0 +1,36 @@
+
+
+
+
+ .NET Foundation
+ Sample App
+ appiconStoreLogo.png
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/Templates/src/templates/maui-blazor/MauiApp.1.csproj b/src/Templates/src/templates/maui-blazor/MauiApp.1.csproj
index 6d5ca5b59580..afca1a85c870 100644
--- a/src/Templates/src/templates/maui-blazor/MauiApp.1.csproj
+++ b/src/Templates/src/templates/maui-blazor/MauiApp.1.csproj
@@ -16,8 +16,10 @@
com.companyname.mauiapp._1
+ 8B51DC95-6D07-4C39-BC6C-3BFE96E8A7EA
+ 1.0
1
diff --git a/src/Templates/src/templates/maui-blazor/Platforms/Windows/Package.appxmanifest b/src/Templates/src/templates/maui-blazor/Platforms/Windows/Package.appxmanifest
index 0d99a67e232e..0cb469c4dc1a 100644
--- a/src/Templates/src/templates/maui-blazor/Platforms/Windows/Package.appxmanifest
+++ b/src/Templates/src/templates/maui-blazor/Platforms/Windows/Package.appxmanifest
@@ -1,20 +1,14 @@
-
-
+
- MauiApp.1
- Microsoft
- appiconStoreLogo.png
+ User Name
@@ -23,31 +17,12 @@
-
+
-
-
-
-
-
-
-
-
-
-
+
+
diff --git a/src/Templates/src/templates/maui-mobile/MauiApp.1.csproj b/src/Templates/src/templates/maui-mobile/MauiApp.1.csproj
index 46e4847662d7..811c78eb0510 100644
--- a/src/Templates/src/templates/maui-mobile/MauiApp.1.csproj
+++ b/src/Templates/src/templates/maui-mobile/MauiApp.1.csproj
@@ -15,8 +15,10 @@
com.companyname.mauiapp._1
+ 919dc1f9-17a9-48b3-81f8-0b8016bdfbf7
+ 1.0
1
diff --git a/src/Templates/src/templates/maui-mobile/Platforms/Windows/Package.appxmanifest b/src/Templates/src/templates/maui-mobile/Platforms/Windows/Package.appxmanifest
index 5b6369c781b0..0cb469c4dc1a 100644
--- a/src/Templates/src/templates/maui-mobile/Platforms/Windows/Package.appxmanifest
+++ b/src/Templates/src/templates/maui-mobile/Platforms/Windows/Package.appxmanifest
@@ -1,20 +1,14 @@
-
-
+
- MauiApp.1
- Microsoft
- appiconStoreLogo.png
+ User Name
@@ -23,31 +17,12 @@
-
+
-
-
-
-
-
-
-
-
-
-
+
+