diff --git a/build/ci/.azure-devops-project-template-tests.yml b/build/ci/.azure-devops-project-template-tests.yml
index e6c51a766c25..5bb5d0e1d496 100644
--- a/build/ci/.azure-devops-project-template-tests.yml
+++ b/build/ci/.azure-devops-project-template-tests.yml
@@ -23,6 +23,8 @@ jobs:
TestGroup: '2'
group_3:
TestGroup: '3'
+ group_4:
+ TestGroup: '4'
steps:
- task: DownloadBuildArtifacts@0
@@ -73,6 +75,8 @@ jobs:
TestGroup: '2'
group_3:
TestGroup: '3'
+ group_4:
+ TestGroup: '4'
steps:
- task: DownloadBuildArtifacts@0
@@ -109,8 +113,6 @@ jobs:
pool: ${{ parameters.vmPoolLinux }}
- container: unoplatform/wasm-build:2.3
-
strategy:
matrix:
group_0:
@@ -136,6 +138,28 @@ jobs:
- template: templates/dotnet-install.yml
+ - bash: |
+ set -x
+
+ sudo snap install core24
+ sudo snap install lxd
+ sudo snap install multipass
+ sudo snap install snapcraft --classic
+
+ export PATH=$PATH:/snap/bin
+ sudo chown root:root /
+ sudo /snap/bin/lxd.migrate -yes
+ sudo /snap/bin/lxd waitready
+ sudo /snap/bin/lxd init --auto
+
+ echo Adding $USER to group lxd
+ sudo usermod --append --groups lxd $USER
+
+ sudo apt install iptables
+ sudo iptables -I DOCKER-USER -i lxdbr0 -j ACCEPT
+ sudo iptables -I DOCKER-USER -o lxdbr0 -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
+ displayName: Setup Snapcraft
+
- pwsh: build/test-scripts/run-net7-template-linux.ps1 -TestGroup "$(TestGroup)"
displayName: Run Project Templates Tests
env:
diff --git a/build/ci/templates/dotnet-mobile-install-linux.yml b/build/ci/templates/dotnet-mobile-install-linux.yml
index 4e5d6525c58f..869700aa2261 100644
--- a/build/ci/templates/dotnet-mobile-install-linux.yml
+++ b/build/ci/templates/dotnet-mobile-install-linux.yml
@@ -12,11 +12,12 @@ steps:
sudo apt-get install apt-transport-https
sudo apt-get update
sudo apt-get install -y msopenjdk-11
+ sudo update-java-alternatives --set msopenjdk-11-amd64
displayName: Install OpenJDK 11
retryCountOnTaskFailure: 3
- bash: |
dotnet tool update --global uno.check --version ${{ parameters.UnoCheck_Version }} --add-source https://api.nuget.org/v3/index.json
- uno-check --ci --non-interactive --fix --skip gtk3 --skip androidsdk --pre-major
+ uno-check --verbose --ci --non-interactive --fix --skip gtk3 --skip androidsdk --pre-major
displayName: Install .NET Workloads
retryCountOnTaskFailure: 3
diff --git a/build/test-scripts/run-net7-template-linux.ps1 b/build/test-scripts/run-net7-template-linux.ps1
index ecfff12045fa..4d92516b0629 100644
--- a/build/test-scripts/run-net7-template-linux.ps1
+++ b/build/test-scripts/run-net7-template-linux.ps1
@@ -37,48 +37,52 @@ Get-ChildItem -Recurse -Filter global.json | ForEach-Object {
$projects =
@(
# 5.0 and earlier
- @(0, "UnoAppWinUILinuxValidation/UnoAppWinUILinuxValidation.Wasm/UnoAppWinUILinuxValidation.Wasm.csproj", ""),
- @(0, "UnoAppWinUILinuxValidation/UnoAppWinUILinuxValidation.Skia.Gtk/UnoAppWinUILinuxValidation.Skia.Gtk.csproj", ""),
- @(0, "UnoAppWinUILinuxValidation/UnoAppWinUILinuxValidation.Skia.Linux.FrameBuffer/UnoAppWinUILinuxValidation.Skia.Linux.FrameBuffer.csproj", ""),
+ @(0, "UnoAppWinUILinuxValidation/UnoAppWinUILinuxValidation.Wasm/UnoAppWinUILinuxValidation.Wasm.csproj", @(), @()),
+ @(0, "UnoAppWinUILinuxValidation/UnoAppWinUILinuxValidation.Skia.Gtk/UnoAppWinUILinuxValidation.Skia.Gtk.csproj", @(), @()),
+ @(0, "UnoAppWinUILinuxValidation/UnoAppWinUILinuxValidation.Skia.Linux.FrameBuffer/UnoAppWinUILinuxValidation.Skia.Linux.FrameBuffer.csproj", @(), @()),
# 5.1 Blank
- @(0, "5.1/uno51blank/uno51blank.Skia.Gtk/uno51blank.Skia.Gtk.csproj", ""),
- @(0, "5.1/uno51blank/uno51blank.Skia.Linux.FrameBuffer/uno51blank.Skia.Linux.FrameBuffer.csproj", ""),
- @(0, "5.1/uno51blank/uno51blank.Skia.WPF/uno51blank.Skia.WPF.csproj", ""),
- @(0, "5.1/uno51blank/uno51blank.Wasm/uno51blank.Wasm.csproj", ""),
+ @(0, "5.1/uno51blank/uno51blank.Skia.Gtk/uno51blank.Skia.Gtk.csproj", @(), @()),
+ @(0, "5.1/uno51blank/uno51blank.Skia.Linux.FrameBuffer/uno51blank.Skia.Linux.FrameBuffer.csproj", @(), @()),
+ @(0, "5.1/uno51blank/uno51blank.Skia.WPF/uno51blank.Skia.WPF.csproj", @(), @()),
+ @(0, "5.1/uno51blank/uno51blank.Wasm/uno51blank.Wasm.csproj", @(), @()),
# 5.1 Recommended
- @(0, "5.1/uno51recommended/uno51recommended.Skia.Gtk/uno51recommended.Skia.Gtk.csproj", ""),
- @(0, "5.1/uno51recommended/uno51recommended.Skia.Linux.FrameBuffer/uno51recommended.Skia.Linux.FrameBuffer.csproj", ""),
- @(0, "5.1/uno51recommended/uno51recommended.Skia.WPF/uno51recommended.Skia.WPF.csproj", ""),
- @(0, "5.1/uno51recommended/uno51recommended.Wasm/uno51recommended.Wasm.csproj", ""),
- @(0, "5.1/uno51recommended/uno51recommended.Server/uno51recommended.Server.csproj", ""),
- @(0, "5.1/uno51recommended/uno51recommended.Tests/uno51recommended.Tests.csproj", ""),
- @(0, "5.1/uno51recommended/uno51recommended.UITests/uno51recommended.UITests.csproj", ""),
+ @(0, "5.1/uno51recommended/uno51recommended.Skia.Gtk/uno51recommended.Skia.Gtk.csproj", @(), @()),
+ @(0, "5.1/uno51recommended/uno51recommended.Skia.Linux.FrameBuffer/uno51recommended.Skia.Linux.FrameBuffer.csproj", @(), @()),
+ @(0, "5.1/uno51recommended/uno51recommended.Skia.WPF/uno51recommended.Skia.WPF.csproj", @(), @()),
+ @(0, "5.1/uno51recommended/uno51recommended.Wasm/uno51recommended.Wasm.csproj", @(), @()),
+ @(0, "5.1/uno51recommended/uno51recommended.Server/uno51recommended.Server.csproj", @(), @()),
+ @(0, "5.1/uno51recommended/uno51recommended.Tests/uno51recommended.Tests.csproj", @(), @()),
+ @(0, "5.1/uno51recommended/uno51recommended.UITests/uno51recommended.UITests.csproj", @(), @()),
# 5.2 Blank
- @(1, "5.2/uno52blank/uno52blank/uno52blank.csproj", ""),
+ @(1, "5.2/uno52blank/uno52blank/uno52blank.csproj", @(), @()),
# 5.2 Blank SkiaSharp 3
- @(1, "5.2/uno52blank/uno52blank/uno52blank.csproj", "-p:SkiaSharpVersion=3.0.0-preview.3.1"),
+ @(1, "5.2/uno52blank/uno52blank/uno52blank.csproj", @("-p:SkiaSharpVersion=3.0.0-preview.3.1"), @()),
# 5.2 Blank GLCanvas
- @(1, "5.2/uno52blank/uno52blank/uno52blank.csproj", "-p:UnoFeatures=GLCanvas"),
+ @(1, "5.2/uno52blank/uno52blank/uno52blank.csproj", @("-p:UnoFeatures=GLCanvas"), @()),
# 5.2 Uno Lib
- @(1, "5.2/uno52Lib/uno52Lib.csproj", ""),
+ @(1, "5.2/uno52Lib/uno52Lib.csproj", @(), @()),
# 5.2 Uno NuGet Lib
- @(1, "5.2/uno52NuGetLib/uno52NuGetLib.csproj", ""),
+ @(1, "5.2/uno52NuGetLib/uno52NuGetLib.csproj", @(), @()),
# 5.2 Uno SingleProject Lib
- @(1, "5.2/uno52SingleProjectLib/uno52SingleProjectLib.csproj", ""),
+ @(1, "5.2/uno52SingleProjectLib/uno52SingleProjectLib.csproj", @(), @()),
# 5.2 Uno App with Library reference
- @(1, "5.2/uno52AppWithLib/uno52AppWithLib/uno52AppWithLib.csproj", ""),
+ @(1, "5.2/uno52AppWithLib/uno52AppWithLib/uno52AppWithLib.csproj", @(), @()),
# 5.3 Blank with net9
- @(2, "5.3/uno53net9blank/uno53net9blank/uno53net9blank.csproj", "")
+ @(2, "5.3/uno53net9blank/uno53net9blank/uno53net9blank.csproj", @(), @())
+
+ # 5.3 blank publish testing
+ # Disabled for LXD setup issues
+ # @(2, "5.3/uno53net9blank/uno53net9blank/uno53net9blank.csproj", @("-f:net9.0-desktop", "-p:SelfContained=true", "-p:PackageFormat=snap"), @("Publish"))
## Note for contributors
##
@@ -90,7 +94,10 @@ for($i = 0; $i -lt $projects.Length; $i++)
{
$projectTestGroup=$projects[$i][0];
$projectPath=$projects[$i][1];
- $projectOptions=$projects[$i][2];
+ $projectParameters=$projects[$i][2];
+
+ $buildOptions=$projects[$i][3];
+ $usePublish = $buildOptions -contains "Publish"
if ($TestGroup -ne $projectTestGroup)
{
@@ -98,14 +105,19 @@ for($i = 0; $i -lt $projects.Length; $i++)
continue
}
- Write-Host "Building Debug $projectPath with $projectOptions"
- dotnet build $debug "$projectPath" $projectOptions -bl:binlogs/$projectPath/debug.binlog
- Assert-ExitCodeIsZero
+ if(!$usePublish)
+ {
+ Write-Host "Building Debug $projectPath with $projectParameters"
+ dotnet build $debug "$projectPath" $projectParameters -bl:binlogs/$projectPath/$i/debug.binlog
+ Assert-ExitCodeIsZero
+
+ dotnet clean $debug "$projectPath"
+ }
- dotnet clean $debug "$projectPath"
+ $dotnetCommand = $usePublish ? "publish" : "build"
- Write-Host "Building Release $projectPath with $projectOptions"
- dotnet build $release "$projectPath" $projectOptions -bl:binlogs/$projectPath/release.binlog
+ Write-Host "Building Release $projectPath with $projectParameters"
+ dotnet $dotnetCommand $release "$projectPath" $projectParameters -bl:binlogs/$projectPath/$i/release.binlog
Assert-ExitCodeIsZero
dotnet clean $release "$projectPath"
diff --git a/build/test-scripts/run-netcore-mobile-template-tests.ps1 b/build/test-scripts/run-netcore-mobile-template-tests.ps1
index 858cf4ef3039..f5321ab109e4 100644
--- a/build/test-scripts/run-netcore-mobile-template-tests.ps1
+++ b/build/test-scripts/run-netcore-mobile-template-tests.ps1
@@ -229,117 +229,120 @@ $projects =
#
# 5.1 Blank
#
- @(1, "5.1/uno51blank/uno51blank.Mobile/uno51blank.Mobile.csproj", "", $true, $true),
- @(1, "5.1/uno51blank/uno51blank.Skia.Gtk/uno51blank.Skia.Gtk.csproj", "", $true, $true),
- @(1, "5.1/uno51blank/uno51blank.Skia.Linux.FrameBuffer/uno51blank.Skia.Linux.FrameBuffer.csproj", "", $true, $true),
- @(1, "5.1/uno51blank/uno51blank.Skia.Wpf/uno51blank.Skia.Wpf.csproj", "", $true, $false),
- @(1, "5.1/uno51blank/uno51blank.Wasm/uno51blank.Wasm.csproj", "", $true, $false),
+ @(1, "5.1/uno51blank/uno51blank.Mobile/uno51blank.Mobile.csproj", "", @("macOS", "NetCore")),
+ @(1, "5.1/uno51blank/uno51blank.Skia.Gtk/uno51blank.Skia.Gtk.csproj", "", @("macOS", "NetCore")),
+ @(1, "5.1/uno51blank/uno51blank.Skia.Linux.FrameBuffer/uno51blank.Skia.Linux.FrameBuffer.csproj", "", @("macOS", "NetCore")),
+ @(1, "5.1/uno51blank/uno51blank.Skia.Wpf/uno51blank.Skia.Wpf.csproj", "", @("NetCore")),
+ @(1, "5.1/uno51blank/uno51blank.Wasm/uno51blank.Wasm.csproj", "", @("NetCore")),
# disabled on windows until android 35 is supported in the installed VS instance
- # @("5.1/uno51blank/uno51blank.Windows/uno51blank.Windows.csproj", "", $false, $false),
+ # @("5.1/uno51blank/uno51blank.Windows/uno51blank.Windows.csproj", "", @()),
#
# 5.1 Recommended
#
- @(1, "5.1/uno51recommended/uno51recommended.Mobile/uno51recommended.Mobile.csproj", "", $true, $true),
+ @(1, "5.1/uno51recommended/uno51recommended.Mobile/uno51recommended.Mobile.csproj", "", @("macOS", "NetCore")),
# disabled on windows until android 35 is supported in the installed VS instance
- # @("5.1/uno51recommended/uno51recommended.Windows/uno51recommended.Windows.csproj", "", $false, $false),
+ # @("5.1/uno51recommended/uno51recommended.Windows/uno51recommended.Windows.csproj", "", @()),
- @(1, "5.1/uno51recommended/uno51recommended.Skia.Gtk/uno51recommended.Skia.Gtk.csproj", "", $true, $true),
- @(1, "5.1/uno51recommended/uno51recommended.Skia.Linux.FrameBuffer/uno51recommended.Skia.Linux.FrameBuffer.csproj", "", $true, $true),
- @(1, "5.1/uno51recommended/uno51recommended.Skia.Wpf/uno51recommended.Skia.Wpf.csproj", "", $true, $false),
- @(1, "5.1/uno51recommended/uno51recommended.Wasm/uno51recommended.Wasm.csproj", "", $true, $false),
- @(1, "5.1/uno51recommended/uno51recommended.Server/uno51recommended.Server.csproj", "", $true, $false),
- @(1, "5.1/uno51recommended/uno51recommended.Tests/uno51recommended.Tests.csproj", "", $true, $true),
- @(1, "5.1/uno51recommended/uno51recommended.UITests/uno51recommended.UITests.csproj", "", $true, $true),
+ @(1, "5.1/uno51recommended/uno51recommended.Skia.Gtk/uno51recommended.Skia.Gtk.csproj", "", @("macOS", "NetCore")),
+ @(1, "5.1/uno51recommended/uno51recommended.Skia.Linux.FrameBuffer/uno51recommended.Skia.Linux.FrameBuffer.csproj", "", @("macOS", "NetCore")),
+ @(1, "5.1/uno51recommended/uno51recommended.Skia.Wpf/uno51recommended.Skia.Wpf.csproj", "", @("NetCore")),
+ @(1, "5.1/uno51recommended/uno51recommended.Wasm/uno51recommended.Wasm.csproj", "", @("NetCore")),
+ @(1, "5.1/uno51recommended/uno51recommended.Server/uno51recommended.Server.csproj", "", @("NetCore")),
+ @(1, "5.1/uno51recommended/uno51recommended.Tests/uno51recommended.Tests.csproj", "", @("macOS", "NetCore")),
+ @(1, "5.1/uno51recommended/uno51recommended.UITests/uno51recommended.UITests.csproj", "", @("macOS", "NetCore")),
#
# 5.2 Blank
#
- @(1, "5.2/uno52blank/uno52blank/uno52blank.csproj", @("-f", "net8.0"), $true, $true),
- @(1, "5.2/uno52blank/uno52blank/uno52blank.csproj", @("-f", "net8.0", $sdkFeatures), $true, $true),
- @(1, "5.2/uno52blank/uno52blank/uno52blank.csproj", @("-f", "net8.0-browserwasm"), $true, $true),
- @(1, "5.2/uno52blank/uno52blank/uno52blank.csproj", @("-f", "net8.0-browserwasm", $sdkFeatures), $true, $true),
- @(1, "5.2/uno52blank/uno52blank/uno52blank.csproj", @("-f", "net8.0-ios"), $true, $true),
- @(1, "5.2/uno52blank/uno52blank/uno52blank.csproj", @("-f", "net8.0-ios", $sdkFeatures), $true, $true),
- @(1, "5.2/uno52blank/uno52blank/uno52blank.csproj", @("-f", "net8.0-android"), $true, $true),
- @(1, "5.2/uno52blank/uno52blank/uno52blank.csproj", @("-f", "net8.0-android", $sdkFeatures), $true, $true),
- @(1, "5.2/uno52blank/uno52blank/uno52blank.csproj", @("-f", "net8.0-maccatalyst"), $true, $true),
- @(1, "5.2/uno52blank/uno52blank/uno52blank.csproj", @("-f", "net8.0-maccatalyst", $sdkFeatures), $true, $true),
- @(1, "5.2/uno52blank/uno52blank/uno52blank.csproj", @("-f", "net8.0-desktop"), $true, $true),
- @(1, "5.2/uno52blank/uno52blank/uno52blank.csproj", @("-f", "net8.0-desktop", $sdkFeatures), $true, $true),
+ @(1, "5.2/uno52blank/uno52blank/uno52blank.csproj", @("-f", "net8.0"), @("macOS", "NetCore")),
+ @(1, "5.2/uno52blank/uno52blank/uno52blank.csproj", @("-f", "net8.0", $sdkFeatures), @("macOS", "NetCore")),
+ @(1, "5.2/uno52blank/uno52blank/uno52blank.csproj", @("-f", "net8.0-browserwasm"), @("macOS", "NetCore")),
+ @(1, "5.2/uno52blank/uno52blank/uno52blank.csproj", @("-f", "net8.0-browserwasm", $sdkFeatures), @("macOS", "NetCore")),
+ @(1, "5.2/uno52blank/uno52blank/uno52blank.csproj", @("-f", "net8.0-ios"), @("macOS", "NetCore")),
+ @(1, "5.2/uno52blank/uno52blank/uno52blank.csproj", @("-f", "net8.0-ios", $sdkFeatures), @("macOS", "NetCore")),
+ @(1, "5.2/uno52blank/uno52blank/uno52blank.csproj", @("-f", "net8.0-android"), @("macOS", "NetCore")),
+ @(1, "5.2/uno52blank/uno52blank/uno52blank.csproj", @("-f", "net8.0-android", $sdkFeatures), @("macOS", "NetCore")),
+ @(1, "5.2/uno52blank/uno52blank/uno52blank.csproj", @("-f", "net8.0-maccatalyst"), @("macOS", "NetCore")),
+ @(1, "5.2/uno52blank/uno52blank/uno52blank.csproj", @("-f", "net8.0-maccatalyst", $sdkFeatures), @("macOS", "NetCore")),
+ @(1, "5.2/uno52blank/uno52blank/uno52blank.csproj", @("-f", "net8.0-desktop"), @("macOS", "NetCore")),
+ @(1, "5.2/uno52blank/uno52blank/uno52blank.csproj", @("-f", "net8.0-desktop", $sdkFeatures), @("macOS", "NetCore")),
# Default mode for the template is WindowsAppSDKSelfContained=true, which requires specifying a target platform.
- @(2, "5.2/uno52blank/uno52blank/uno52blank.csproj", @("-p:Platform=x86" , "-p:TargetFramework=net8.0-windows10.0.19041"), $false, $false),
- @(2, "5.2/uno52blank/uno52blank/uno52blank.csproj", @("-p:Platform=arm64" , "-p:TargetFramework=net8.0-windows10.0.19041"), $false, $false),
+ @(2, "5.2/uno52blank/uno52blank/uno52blank.csproj", @("-p:Platform=x86" , "-p:TargetFramework=net8.0-windows10.0.19041"), @()),
+ @(2, "5.2/uno52blank/uno52blank/uno52blank.csproj", @("-p:Platform=arm64" , "-p:TargetFramework=net8.0-windows10.0.19041"), @()),
# Ensure that default without platform builds properly
- @(2, "5.2/uno52blank/uno52blank/uno52blank.csproj", @("-p:TargetFramework=net8.0-windows10.0.19041"), $false, $false),
+ @(2, "5.2/uno52blank/uno52blank/uno52blank.csproj", @("-p:TargetFramework=net8.0-windows10.0.19041"), @()),
# Validate building inside VS
- @(2, "5.2/uno52blank/uno52blank/uno52blank.csproj", @("-p:BuildingInsideVisualStudio=true"), $true, $false),
- @(2, "5.2/uno52blank/uno52blank/uno52blank.csproj", @("-p:BuildingInsideVisualStudio=true", "-p:_UnoSelectedTargetFramework=net8.0-desktop"), $true, $false),
- @(2, "5.2/uno52blank/uno52blank/uno52blank.csproj", @("-p:BuildingInsideVisualStudio=true", "-p:_UnoSelectedTargetFramework=net8.0-windows10.0.19041"), $false, $false),
+ @(2, "5.2/uno52blank/uno52blank/uno52blank.csproj", @("-p:BuildingInsideVisualStudio=true"), @("NetCore")),
+ @(2, "5.2/uno52blank/uno52blank/uno52blank.csproj", @("-p:BuildingInsideVisualStudio=true", "-p:_UnoSelectedTargetFramework=net8.0-desktop"), @("NetCore")),
+ @(2, "5.2/uno52blank/uno52blank/uno52blank.csproj", @("-p:BuildingInsideVisualStudio=true", "-p:_UnoSelectedTargetFramework=net8.0-windows10.0.19041"), @()),
#
# 5.2 Uno Lib
#
- @(2, "5.2/uno52Lib/uno52Lib.csproj", @("-f", "net8.0"), $true, $true),
- @(2, "5.2/uno52Lib/uno52Lib.csproj", @("-f", "net8.0-browserwasm"), $true, $true),
- @(2, "5.2/uno52Lib/uno52Lib.csproj", @("-f", "net8.0-ios"), $true, $true),
- @(2, "5.2/uno52Lib/uno52Lib.csproj", @("-f", "net8.0-android"), $true, $true),
- @(2, "5.2/uno52Lib/uno52Lib.csproj", @("-f", "net8.0-maccatalyst"), $true, $true),
- @(2, "5.2/uno52Lib/uno52Lib.csproj", @("-f", "net8.0-desktop"), $true, $true),
+ @(2, "5.2/uno52Lib/uno52Lib.csproj", @("-f", "net8.0"), @("macOS", "NetCore")),
+ @(2, "5.2/uno52Lib/uno52Lib.csproj", @("-f", "net8.0-browserwasm"), @("macOS", "NetCore")),
+ @(2, "5.2/uno52Lib/uno52Lib.csproj", @("-f", "net8.0-ios"), @("macOS", "NetCore")),
+ @(2, "5.2/uno52Lib/uno52Lib.csproj", @("-f", "net8.0-android"), @("macOS", "NetCore")),
+ @(2, "5.2/uno52Lib/uno52Lib.csproj", @("-f", "net8.0-maccatalyst"), @("macOS", "NetCore")),
+ @(2, "5.2/uno52Lib/uno52Lib.csproj", @("-f", "net8.0-desktop"), @("macOS", "NetCore")),
- @(2, "5.2/uno52Lib/uno52Lib.csproj", @("-f", "net8.0-browserwasm", "-p:ImplicitUsings=disable"), $true, $true),
- @(2, "5.2/uno52Lib/uno52Lib.csproj", @("-f", "net8.0-desktop", "-p:ImplicitUsings=disable"), $true, $true),
+ @(2, "5.2/uno52Lib/uno52Lib.csproj", @("-f", "net8.0-browserwasm", "-p:ImplicitUsings=disable"), @("macOS", "NetCore")),
+ @(2, "5.2/uno52Lib/uno52Lib.csproj", @("-f", "net8.0-desktop", "-p:ImplicitUsings=disable"), @("macOS", "NetCore")),
#
# 5.2 Uno NuGet Lib
#
- @(2, "5.2/uno52NuGetLib/uno52NuGetLib.csproj", @(), $true, $true),
+ @(2, "5.2/uno52NuGetLib/uno52NuGetLib.csproj", @(), @("macOS", "NetCore")),
# Default mode for the template is WindowsAppSDKSelfContained=true, which requires specifying a target platform.
- @(2, "5.2/uno52Lib/uno52Lib.csproj", @("-p:Platform=x86" , "-p:TargetFramework=net8.0-windows10.0.19041"), $false, $true),
+ @(2, "5.2/uno52Lib/uno52Lib.csproj", @("-p:Platform=x86" , "-p:TargetFramework=net8.0-windows10.0.19041"), @("macOS")),
#
# 5.2 Uno SingleProject Lib
#
- @(2, "5.2/uno52SingleProjectLib/uno52SingleProjectLib.csproj", @("-f", "net8.0"), $true, $true),
- @(2, "5.2/uno52SingleProjectLib/uno52SingleProjectLib.csproj", @("-f", "net8.0-browserwasm"), $true, $true),
- @(2, "5.2/uno52SingleProjectLib/uno52SingleProjectLib.csproj", @("-f", "net8.0-ios"), $true, $true),
- @(2, "5.2/uno52SingleProjectLib/uno52SingleProjectLib.csproj", @("-f", "net8.0-android"), $true, $true),
- @(2, "5.2/uno52SingleProjectLib/uno52SingleProjectLib.csproj", @("-f", "net8.0-maccatalyst"), $true, $true),
- @(2, "5.2/uno52SingleProjectLib/uno52SingleProjectLib.csproj", @("-f", "net8.0-desktop"), $true, $true),
+ @(2, "5.2/uno52SingleProjectLib/uno52SingleProjectLib.csproj", @("-f", "net8.0"), @("macOS", "NetCore")),
+ @(2, "5.2/uno52SingleProjectLib/uno52SingleProjectLib.csproj", @("-f", "net8.0-browserwasm"), @("macOS", "NetCore")),
+ @(2, "5.2/uno52SingleProjectLib/uno52SingleProjectLib.csproj", @("-f", "net8.0-ios"), @("macOS", "NetCore")),
+ @(2, "5.2/uno52SingleProjectLib/uno52SingleProjectLib.csproj", @("-f", "net8.0-android"), @("macOS", "NetCore")),
+ @(2, "5.2/uno52SingleProjectLib/uno52SingleProjectLib.csproj", @("-f", "net8.0-maccatalyst"), @("macOS", "NetCore")),
+ @(2, "5.2/uno52SingleProjectLib/uno52SingleProjectLib.csproj", @("-f", "net8.0-desktop"), @("macOS", "NetCore")),
# Default mode for the template is WindowsAppSDKSelfContained=true, which requires specifying a target platform.
- @(2, "5.2/uno52SingleProjectLib/uno52SingleProjectLib.csproj", @("-p:Platform=x86" , "-p:TargetFramework=net8.0-windows10.0.19041"), $false, $false),
+ @(2, "5.2/uno52SingleProjectLib/uno52SingleProjectLib.csproj", @("-p:Platform=x86" , "-p:TargetFramework=net8.0-windows10.0.19041"), @()),
# 5.2 Uno App with Library reference
- @(2, "5.2/uno52AppWithLib/uno52AppWithLib/uno52AppWithLib.csproj", @("-f", "net8.0"), $true, $true),
- @(2, "5.2/uno52AppWithLib/uno52AppWithLib/uno52AppWithLib.csproj", @("-f", "net8.0-browserwasm"), $true, $true),
- @(2, "5.2/uno52AppWithLib/uno52AppWithLib/uno52AppWithLib.csproj", @("-f", "net8.0-ios"), $true, $true),
- @(2, "5.2/uno52AppWithLib/uno52AppWithLib/uno52AppWithLib.csproj", @("-f", "net8.0-android"), $true, $true),
- @(2, "5.2/uno52AppWithLib/uno52AppWithLib/uno52AppWithLib.csproj", @("-f", "net8.0-maccatalyst"), $true, $true),
- @(2, "5.2/uno52AppWithLib/uno52AppWithLib/uno52AppWithLib.csproj", @("-f", "net8.0-desktop"), $true, $true),
+ @(2, "5.2/uno52AppWithLib/uno52AppWithLib/uno52AppWithLib.csproj", @("-f", "net8.0"), @("macOS", "NetCore")),
+ @(2, "5.2/uno52AppWithLib/uno52AppWithLib/uno52AppWithLib.csproj", @("-f", "net8.0-browserwasm"), @("macOS", "NetCore")),
+ @(2, "5.2/uno52AppWithLib/uno52AppWithLib/uno52AppWithLib.csproj", @("-f", "net8.0-ios"), @("macOS", "NetCore")),
+ @(2, "5.2/uno52AppWithLib/uno52AppWithLib/uno52AppWithLib.csproj", @("-f", "net8.0-android"), @("macOS", "NetCore")),
+ @(2, "5.2/uno52AppWithLib/uno52AppWithLib/uno52AppWithLib.csproj", @("-f", "net8.0-maccatalyst"), @("macOS", "NetCore")),
+ @(2, "5.2/uno52AppWithLib/uno52AppWithLib/uno52AppWithLib.csproj", @("-f", "net8.0-desktop"), @("macOS", "NetCore")),
+
+ # 5.3 Uno App with net9
+ @(3, "5.3/uno53net9blank/uno53net9blank/uno53net9blank.csproj", @("-f", "net9.0"), @("macOS", "NetCore")),
+ @(3, "5.3/uno53net9blank/uno53net9blank/uno53net9blank.csproj", @("-f", "net9.0", $sdkFeatures), @("macOS", "NetCore")),
+ @(3, "5.3/uno53net9blank/uno53net9blank/uno53net9blank.csproj", @("-f", "net9.0-browserwasm"), @("macOS", "NetCore")),
+ @(3, "5.3/uno53net9blank/uno53net9blank/uno53net9blank.csproj", @("-f", "net9.0-browserwasm", $sdkFeatures), @("macOS", "NetCore")),
+ @(3, "5.3/uno53net9blank/uno53net9blank/uno53net9blank.csproj", @("-f", "net9.0-ios"), @("macOS", "NetCore")),
+ @(3, "5.3/uno53net9blank/uno53net9blank/uno53net9blank.csproj", @("-f", "net9.0-ios", $sdkFeatures), @("macOS", "NetCore")),
+ @(3, "5.3/uno53net9blank/uno53net9blank/uno53net9blank.csproj", @("-f", "net9.0-android"), @("macOS", "NetCore")),
+ @(3, "5.3/uno53net9blank/uno53net9blank/uno53net9blank.csproj", @("-f", "net9.0-android", $sdkFeatures), @("macOS", "NetCore")),
+ @(3, "5.3/uno53net9blank/uno53net9blank/uno53net9blank.csproj", @("-f", "net9.0-maccatalyst"), @("macOS", "NetCore")),
+ @(3, "5.3/uno53net9blank/uno53net9blank/uno53net9blank.csproj", @("-f", "net9.0-maccatalyst", $sdkFeatures), @("macOS", "NetCore")),
+ @(3, "5.3/uno53net9blank/uno53net9blank/uno53net9blank.csproj", @("-f", "net9.0-desktop"), @("macOS", "NetCore")),
+ @(3, "5.3/uno53net9blank/uno53net9blank/uno53net9blank.csproj", @("-f", "net9.0-desktop", $sdkFeatures), @("macOS", "NetCore")),
# Default mode for the template is WindowsAppSDKSelfContained=true, which requires specifying a target platform.
- @(2, "5.2/uno52AppWithLib/uno52AppWithLib/uno52AppWithLib.csproj", @("-p:Platform=x86" , "-p:TargetFramework=net8.0-windows10.0.19041"), $false, $false),
+ @(4, "5.2/uno52AppWithLib/uno52AppWithLib/uno52AppWithLib.csproj", @("-p:Platform=x86" , "-p:TargetFramework=net8.0-windows10.0.19041"), @()),
- # 5.3 Uno App with net9
- @(3, "5.3/uno53net9blank/uno53net9blank/uno53net9blank.csproj", @("-f", "net9.0"), $true, $true),
- @(3, "5.3/uno53net9blank/uno53net9blank/uno53net9blank.csproj", @("-f", "net9.0", $sdkFeatures), $true, $true),
- @(3, "5.3/uno53net9blank/uno53net9blank/uno53net9blank.csproj", @("-f", "net9.0-browserwasm"), $true, $true),
- @(3, "5.3/uno53net9blank/uno53net9blank/uno53net9blank.csproj", @("-f", "net9.0-browserwasm", $sdkFeatures), $true, $true),
- @(3, "5.3/uno53net9blank/uno53net9blank/uno53net9blank.csproj", @("-f", "net9.0-ios"), $true, $true),
- @(3, "5.3/uno53net9blank/uno53net9blank/uno53net9blank.csproj", @("-f", "net9.0-ios", $sdkFeatures), $true, $true),
- @(3, "5.3/uno53net9blank/uno53net9blank/uno53net9blank.csproj", @("-f", "net9.0-android"), $true, $true),
- @(3, "5.3/uno53net9blank/uno53net9blank/uno53net9blank.csproj", @("-f", "net9.0-android", $sdkFeatures), $true, $true),
- @(3, "5.3/uno53net9blank/uno53net9blank/uno53net9blank.csproj", @("-f", "net9.0-maccatalyst"), $true, $true),
- @(3, "5.3/uno53net9blank/uno53net9blank/uno53net9blank.csproj", @("-f", "net9.0-maccatalyst", $sdkFeatures), $true, $true),
- @(3, "5.3/uno53net9blank/uno53net9blank/uno53net9blank.csproj", @("-f", "net9.0-desktop"), $true, $true),
- @(3, "5.3/uno53net9blank/uno53net9blank/uno53net9blank.csproj", @("-f", "net9.0-desktop", $sdkFeatures), $true, $true)
+ # Publishing validation
+ @(4, "5.3/uno53net9blank/uno53net9blank/uno53net9blank.csproj", @("-f", "net9.0-desktop", "-p:PackageFormat=app"), @("OnlyMacOS", "NetCore", "Publish"))
## Note for contributors
##
@@ -352,8 +355,11 @@ for($i = 0; $i -lt $projects.Length; $i++)
$projectTestGroup=$projects[$i][0];
$projectPath=$projects[$i][1];
$projectOptions=$projects[$i][2];
- $buildWithNetCore=$projects[$i][3];
- $runOnMacOS=$projects[$i][4];
+ $buildOptions=$projects[$i][3];
+ $runOnMacOS = $buildOptions -contains "macOS"
+ $runOnlyOnMacOS = $buildOptions -contains "OnlyMacOS"
+ $buildWithNetCore = $buildOptions -contains "NetCore"
+ $usePublish = $buildOptions -contains "Publish"
if ($TestGroup -ne $projectTestGroup)
{
@@ -361,25 +367,36 @@ for($i = 0; $i -lt $projects.Length; $i++)
continue
}
- if ($IsMacOS -and -not $runOnMacOS)
+ if ($IsMacOS -and -not $runOnMacOS -and -not $runOnlyOnMacOS)
{
Write-Host "Skipping on macOS: $projectPath with $projectOptions"
continue
}
+ if (!$IsMacOS -and $runOnlyOnMacOS)
+ {
+ Write-Host "Skipping on Windows: $projectPath with $projectOptions"
+ continue
+ }
+
if ($buildWithNetCore)
{
- Write-Host "NetCore Building Debug $projectPath with $projectOptions"
- dotnet build $debug "$projectPath" $projectOptions -bl:binlogs/$projectPath/$i/debug/msbuild.binlog
- Assert-ExitCodeIsZero
+ if(!$usePublish)
+ {
+ Write-Host "NetCore Building Debug $projectPath with $projectOptions"
+ dotnet build $debug "$projectPath" $projectOptions -bl:binlogs/$projectPath/$i/debug/msbuild.binlog
+ Assert-ExitCodeIsZero
+
+ dotnet clean $debug "$projectPath"
+ }
- dotnet clean $debug "$projectPath"
+ $dotnetCommand = $usePublish ? "publish" : "build"
Write-Host "NetCore Building Release $projectPath with $projectOptions"
- dotnet build $release "$projectPath" $projectOptions -bl:binlogs/$projectPath/$i/release/msbuild.binlog
+ dotnet $dotnetCommand $release "$projectPath" $projectOptions -bl:binlogs/$projectPath/$i/release/msbuild.binlog
Assert-ExitCodeIsZero
- dotnet clean $release "$projectPath"
+ dotnet clean $release $projectOptions "$projectPath"
}
else
{
@@ -389,10 +406,10 @@ for($i = 0; $i -lt $projects.Length; $i++)
& $msbuild $debug /r "$projectPath" $projectOptions
Assert-ExitCodeIsZero
- & $msbuild $debug /r /t:Clean "$projectPath"
+ & $msbuild $debug /r /t:Clean "$projectPath" /bl:binlogs/$projectPath/$i/release/msbuild.binlog
Write-Host "MSBuild Building Release $projectPath with $projectOptions"
- & $msbuild $release /r "$projectPath" $projectOptions
+ & $msbuild $release /r "$projectPath" $projectOptions /bl:binlogs/$projectPath/$i/release/msbuild.binlog
Assert-ExitCodeIsZero
& $msbuild $release /r /t:Clean "$projectPath"
diff --git a/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/uno53net9blank.csproj b/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/uno53net9blank.csproj
index 9ee7dfcea859..f2c9bb783cee 100644
--- a/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/uno53net9blank.csproj
+++ b/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/uno53net9blank.csproj
@@ -47,6 +47,20 @@
+
+
+
+
+ <_AssetsToValidate Include="$(PublishDir)$(AssemblyName).app" />
+
+
+
+
+
+
diff --git a/src/Uno.Sdk/Sdk/Sdk.props.buildschema.json b/src/Uno.Sdk/Sdk/Sdk.props.buildschema.json
index 2eccb69242cc..3c1b7dca0d38 100644
--- a/src/Uno.Sdk/Sdk/Sdk.props.buildschema.json
+++ b/src/Uno.Sdk/Sdk/Sdk.props.buildschema.json
@@ -226,6 +226,10 @@
"description": "Provides an explicit override for the version of Uno.Resizetizer to use.",
"type": "nuget-version"
},
+ "UnoSdkExtrasVersion": {
+ "description": "Provides an explicit override for the version of Uno.Sdk.Extras to use.",
+ "type": "nuget-version"
+ },
"MicrosoftLoggingVersion": {
"description": "Provides an explicit override for the version of Microsoft.Extensions.Logging to use.",
"type": "nuget-version"
diff --git a/src/Uno.Sdk/Services/PackageManifest.cs b/src/Uno.Sdk/Services/PackageManifest.cs
index c6a6487322a2..d99e376f062c 100644
--- a/src/Uno.Sdk/Services/PackageManifest.cs
+++ b/src/Uno.Sdk/Services/PackageManifest.cs
@@ -136,6 +136,7 @@ public class Group
public const string UniversalImageLoading = nameof(UniversalImageLoading);
public const string Dsp = nameof(Dsp);
public const string Resizetizer = nameof(Resizetizer);
+ public const string SdkExtras = nameof(SdkExtras);
public const string SkiaSharp = nameof(SkiaSharp);
public const string SvgSkia = nameof(SvgSkia);
public const string WinAppSdk = nameof(WinAppSdk);
diff --git a/src/Uno.Sdk/Tasks/ImplicitPackagesResolver.cs b/src/Uno.Sdk/Tasks/ImplicitPackagesResolver.cs
index 44ee5c76b834..8480a3f2d0f0 100644
--- a/src/Uno.Sdk/Tasks/ImplicitPackagesResolver.cs
+++ b/src/Uno.Sdk/Tasks/ImplicitPackagesResolver.cs
@@ -81,6 +81,8 @@ public sealed class ImplicitPackagesResolver_v0 : Task
public string? UnoResizetizerVersion { get; set; }
+ public string? UnoSdkExtrasVersion { get; set; }
+
public string? MicrosoftLoggingVersion { get; set; }
public string? WinAppSdkVersion { get; set; }
@@ -239,7 +241,8 @@ private void SetupRuntimePackageManifestUpdates(PackageManifest manifest)
.UpdateManifest(PackageManifest.Group.CoreLogging, UnoCoreLoggingSingletonVersion)
.UpdateManifest(PackageManifest.Group.UniversalImageLoading, UnoUniversalImageLoaderVersion)
.UpdateManifest(PackageManifest.Group.Dsp, UnoDspTasksVersion)
- .UpdateManifest(PackageManifest.Group.Resizetizer, UnoResizetizerVersion)
+ .UpdateManifest(PackageManifest.Group.Resizetizer, UnoSdkExtrasVersion)
+ .UpdateManifest(PackageManifest.Group.SdkExtras, UnoResizetizerVersion)
.UpdateManifest(PackageManifest.Group.SkiaSharp, SkiaSharpVersion)
.UpdateManifest(PackageManifest.Group.SvgSkia, SvgSkiaVersion)
.UpdateManifest(PackageManifest.Group.WinAppSdk, WinAppSdkVersion)
diff --git a/src/Uno.Sdk/packages.json b/src/Uno.Sdk/packages.json
index 855c8b41dd3a..129b413c1282 100644
--- a/src/Uno.Sdk/packages.json
+++ b/src/Uno.Sdk/packages.json
@@ -71,6 +71,13 @@
"Uno.Resizetizer"
]
},
+ {
+ "group": "sdkextras",
+ "version": "5.5-dev.26",
+ "packages": [
+ "Uno.Sdk.Extras"
+ ]
+ },
{
"group": "SkiaSharp",
"version": "2.88.8",
diff --git a/src/Uno.Sdk/targets/Uno.Implicit.Packages.ProjectSystem.targets b/src/Uno.Sdk/targets/Uno.Implicit.Packages.ProjectSystem.targets
index aeeee213a0ae..dc14ddb8ef41 100644
--- a/src/Uno.Sdk/targets/Uno.Implicit.Packages.ProjectSystem.targets
+++ b/src/Uno.Sdk/targets/Uno.Implicit.Packages.ProjectSystem.targets
@@ -7,6 +7,7 @@
<_UnoProjectSystemPackageReference Include="Uno.WinUI" ProjectSystem="true" />
<_UnoProjectSystemPackageReference Include="Uno.Resizetizer" ProjectSystem="true" PrivateAssets="all" />
+ <_UnoProjectSystemPackageReference Include="Uno.Sdk.Extras" ProjectSystem="true" PrivateAssets="all" />
diff --git a/src/Uno.Sdk/targets/Uno.Implicit.Packages.targets b/src/Uno.Sdk/targets/Uno.Implicit.Packages.targets
index 1bf445b5c58d..e0ed51ca471a 100644
--- a/src/Uno.Sdk/targets/Uno.Implicit.Packages.targets
+++ b/src/Uno.Sdk/targets/Uno.Implicit.Packages.targets
@@ -61,6 +61,7 @@
AndroidXBrowserVersion="@(AndroidXBrowserVersion)"
AndroidXSwipeRefreshLayoutVersion="@(AndroidXSwipeRefreshLayoutVersion)"
UnoResizetizerVersion="$(UnoResizetizerVersion)"
+ UnoSdkExtrasVersion="$(UnoSdkExtrasVersion)"
MicrosoftLoggingVersion="$(MicrosoftLoggingVersion)"
WinAppSdkVersion="$(WinAppSdkVersion)"
WinAppSdkBuildToolsVersion="$(WinAppSdkBuildToolsVersion)"