Skip to content
Merged
Show file tree
Hide file tree
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
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions eng/devices/windows.cake
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down Expand Up @@ -160,7 +160,7 @@ Task("Build")
{
ArgumentCustomization = args => args.Append("/bl:" + binlog),
};
s.MSBuildSettings.Properties.Add("RuntimeIdentifierOverride", new List<string> { "win10-x64" });
s.MSBuildSettings.Properties.Add("RuntimeIdentifierOverride", new List<string> { "win-x64" });

var launchSettingsNeedle = "Project";
var launchSettingsReplacement = "MsixPackage";
Expand Down
4 changes: 2 additions & 2 deletions src/Controls/tests/TestCases.Shared.Tests/UITest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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))
{
Expand Down
4 changes: 2 additions & 2 deletions src/Core/src/nuget/buildTransitive/WinUI.targets
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@
<NativePlatform Condition="'$(RuntimeIdentifier)' == 'win10-arm64' or '$(RuntimeIdentifier)' == 'win-arm64'">arm64</NativePlatform>
</PropertyGroup>
<ItemGroup>
<MicrosoftWindowsAppSDKMsix Include="$([MSBuild]::NormalizeDirectory('$(MicrosoftWindowsAppSDKPackageDir)','tools\Msix\win10-$(NativePlatform)'))Microsoft.WindowsAppRuntime.?.?.Msix"/>
<MicrosoftWindowsAppSDKMsix Include="$([MSBuild]::NormalizeDirectory('$(MicrosoftWindowsAppSDKPackageDir)','tools\Msix\win10-$(NativePlatform)'))Microsoft.WindowsAppRuntime.?.?-*.Msix"/>
<MicrosoftWindowsAppSDKMsix Include="$([MSBuild]::NormalizeDirectory('$(MicrosoftWindowsAppSDKPackageDir)','tools\Msix\win-$(NativePlatform)'))Microsoft.WindowsAppRuntime.?.?.Msix"/>
<MicrosoftWindowsAppSDKMsix Include="$([MSBuild]::NormalizeDirectory('$(MicrosoftWindowsAppSDKPackageDir)','tools\Msix\win-$(NativePlatform)'))Microsoft.WindowsAppRuntime.?.?-*.Msix"/>
</ItemGroup>
</Target>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,12 @@
<TargetPlatformMinVersion>10.0.18362.0</TargetPlatformMinVersion>
<RootNamespace>GraphicsTester.WinUI.Desktop</RootNamespace>
<ApplicationManifest>app.manifest</ApplicationManifest>
<RuntimeIdentifier>win10-x64</RuntimeIdentifier>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<EnablePreviewMsixTooling>true</EnablePreviewMsixTooling>
<WinUISDKReferences>false</WinUISDKReferences>
<WindowsPackageType>MSIX</WindowsPackageType>
<GenerateLibraryLayout>false</GenerateLibraryLayout>
<IsPackable>false</IsPackable>
<UseRidGraph>true</UseRidGraph>
</PropertyGroup>

<ItemGroup Condition=" '$(IncludeWindowsSDKRefFrameworkReferences)' == 'True'">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
<RootNamespace>MauiApp._1.WinUI</RootNamespace>
<ApplicationManifest>app.manifest</ApplicationManifest>
<Platforms>x86;x64;ARM64</Platforms>
<RuntimeIdentifiers>win10-x86;win10-x64;win10-arm64</RuntimeIdentifiers>
<PublishProfile>win10-$(Platform).pubxml</PublishProfile>
<RuntimeIdentifiers>win-x86;win-x64;win-arm64</RuntimeIdentifiers>
<PublishProfile>win-$(Platform).pubxml</PublishProfile>
<UseWinUI>true</UseWinUI>
<EnableMsixTooling>true</EnableMsixTooling>
<Nullable>enable</Nullable>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
<PropertyGroup>
<PublishProtocol>FileSystem</PublishProtocol>
<Platform>ARM64</Platform>
<RuntimeIdentifier>win10-arm64</RuntimeIdentifier>
<RuntimeIdentifier>win-arm64</RuntimeIdentifier>
<PublishDir>bin\$(Configuration)\$(TargetFramework)\$(RuntimeIdentifier)\publish\</PublishDir>
<SelfContained>true</SelfContained>
<PublishSingleFile>False</PublishSingleFile>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
<PropertyGroup>
<PublishProtocol>FileSystem</PublishProtocol>
<Platform>x64</Platform>
<RuntimeIdentifier>win10-x64</RuntimeIdentifier>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<PublishDir>bin\$(Configuration)\$(TargetFramework)\$(RuntimeIdentifier)\publish\</PublishDir>
<SelfContained>true</SelfContained>
<PublishSingleFile>False</PublishSingleFile>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
<PropertyGroup>
<PublishProtocol>FileSystem</PublishProtocol>
<Platform>x86</Platform>
<RuntimeIdentifier>win10-x86</RuntimeIdentifier>
<RuntimeIdentifier>win-x86</RuntimeIdentifier>
<PublishDir>bin\$(Configuration)\$(TargetFramework)\$(RuntimeIdentifier)\publish\</PublishDir>
<SelfContained>true</SelfContained>
<PublishSingleFile>False</PublishSingleFile>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,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.");
Expand All @@ -87,7 +87,7 @@ public void BuildWindowsRidGraph(string id, bool useridgraph, string packageType
FileUtilities.ReplaceInFile(projectFile,
"<WindowsPackageType>None</WindowsPackageType>",
$"""
<UseRidGraph>{useridgraph}</UseRidGraph>
<UseRidGraph>{useRidGraph}</UseRidGraph>
<WindowsPackageType>{packageType}</WindowsPackageType>
""");

Expand All @@ -99,11 +99,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.");
Expand All @@ -121,7 +121,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");
Expand All @@ -138,11 +139,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.");
Expand All @@ -162,7 +163,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");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
<OutputType Condition="'$(OutputType)' == 'Exe'">WinExe</OutputType>
<!-- Generate ReadyToRun (AOT) when building for Release -->
<PublishReadyToRun Condition=" '$(PublishReadyToRun)' == '' and '$(Configuration)' == 'Release' and '$(OutputType)' == 'WinExe' ">true</PublishReadyToRun>
<!-- Use full RID graph: https://github.com/dotnet/docs/issues/36527 -->
<UseRidGraph Condition=" '$(UseRidGraph)' == '' and '$([MSBuild]::GetTargetPlatformIdentifier($(TargetFramework)))' == 'windows' ">true</UseRidGraph>
</PropertyGroup>

<!-- The Windows App SDK does not support AnyCPU without a RID, so make sure we pick the "best" one we can -->
Expand Down
Loading