From 614a5d1160e55878faf1f8383a4db9b1f18cc5f8 Mon Sep 17 00:00:00 2001 From: Martin Zikmund Date: Mon, 2 Dec 2024 16:32:38 +0100 Subject: [PATCH 1/4] fix: Allow building SamplesApp.Windows for .NET 9 --- src/SamplesApp/SamplesApp.Windows/SamplesApp.Windows.csproj | 4 +++- src/Uno.CrossTargetting.targets | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/SamplesApp/SamplesApp.Windows/SamplesApp.Windows.csproj b/src/SamplesApp/SamplesApp.Windows/SamplesApp.Windows.csproj index d4933a2d0290..627f95042861 100644 --- a/src/SamplesApp/SamplesApp.Windows/SamplesApp.Windows.csproj +++ b/src/SamplesApp/SamplesApp.Windows/SamplesApp.Windows.csproj @@ -1,7 +1,7 @@  WinExe - $(NetPrevious)-windows10.0.19041.0 + $(NetPrevious)-windows10.0.19041.0 10.0.17763.0 SamplesApp.Windows app.manifest @@ -19,6 +19,8 @@ 10.0.19041.53 + + diff --git a/src/Uno.CrossTargetting.targets b/src/Uno.CrossTargetting.targets index 08c09d9d52a7..5ddbb2fa0ceb 100644 --- a/src/Uno.CrossTargetting.targets +++ b/src/Uno.CrossTargetting.targets @@ -102,7 +102,7 @@ 21.0 - + $(DefineConstants);HAS_UNO $(DefineConstants);HAS_UNO_WINUI @@ -111,7 +111,7 @@ WinUI - + $(DefineConstants);HAS_INPUT_INJECTOR;WINDOWS_WINUI;HAS_RENDER_TARGET_BITMAP;HAS_COMPOSITION_API From 248784fdcf877bbae9ccc6e0169b64121211a2ae Mon Sep 17 00:00:00 2001 From: Martin Zikmund Date: Thu, 5 Dec 2024 11:37:03 +0100 Subject: [PATCH 2/4] ci: Adjust Samples app Windows target framework --- build/ci/.azure-devops-wasdk.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build/ci/.azure-devops-wasdk.yml b/build/ci/.azure-devops-wasdk.yml index 4ed80095eccd..3b832952dc8c 100644 --- a/build/ci/.azure-devops-wasdk.yml +++ b/build/ci/.azure-devops-wasdk.yml @@ -41,7 +41,7 @@ jobs: # --- # NOTE: The error says to specify a RuntimeIdentifier *OR* platform other than AnyCPU. # We already specify RuntimeIdentifier=win-x64 in the build below. Still, the error pops up. - msbuildArguments: /r /t:Publish /m /v:m /p:Configuration=Release /p:Platform=x64 /p:RuntimeIdentifier=win-x64 /p:BuildGraphics3DGLForWindows=true /p:GenerateAppxPackageOnBuild=true /detailedsummary /bl:$(build.artifactstagingdirectory)/build-wasdk.binlog + msbuildArguments: /r /t:Publish /m /v:m /p:Configuration=Release /p:Platform=x64 /p:RuntimeIdentifier=win-x64 /p:TargetFramework=net9.0-windows10.0.19041.0 /p:BuildGraphics3DGLForWindows=true /p:GenerateAppxPackageOnBuild=true /detailedsummary /bl:$(build.artifactstagingdirectory)/build-wasdk.binlog clean: false restoreNugetPackages: false logProjectEvents: false @@ -50,7 +50,7 @@ jobs: - task: CopyFiles@2 condition: always() inputs: - SourceFolder: $(build.sourcesdirectory)/src/SamplesApp/SamplesApp.Windows/bin/x64/Release/net8.0-windows10.0.19041.0/win-x64/AppPackages + SourceFolder: $(build.sourcesdirectory)/src/SamplesApp/SamplesApp.Windows/bin/x64/Release/net9.0-windows10.0.19041.0/win-x64/AppPackages Contents: '**' TargetFolder: $(build.artifactstagingdirectory) CleanTargetFolder: false From acd2fb57c2fd2fdde9a7a9d0a4f8d144971f48d9 Mon Sep 17 00:00:00 2001 From: Martin Zikmund Date: Thu, 5 Dec 2024 11:37:23 +0100 Subject: [PATCH 3/4] refactor: Add SamplesApp.Windows target frameworks variables --- Directory.Build.props | 4 ++++ src/SamplesApp/SamplesApp.Windows/SamplesApp.Windows.csproj | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Directory.Build.props b/Directory.Build.props index ba547fbef232..63821417f071 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -27,12 +27,16 @@ $(NetPrevious)-windows $(NetCurrent)-windows + $(NetPrevious)-windows10.0.19041.0 + $(NetCurrent)-windows10.0.19041.0 + $(NetPreviousNetCoreMobile);$(NetCurrentNetCoreMobile) $(NetPrevious)-android;$(NetCurrent)-android $(NetPreviousWpf);$(NetCurrentWpf) $(NetPrevious);$(NetCurrent) $(NetPrevious);$(NetCurrent) $(NetPrevious);$(NetCurrent) + $(NetPreviousWinAppSDK);$(NetCurrentWinAppSDK) $(NetPrevious) uap10.0.19041 diff --git a/src/SamplesApp/SamplesApp.Windows/SamplesApp.Windows.csproj b/src/SamplesApp/SamplesApp.Windows/SamplesApp.Windows.csproj index 627f95042861..6d074258eef5 100644 --- a/src/SamplesApp/SamplesApp.Windows/SamplesApp.Windows.csproj +++ b/src/SamplesApp/SamplesApp.Windows/SamplesApp.Windows.csproj @@ -1,7 +1,7 @@  WinExe - $(NetPrevious)-windows10.0.19041.0 + $(NetWinAppSDKPreviousAndCurrent) 10.0.17763.0 SamplesApp.Windows app.manifest From db73e5a6e788766514ab1411c803218046edbe8c Mon Sep 17 00:00:00 2001 From: Martin Zikmund Date: Thu, 5 Dec 2024 13:11:18 +0100 Subject: [PATCH 4/4] chore: Use .NET 8.0 for Windows app build in CI --- build/ci/.azure-devops-wasdk.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build/ci/.azure-devops-wasdk.yml b/build/ci/.azure-devops-wasdk.yml index 3b832952dc8c..453f7c953bf9 100644 --- a/build/ci/.azure-devops-wasdk.yml +++ b/build/ci/.azure-devops-wasdk.yml @@ -41,7 +41,7 @@ jobs: # --- # NOTE: The error says to specify a RuntimeIdentifier *OR* platform other than AnyCPU. # We already specify RuntimeIdentifier=win-x64 in the build below. Still, the error pops up. - msbuildArguments: /r /t:Publish /m /v:m /p:Configuration=Release /p:Platform=x64 /p:RuntimeIdentifier=win-x64 /p:TargetFramework=net9.0-windows10.0.19041.0 /p:BuildGraphics3DGLForWindows=true /p:GenerateAppxPackageOnBuild=true /detailedsummary /bl:$(build.artifactstagingdirectory)/build-wasdk.binlog + msbuildArguments: /r /t:Publish /m /v:m /p:Configuration=Release /p:Platform=x64 /p:RuntimeIdentifier=win-x64 /p:TargetFramework=net8.0-windows10.0.19041.0 /p:BuildGraphics3DGLForWindows=true /p:GenerateAppxPackageOnBuild=true /detailedsummary /bl:$(build.artifactstagingdirectory)/build-wasdk.binlog clean: false restoreNugetPackages: false logProjectEvents: false @@ -50,7 +50,7 @@ jobs: - task: CopyFiles@2 condition: always() inputs: - SourceFolder: $(build.sourcesdirectory)/src/SamplesApp/SamplesApp.Windows/bin/x64/Release/net9.0-windows10.0.19041.0/win-x64/AppPackages + SourceFolder: $(build.sourcesdirectory)/src/SamplesApp/SamplesApp.Windows/bin/x64/Release/net8.0-windows10.0.19041.0/win-x64/AppPackages Contents: '**' TargetFolder: $(build.artifactstagingdirectory) CleanTargetFolder: false