diff --git a/.gitignore b/.gitignore index d82850c71066..d0178ae35b75 100644 --- a/.gitignore +++ b/.gitignore @@ -185,9 +185,6 @@ publish/ # Publish Web Output *.[Pp]ublish.xml *.azurePubxml -# Note: Comment the next line if you want to checkin your web deploy settings, -# but database connection strings (with potential passwords) will be unencrypted -*.pubxml *.publishproj # Microsoft Azure Web App publish settings. Comment the next line if you want to diff --git a/eng/devices/windows.cake b/eng/devices/windows.cake index 98459a03dda4..58b86e68410f 100644 --- a/eng/devices/windows.cake +++ b/eng/devices/windows.cake @@ -32,7 +32,7 @@ var dotnetToolPath = GetDotnetToolPath(); // other string PLATFORM = "windows"; -string DOTNET_PLATFORM = $"win10-x64"; +string DOTNET_PLATFORM = $"win-x64"; bool DEVICE_CLEANUP = Argument("cleanup", true); string certificateThumbprint = ""; bool isPackagedTestRun = TEST_DEVICE.ToLower().Equals("packaged"); @@ -160,7 +160,7 @@ Task("Build") { ArgumentCustomization = args => args.Append("/bl:" + binlog), }; - s.MSBuildSettings.Properties.Add("RuntimeIdentifierOverride", new List { "win10-x64" }); + s.MSBuildSettings.Properties.Add("RuntimeIdentifierOverride", new List { "win-x64" }); var launchSettingsNeedle = "Project"; var launchSettingsReplacement = "MsixPackage"; diff --git a/src/Controls/tests/TestCases.Shared.Tests/UITest.cs b/src/Controls/tests/TestCases.Shared.Tests/UITest.cs index 96e54b368181..632c0f95d4b4 100644 --- a/src/Controls/tests/TestCases.Shared.Tests/UITest.cs +++ b/src/Controls/tests/TestCases.Shared.Tests/UITest.cs @@ -69,8 +69,8 @@ public override IConfig GetTestConfig() case TestDevice.Windows: var appProjectFolder = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location)!, "..\\..\\..\\Controls.TestCases.HostApp"); var windowsExe = "Controls.TestCases.HostApp.exe"; - var windowsExePath = Path.Combine(appProjectFolder, $"{configuration}\\{frameworkVersion}-windows10.0.20348.0\\win10-x64\\{windowsExe}"); - var windowsExePath19041 = Path.Combine(appProjectFolder, $"{configuration}\\{frameworkVersion}-windows10.0.19041.0\\win10-x64\\{windowsExe}"); + var windowsExePath = Path.Combine(appProjectFolder, $"{configuration}\\{frameworkVersion}-windows10.0.20348.0\\win-x64\\{windowsExe}"); + var windowsExePath19041 = Path.Combine(appProjectFolder, $"{configuration}\\{frameworkVersion}-windows10.0.19041.0\\win-x64\\{windowsExe}"); if (!File.Exists(windowsExePath) && File.Exists(windowsExePath19041)) { diff --git a/src/Core/src/nuget/buildTransitive/WinUI.targets b/src/Core/src/nuget/buildTransitive/WinUI.targets index 1c4737fc300f..6e7facb3a3c2 100644 --- a/src/Core/src/nuget/buildTransitive/WinUI.targets +++ b/src/Core/src/nuget/buildTransitive/WinUI.targets @@ -48,8 +48,8 @@ arm64 - - + + diff --git a/src/Graphics/samples/GraphicsTester.WinUI.Desktop/GraphicsTester.WinUI.Desktop.csproj b/src/Graphics/samples/GraphicsTester.WinUI.Desktop/GraphicsTester.WinUI.Desktop.csproj index 4c6723a005ef..e27289ac5409 100644 --- a/src/Graphics/samples/GraphicsTester.WinUI.Desktop/GraphicsTester.WinUI.Desktop.csproj +++ b/src/Graphics/samples/GraphicsTester.WinUI.Desktop/GraphicsTester.WinUI.Desktop.csproj @@ -6,13 +6,12 @@ 10.0.18362.0 GraphicsTester.WinUI.Desktop app.manifest - win10-x64 + win-x64 true false MSIX false false - true diff --git a/src/Templates/src/templates/maui-multiproject/MauiApp.1.WinUI/MauiApp.1.WinUI.csproj b/src/Templates/src/templates/maui-multiproject/MauiApp.1.WinUI/MauiApp.1.WinUI.csproj index 5997a3dd0856..a814d2cb0991 100644 --- a/src/Templates/src/templates/maui-multiproject/MauiApp.1.WinUI/MauiApp.1.WinUI.csproj +++ b/src/Templates/src/templates/maui-multiproject/MauiApp.1.WinUI/MauiApp.1.WinUI.csproj @@ -7,8 +7,8 @@ MauiApp._1.WinUI app.manifest x86;x64;ARM64 - win10-x86;win10-x64;win10-arm64 - win10-$(Platform).pubxml + win-x86;win-x64;win-arm64 + win-$(Platform).pubxml true true enable diff --git a/src/Templates/src/templates/maui-multiproject/MauiApp.1.WinUI/Properties/PublishProfiles/win10-arm64.pubxml b/src/Templates/src/templates/maui-multiproject/MauiApp.1.WinUI/Properties/PublishProfiles/win-arm64.pubxml similarity index 93% rename from src/Templates/src/templates/maui-multiproject/MauiApp.1.WinUI/Properties/PublishProfiles/win10-arm64.pubxml rename to src/Templates/src/templates/maui-multiproject/MauiApp.1.WinUI/Properties/PublishProfiles/win-arm64.pubxml index a7fdd16b6773..d544e386edca 100644 --- a/src/Templates/src/templates/maui-multiproject/MauiApp.1.WinUI/Properties/PublishProfiles/win10-arm64.pubxml +++ b/src/Templates/src/templates/maui-multiproject/MauiApp.1.WinUI/Properties/PublishProfiles/win-arm64.pubxml @@ -6,7 +6,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121. FileSystem ARM64 - win10-arm64 + win-arm64 bin\$(Configuration)\$(TargetFramework)\$(RuntimeIdentifier)\publish\ true False diff --git a/src/Templates/src/templates/maui-multiproject/MauiApp.1.WinUI/Properties/PublishProfiles/win10-x64.pubxml b/src/Templates/src/templates/maui-multiproject/MauiApp.1.WinUI/Properties/PublishProfiles/win-x64.pubxml similarity index 93% rename from src/Templates/src/templates/maui-multiproject/MauiApp.1.WinUI/Properties/PublishProfiles/win10-x64.pubxml rename to src/Templates/src/templates/maui-multiproject/MauiApp.1.WinUI/Properties/PublishProfiles/win-x64.pubxml index 26ea7e55c146..ca40a9e6ab69 100644 --- a/src/Templates/src/templates/maui-multiproject/MauiApp.1.WinUI/Properties/PublishProfiles/win10-x64.pubxml +++ b/src/Templates/src/templates/maui-multiproject/MauiApp.1.WinUI/Properties/PublishProfiles/win-x64.pubxml @@ -6,7 +6,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121. FileSystem x64 - win10-x64 + win-x64 bin\$(Configuration)\$(TargetFramework)\$(RuntimeIdentifier)\publish\ true False diff --git a/src/Templates/src/templates/maui-multiproject/MauiApp.1.WinUI/Properties/PublishProfiles/win10-x86.pubxml b/src/Templates/src/templates/maui-multiproject/MauiApp.1.WinUI/Properties/PublishProfiles/win-x86.pubxml similarity index 93% rename from src/Templates/src/templates/maui-multiproject/MauiApp.1.WinUI/Properties/PublishProfiles/win10-x86.pubxml rename to src/Templates/src/templates/maui-multiproject/MauiApp.1.WinUI/Properties/PublishProfiles/win-x86.pubxml index 34d14d4d4a94..be62e6b72063 100644 --- a/src/Templates/src/templates/maui-multiproject/MauiApp.1.WinUI/Properties/PublishProfiles/win10-x86.pubxml +++ b/src/Templates/src/templates/maui-multiproject/MauiApp.1.WinUI/Properties/PublishProfiles/win-x86.pubxml @@ -6,7 +6,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121. FileSystem x86 - win10-x86 + win-x86 bin\$(Configuration)\$(TargetFramework)\$(RuntimeIdentifier)\publish\ true False diff --git a/src/TestUtils/src/Microsoft.Maui.IntegrationTests/ResizetizerTests.cs b/src/TestUtils/src/Microsoft.Maui.IntegrationTests/ResizetizerTests.cs index 0217eafe07c6..cc8da3211053 100644 --- a/src/TestUtils/src/Microsoft.Maui.IntegrationTests/ResizetizerTests.cs +++ b/src/TestUtils/src/Microsoft.Maui.IntegrationTests/ResizetizerTests.cs @@ -93,7 +93,7 @@ public void CollectsAssets(string id, string libid, bool unpackaged) Assert.True(File.Exists(Path.Combine(appDir, $"obj\\Debug\\{DotNetCurrent}-maccatalyst\\maccatalyst-x64\\resizetizer\\r\\the_image.png")), "Mac Catalyst was missing the image file."); if (TestEnvironment.IsWindows) - Assert.True(File.Exists(Path.Combine(appDir, $"obj\\Debug\\{DotNetCurrent}-windows10.0.19041.0\\win10-x64\\resizetizer\\r\\the_image.scale-100.png")), + Assert.True(File.Exists(Path.Combine(appDir, $"obj\\Debug\\{DotNetCurrent}-windows10.0.19041.0\\win-x64\\resizetizer\\r\\the_image.scale-100.png")), "Windows was missing the image file."); } } diff --git a/src/TestUtils/src/Microsoft.Maui.IntegrationTests/WindowsTemplateTest.cs b/src/TestUtils/src/Microsoft.Maui.IntegrationTests/WindowsTemplateTest.cs index 23ddca8e800b..20a11c0251f7 100644 --- a/src/TestUtils/src/Microsoft.Maui.IntegrationTests/WindowsTemplateTest.cs +++ b/src/TestUtils/src/Microsoft.Maui.IntegrationTests/WindowsTemplateTest.cs @@ -82,7 +82,7 @@ public void BuildWindowsAppSDKSelfContained(string id, bool wasdkself, bool nets [TestCase("maui", true, "MSIX")] [TestCase("maui", false, "None")] [TestCase("maui", false, "MSIX")] - public void BuildWindowsRidGraph(string id, bool useridgraph, string packageType) + public void BuildWindowsRidGraph(string id, bool useRidGraph, string packageType) { if (TestEnvironment.IsMacOS) Assert.Ignore("This test is designed for testing a windows build."); @@ -96,7 +96,7 @@ public void BuildWindowsRidGraph(string id, bool useridgraph, string packageType FileUtilities.ReplaceInFile(projectFile, "None", $""" - {useridgraph} + {useRidGraph} {packageType} """); @@ -108,11 +108,11 @@ public void BuildWindowsRidGraph(string id, bool useridgraph, string packageType } [Test] - [TestCase("maui", DotNetCurrent, "Release")] - [TestCase("maui", DotNetPrevious, "Release")] - [TestCase("maui-blazor", DotNetCurrent, "Release")] - [TestCase("maui-blazor", DotNetPrevious, "Release")] - public void PublishUnpackaged(string id, string framework, string config) + [TestCase("maui", DotNetCurrent, "Release", false)] + [TestCase("maui", DotNetPrevious, "Release", true)] + [TestCase("maui-blazor", DotNetCurrent, "Release", false)] + [TestCase("maui-blazor", DotNetPrevious, "Release", true)] + public void PublishUnpackaged(string id, string framework, string config, bool usesRidGraph) { if (!TestEnvironment.IsWindows) Assert.Ignore("Running Windows templates is only supported on Windows."); @@ -140,7 +140,8 @@ public void PublishUnpackaged(string id, string framework, string config) Assert.IsTrue(DotnetInternal.Publish(projectFile, config, framework: $"{framework}-windows10.0.19041.0", properties: BuildProps), $"Project {Path.GetFileName(projectFile)} failed to build. Check test output/attachments for errors."); - var assetsRoot = Path.Combine(projectDir, $"bin/{config}/{framework}-windows10.0.19041.0/win10-x64/publish"); + var rid = usesRidGraph ? "win10-x64" : "win-x64"; + var assetsRoot = Path.Combine(projectDir, $"bin/{config}/{framework}-windows10.0.19041.0/{rid}/publish"); AssetExists("dotnet_bot.scale-100.png"); AssetExists("appiconLogo.scale-100.png"); @@ -157,11 +158,11 @@ void AssetExists(string filename) } [Test] - [TestCase("maui", DotNetCurrent, "Release")] - [TestCase("maui", DotNetPrevious, "Release")] - [TestCase("maui-blazor", DotNetCurrent, "Release")] - [TestCase("maui-blazor", DotNetPrevious, "Release")] - public void PublishPackaged(string id, string framework, string config) + [TestCase("maui", DotNetCurrent, "Release", false)] + [TestCase("maui", DotNetPrevious, "Release", true)] + [TestCase("maui-blazor", DotNetCurrent, "Release", false)] + [TestCase("maui-blazor", DotNetPrevious, "Release", true)] + public void PublishPackaged(string id, string framework, string config, bool usesRidGraph) { if (!TestEnvironment.IsWindows) Assert.Ignore("Running Windows templates is only supported on Windows."); @@ -190,7 +191,8 @@ public void PublishPackaged(string id, string framework, string config) Assert.IsTrue(DotnetInternal.Publish(projectFile, config, framework: $"{framework}-windows10.0.19041.0", properties: BuildProps), $"Project {Path.GetFileName(projectFile)} failed to build. Check test output/attachments for errors."); - var assetsRoot = Path.Combine(projectDir, $"bin/{config}/{framework}-windows10.0.19041.0/win10-x64/AppPackages/{name}_1.0.0.1_Test"); + var rid = usesRidGraph ? "win10-x64" : "win-x64"; + var assetsRoot = Path.Combine(projectDir, $"bin/{config}/{framework}-windows10.0.19041.0/{rid}/AppPackages/{name}_1.0.0.1_Test"); AssetExists($"{name}_1.0.0.1_x64.msix"); diff --git a/src/Workload/Microsoft.Maui.Sdk/Sdk/Microsoft.Maui.Sdk.Before.targets b/src/Workload/Microsoft.Maui.Sdk/Sdk/Microsoft.Maui.Sdk.Before.targets index ff64380097b1..17aa03b06a8f 100644 --- a/src/Workload/Microsoft.Maui.Sdk/Sdk/Microsoft.Maui.Sdk.Before.targets +++ b/src/Workload/Microsoft.Maui.Sdk/Sdk/Microsoft.Maui.Sdk.Before.targets @@ -5,8 +5,6 @@ WinExe true - - true