Fix: Build fails when appicon is an empty (but valid) SVG - #35305
Conversation
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.sh | bash -s -- 35305Or
iex "& { $(irm https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.ps1) } 35305" |
|
Hey there @@Shalini-Ashokan! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed. |
There was a problem hiding this comment.
Pull request overview
This PR updates Resizetizer’s SVG rendering path so empty-but-valid SVG app icons can build successfully, and adds regression coverage plus a fixture for that scenario. The title/description match the implementation.
Changes:
- Moves the empty-SVG size check so it only runs in the downscale branch of
SkiaSharpSvgTools.DrawUnscaled. - Adds a unit test covering an empty SVG used as an app icon.
- Adds a new empty SVG test asset.
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
src/SingleProject/Resizetizer/src/SkiaSharpSvgTools.cs |
Changes SVG draw-path validation behavior for empty-size pictures. |
src/SingleProject/Resizetizer/test/UnitTests/ResizetizeImagesTests.cs |
Adds a regression test for empty SVG app icon processing. |
src/SingleProject/Resizetizer/test/UnitTests/images/appicon_empty.svg |
Adds the empty SVG fixture used by the new test. |
MauiBot
left a comment
There was a problem hiding this comment.
🤖 Automated review — alternative fix proposed
The expert-reviewer evaluation compared the PR fix against #4 automatically generated candidates and selected try-fix-4 as the strongest fix.
Why: try-fix-4 wins by centralizing empty-CullRect handling in a new ResolveOriginalSize() base method (SkiaSharpTools.cs), which eliminates the NaN/∞ float arithmetic bug, simplifies DrawUnscaled with a clean 'scale >= 1 || size.IsEmpty' pattern, requires no XML parsing overhead, and includes comprehensive tests. The PR fix failed Gate and silently drops PR #33194's MAUIR0001 protection for malformed SVGs at scale >= 1, which all 4 try-fix candidates address.
Please consider applying the candidate diff below (or use it as guidance). Once you push an update, this workflow will re-trigger and re-evaluate.
Candidate diff (`try-fix-4`)
diff --git a/src/SingleProject/Resizetizer/src/SkiaSharpAppIconTools.cs b/src/SingleProject/Resizetizer/src/SkiaSharpAppIconTools.cs
index 9969b4864c..a78510ad76 100644
--- a/src/SingleProject/Resizetizer/src/SkiaSharpAppIconTools.cs
+++ b/src/SingleProject/Resizetizer/src/SkiaSharpAppIconTools.cs
@@ -116,7 +116,7 @@ namespace Microsoft.Maui.Resizetizer
// draw foreground
if (foregroundTools is not null)
{
- var foregroundOriginalSize = foregroundTools.GetOriginalSize();
+ var foregroundOriginalSize = foregroundTools.ResolveOriginalSize(foregroundTools.GetOriginalSize(), unscaledCanvasSize);
var (fgScaledSize, fgScale) = foregroundTools.GetScaledSize(foregroundOriginalSize, dpi, unscaledCanvasSize);
// center the foreground
diff --git a/src/SingleProject/Resizetizer/src/SkiaSharpSvgTools.cs b/src/SingleProject/Resizetizer/src/SkiaSharpSvgTools.cs
index eb84b18632..dbf4e0c99c 100644
--- a/src/SingleProject/Resizetizer/src/SkiaSharpSvgTools.cs
+++ b/src/SingleProject/Resizetizer/src/SkiaSharpSvgTools.cs
@@ -27,7 +27,7 @@ namespace Microsoft.Maui.Resizetizer
Logger?.Log($"Open SVG took {sw.ElapsedMilliseconds}ms ({filename})");
if (pic.CullRect.Size.IsEmpty)
- Logger?.Log($"SVG picture did not have a size and will fail to generate. ({Filename})");
+ Logger?.Log($"SVG picture has empty render bounds; requested output size will be used for scaling when available. ({Filename})");
}
public override SKSize GetOriginalSize() =>
@@ -36,32 +36,26 @@ namespace Microsoft.Maui.Resizetizer
public override void DrawUnscaled(SKCanvas canvas, float scale)
{
var size = GetOriginalSize();
- if (size.IsEmpty)
+ if (scale >= 1 || size.IsEmpty)
{
- throw new InvalidOperationException($"Cannot draw SVG file '{Filename}'. The SVG has no size. Ensure the SVG includes a viewBox attribute or both width and height attributes with valid dimensions.");
- }
- if (scale >= 1)
- {
- // draw using default scaling
canvas.DrawPicture(svg.Picture, Paint);
+ return;
}
- else
- {
- // vector scaling has rounding issues, so first draw as intended
- var info = new SKImageInfo((int)size.Width, (int)size.Height);
- using var surface = SKSurface.Create(info);
- var cvn = surface.Canvas;
- // draw to a larger canvas first
- cvn.Clear(SKColors.Transparent);
- cvn.DrawPicture(svg.Picture, Paint);
+ // vector scaling has rounding issues, so first draw as intended
+ var info = new SKImageInfo((int)size.Width, (int)size.Height);
+ using var surface = SKSurface.Create(info);
+ var cvn = surface.Canvas;
- // convert it all into an image
- using var img = surface.Snapshot();
+ // draw to a larger canvas first
+ cvn.Clear(SKColors.Transparent);
+ cvn.DrawPicture(svg.Picture, Paint);
- // draw to the main canvas using the correct quality settings
- canvas.DrawImage(img, 0, 0, SamplingOptions, Paint);
- }
+ // convert it all into an image
+ using var img = surface.Snapshot();
+
+ // draw to the main canvas using the correct quality settings
+ canvas.DrawImage(img, 0, 0, SamplingOptions, Paint);
}
public void Dispose()
diff --git a/src/SingleProject/Resizetizer/src/SkiaSharpTools.cs b/src/SingleProject/Resizetizer/src/SkiaSharpTools.cs
index 4e29cc317b..f984f86567 100644
--- a/src/SingleProject/Resizetizer/src/SkiaSharpTools.cs
+++ b/src/SingleProject/Resizetizer/src/SkiaSharpTools.cs
@@ -118,12 +118,13 @@ namespace Microsoft.Maui.Resizetizer
var originalSize = GetOriginalSize();
var absoluteSize = dpiSizeIsAbsolute ? dpi.Size : null;
- var (scaledSize, scale) = GetScaledSize(originalSize, dpi, absoluteSize);
+ var resolvedOriginalSize = ResolveOriginalSize(originalSize, absoluteSize);
+ var (scaledSize, scale) = GetScaledSize(resolvedOriginalSize, dpi, absoluteSize);
var (canvasSize, _) = GetCanvasSize(dpi, null, this);
using (var tempBitmap = new SKBitmap(canvasSize.Width, canvasSize.Height))
{
- Draw(tempBitmap, additionalScale, originalSize, scale, scaledSize);
+ Draw(tempBitmap, additionalScale, resolvedOriginalSize, scale, scaledSize);
Save(destination, tempBitmap);
}
@@ -158,7 +159,7 @@ namespace Microsoft.Maui.Resizetizer
{
var baseOriginalSize = baseTools.GetOriginalSize();
var (baseScaledSize, _) = baseTools.GetScaledSize(baseOriginalSize, dpi.Scale);
- return (baseScaledSize, baseOriginalSize);
+ return (baseScaledSize, baseTools.ResolveOriginalSize(baseOriginalSize));
}
throw new InvalidOperationException("The canvas size cannot be calculated if there is no size to start from (DPI size, BaseSize or image size).");
@@ -239,11 +240,24 @@ namespace Microsoft.Maui.Resizetizer
public abstract void DrawUnscaled(SKCanvas canvas, float scale);
+ internal SKSize ResolveOriginalSize(SKSize originalSize, SKSize? absoluteSize = null)
+ {
+ if (!originalSize.IsEmpty)
+ return originalSize;
+
+ if ((absoluteSize ?? BaseSize) is SKSize fallbackSize && !fallbackSize.IsEmpty)
+ return fallbackSize;
+
+ throw new InvalidOperationException($"Cannot scale image '{Filename}' because it has no render bounds and no requested output size. For SVG files, ensure a viewBox or explicit width and height are present, or set BaseSize in the project file.");
+ }
+
public (SKSizeI, float) GetScaledSize(SKSize originalSize, DpiPath dpi, SKSize? absoluteSize = null) =>
GetScaledSize(originalSize, dpi.Scale, absoluteSize ?? dpi.Size);
public (SKSizeI, float) GetScaledSize(SKSize originalSize, decimal resizeRatio, SKSize? absoluteSize = null)
{
+ originalSize = ResolveOriginalSize(originalSize, absoluteSize);
+
var sourceNominalWidth = (int)(absoluteSize?.Width ?? BaseSize?.Width ?? originalSize.Width);
var sourceNominalHeight = (int)(absoluteSize?.Height ?? BaseSize?.Height ?? originalSize.Height);
diff --git a/src/SingleProject/Resizetizer/test/UnitTests/SkiaSharpSvgToolsTests.cs b/src/SingleProject/Resizetizer/test/UnitTests/SkiaSharpSvgToolsTests.cs
index b549619e89..227d7c3b36 100644
--- a/src/SingleProject/Resizetizer/test/UnitTests/SkiaSharpSvgToolsTests.cs
+++ b/src/SingleProject/Resizetizer/test/UnitTests/SkiaSharpSvgToolsTests.cs
@@ -148,6 +148,44 @@ namespace Microsoft.Maui.Resizetizer.Tests
Assert.Equal(SKColors.Blue, pixmap.GetPixelColor(125, 137));
}
+ [Fact]
+ public void EmptySvgWithBaseSizeAndScaleResizesToBlankImage()
+ {
+ var info = new ResizeImageInfo();
+ info.Filename = "images/appicon_empty.svg";
+ info.BaseSize = new SKSize(456, 456);
+ var tools = new SkiaSharpSvgTools(info, Logger);
+ var dpiPath = new DpiPath("", 0.5m);
+
+ // SVG with a viewport but no drawing commands: Svg.Skia reports an empty CullRect.
+ Assert.True(tools.GetOriginalSize().IsEmpty);
+
+ tools.Resize(dpiPath, DestinationFilename);
+
+ using var resultImage = SKBitmap.Decode(DestinationFilename);
+ Assert.Equal(228, resultImage.Width);
+ Assert.Equal(228, resultImage.Height);
+
+ using var pixmap = resultImage.PeekPixels();
+ Assert.Equal(SKColors.Empty, pixmap.GetPixelColor(10, 10));
+ Assert.Equal(SKColors.Empty, pixmap.GetPixelColor(114, 114));
+ }
+
+ [Fact]
+ public void EmptySvgWithNoBaseSizeThrows()
+ {
+ var info = new ResizeImageInfo();
+ info.Filename = "images/appicon_empty.svg";
+ var tools = new SkiaSharpSvgTools(info, Logger);
+ var dpiPath = new DpiPath("", 0.5m);
+
+ var exception = Assert.Throws<InvalidOperationException>(() => tools.Resize(dpiPath, DestinationFilename));
+
+ Assert.Contains("appicon_empty.svg", exception.Message, StringComparison.Ordinal);
+ Assert.Contains("viewBox", exception.Message, StringComparison.Ordinal);
+ Assert.Contains("BaseSize", exception.Message, StringComparison.Ordinal);
+ }
+
[Fact]
public void ColorizedReturnsColored()
{
The fix is invalid because when the SVG has no content, the scale becomes NaN (due to divide-by-zero), and NaN >= 1 is always false — so the code never reaches the safe path and still throws the same error |
MauiBot
left a comment
There was a problem hiding this comment.
🤖 Automated review — alternative fix proposed
The expert-reviewer evaluation compared the PR fix against #4 automatically generated candidates and selected try-fix-4 as the strongest fix.
Why: try-fix-4 wins by fixing the root cause in GetOriginalSize() rather than working around it in DrawUnscaled. By parsing declared SVG width/height/viewBox attributes at construction time, it returns the true declared dimensions (e.g., 456×456) for empty-but-valid SVGs, eliminating NaN/Infinity in GetScaledSize and fully restoring MAUIR0001 protection for both scale branches. The PR's own fix (moving the guard to the else-branch only) correctly handles the reported app-icon scenario but silently drops the diagnostic for truly malformed SVGs at scale >= 1 and leaves downstream arithmetic bugs for non-app-icon callers.
Please consider applying the candidate diff below (or use it as guidance). Once you push an update, this workflow will re-trigger and re-evaluate.
Candidate diff (`try-fix-4`)
diff --git a/src/SingleProject/Resizetizer/src/SkiaSharpSvgTools.cs b/src/SingleProject/Resizetizer/src/SkiaSharpSvgTools.cs
index eb84b18632..c3c6259616 100644
--- a/src/SingleProject/Resizetizer/src/SkiaSharpSvgTools.cs
+++ b/src/SingleProject/Resizetizer/src/SkiaSharpSvgTools.cs
@@ -1,5 +1,7 @@
using System;
using System.Diagnostics;
+using System.Globalization;
+using System.Xml.Linq;
using SkiaSharp;
using Svg.Skia;
@@ -8,6 +10,7 @@ namespace Microsoft.Maui.Resizetizer
internal class SkiaSharpSvgTools : SkiaSharpTools, IDisposable
{
SKSvg svg;
+ SKSize? _declaredSize;
public SkiaSharpSvgTools(ResizeImageInfo info, ILogger logger)
: this(info.Filename, info.BaseSize, info.Color, info.TintColor, logger)
@@ -26,12 +29,57 @@ namespace Microsoft.Maui.Resizetizer
sw.Stop();
Logger?.Log($"Open SVG took {sw.ElapsedMilliseconds}ms ({filename})");
+ // SkiaSharp's CullRect is zero for SVGs that declare dimensions but contain no shapes.
+ // Parse the declared width/height/viewBox so GetOriginalSize() returns a valid size for
+ // such SVGs, while still reporting zero (and ultimately throwing) for truly malformed SVGs.
if (pic.CullRect.Size.IsEmpty)
- Logger?.Log($"SVG picture did not have a size and will fail to generate. ({Filename})");
+ {
+ _declaredSize = ParseDeclaredSize(filename);
+ if (_declaredSize is null)
+ Logger?.Log($"SVG picture did not have a size and will fail to generate. ({Filename})");
+ }
}
- public override SKSize GetOriginalSize() =>
- svg.Picture.CullRect.Size;
+ static SKSize? ParseDeclaredSize(string filename)
+ {
+ try
+ {
+ var root = XDocument.Load(filename).Root;
+ if (root is null)
+ return null;
+
+ var wAttr = root.Attribute("width")?.Value;
+ var hAttr = root.Attribute("height")?.Value;
+ if (wAttr != null && hAttr != null &&
+ float.TryParse(wAttr, NumberStyles.Float, CultureInfo.InvariantCulture, out var w) &&
+ float.TryParse(hAttr, NumberStyles.Float, CultureInfo.InvariantCulture, out var h) &&
+ w > 0 && h > 0)
+ {
+ return new SKSize(w, h);
+ }
+
+ var vbParts = root.Attribute("viewBox")?.Value?.Split(' ', StringSplitOptions.RemoveEmptyEntries);
+ if (vbParts?.Length == 4 &&
+ float.TryParse(vbParts[2], NumberStyles.Float, CultureInfo.InvariantCulture, out var vbW) &&
+ float.TryParse(vbParts[3], NumberStyles.Float, CultureInfo.InvariantCulture, out var vbH) &&
+ vbW > 0 && vbH > 0)
+ {
+ return new SKSize(vbW, vbH);
+ }
+ }
+ catch
+ {
+ // If XML parsing fails, fall through and let CullRect be used (which will be zero -> throws later).
+ }
+
+ return null;
+ }
+
+ public override SKSize GetOriginalSize()
+ {
+ var cullSize = svg.Picture.CullRect.Size;
+ return cullSize.IsEmpty ? _declaredSize ?? cullSize : cullSize;
+ }
public override void DrawUnscaled(SKCanvas canvas, float scale)
{
@@ -40,6 +88,7 @@ namespace Microsoft.Maui.Resizetizer
{
throw new InvalidOperationException($"Cannot draw SVG file '{Filename}'. The SVG has no size. Ensure the SVG includes a viewBox attribute or both width and height attributes with valid dimensions.");
}
+
if (scale >= 1)
{
// draw using default scaling
diff --git a/src/SingleProject/Resizetizer/test/UnitTests/ResizetizeImagesTests.cs b/src/SingleProject/Resizetizer/test/UnitTests/ResizetizeImagesTests.cs
index 0ee2d31681..77099efbcf 100644
--- a/src/SingleProject/Resizetizer/test/UnitTests/ResizetizeImagesTests.cs
+++ b/src/SingleProject/Resizetizer/test/UnitTests/ResizetizeImagesTests.cs
@@ -117,6 +117,38 @@ namespace Microsoft.Maui.Resizetizer.Tests
Assert.Equal("MAUIR0001", errorCode);
}
+ [Fact]
+ public void EmptySvgAppIconSucceeds_Issue35293()
+ {
+ var items = new[]
+ {
+ new TaskItem("images/appicon_empty.svg", new Dictionary<string, string>
+ {
+ ["IsAppIcon"] = bool.TrueString,
+ ["Link"] = "appicon",
+ }),
+ };
+
+ var task = GetNewTask(items);
+ var success = task.Execute();
+
+ Assert.True(success, LogErrorEvents.FirstOrDefault()?.Message);
+ }
+
+ [Fact]
+ public void EmptySvgRegularImageSucceeds_Issue35293()
+ {
+ var items = new[]
+ {
+ new TaskItem("images/appicon_empty.svg"),
+ };
+
+ var task = GetNewTask(items);
+ var success = task.Execute();
+
+ Assert.True(success, LogErrorEvents.FirstOrDefault()?.Message);
+ }
+
[Fact]
public void GenerationSkippedOnIncrementalBuild()
{
diff --git a/src/SingleProject/Resizetizer/test/UnitTests/images/appicon_empty.svg b/src/SingleProject/Resizetizer/test/UnitTests/images/appicon_empty.svg
new file mode 100644
index 0000000000..5e931b697e
--- /dev/null
+++ b/src/SingleProject/Resizetizer/test/UnitTests/images/appicon_empty.svg
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg width="456" height="456" viewBox="0 0 456 456" version="1.1" xmlns="http://www.w3.org/2000/svg">
+</svg>
🤖 AI Summary
📊 Review Session —
|
| Test | Without Fix (expect FAIL) | With Fix (expect PASS) |
|---|---|---|
🧪 ResizetizeImagesTests ResizetizeImagesTests |
✅ FAIL — 16s | ❌ FAIL — 9s |
🔴 Without fix — 🧪 ResizetizeImagesTests: FAIL ✅ · 16s
(truncated to last 15,000 chars)
id/ymwcan3c.s4f
[xUnit.net 00:00:01.34] MESSAGE: Background was not found (will manufacture):
[xUnit.net 00:00:01.34] MESSAGE: App Icon Background Part: /tmp/Microsoft.Maui.Resizetizer.Tests/ResizetizeImagesTests+ExecuteForAndroid/ymwcan3c.s4f/mipmap-mdpi/the_alias_background.png
[xUnit.net 00:00:01.34] MESSAGE: App Icon
[xUnit.net 00:00:01.34] MESSAGE: Android Adaptive Icon Generator
[xUnit.net 00:00:01.34] ERROR : There was an exception processing the image ''. System.DllNotFoundException: Unable to load shared library 'libSkiaSharp' or one of its dependencies. In order to help diagnose loading problems, consider using a tool like strace. If you're using glibc, consider setting the LD_DEBUG environment variable:
[xUnit.net 00:00:01.34] /home/vsts/work/1/s/.dotnet/shared/Microsoft.NETCore.App/10.0.0/libSkiaSharp.so: cannot open shared object file: No such file or directory
[xUnit.net 00:00:01.34] /home/vsts/work/1/s/artifacts/bin/Resizetizer.UnitTests/Debug/net10.0/libSkiaSharp.so: cannot open shared object file: No such file or directory
[xUnit.net 00:00:01.34] /home/vsts/work/1/s/.dotnet/shared/Microsoft.NETCore.App/10.0.0/liblibSkiaSharp.so: cannot open shared object file: No such file or directory
[xUnit.net 00:00:01.34] /home/vsts/work/1/s/artifacts/bin/Resizetizer.UnitTests/Debug/net10.0/liblibSkiaSharp.so: cannot open shared object file: No such file or directory
[xUnit.net 00:00:01.34] /home/vsts/work/1/s/.dotnet/shared/Microsoft.NETCore.App/10.0.0/libSkiaSharp: cannot open shared object file: No such file or directory
[xUnit.net 00:00:01.34] /home/vsts/work/1/s/artifacts/bin/Resizetizer.UnitTests/Debug/net10.0/libSkiaSharp: cannot open shared object file: No such file or directory
[xUnit.net 00:00:01.34] /home/vsts/work/1/s/.dotnet/shared/Microsoft.NETCore.App/10.0.0/liblibSkiaSharp: cannot open shared object file: No such file or directory
[xUnit.net 00:00:01.34] /home/vsts/work/1/s/artifacts/bin/Resizetizer.UnitTests/Debug/net10.0/liblibSkiaSharp: cannot open shared object file: No such file or directory
[xUnit.net 00:00:01.34]
[xUnit.net 00:00:01.34] at SkiaSharp.SkiaApi.sk_compatpaint_new()
[xUnit.net 00:00:01.34] at SkiaSharp.SkiaApi.sk_compatpaint_new()
[xUnit.net 00:00:01.33] Microsoft.Maui.Resizetizer.Tests.ResizetizeImagesTests+ExecuteForAndroid.SingleRasterAppIconWithOnlyPathSucceedsWithoutVectors(name: "camera_color", alias: "the_alias.png", outputName: "the_alias") [FAIL]
[xUnit.net 00:00:01.34] at SkiaSharp.SKPaint..ctor()
[xUnit.net 00:00:01.34] at Microsoft.Maui.Resizetizer.SkiaSharpTools..ctor(String filename, Nullable`1 baseSize, Nullable`1 backgroundColor, Nullable`1 tintColor, ILogger logger) in /_/src/SingleProject/Resizetizer/src/SkiaSharpTools.cs:line 83
[xUnit.net 00:00:01.34] at Microsoft.Maui.Resizetizer.SkiaSharpImaginaryTools..ctor(Nullable`1 backgroundColor, ILogger logger) in /_/src/SingleProject/Resizetizer/src/SkiaSharpImaginaryTools.cs:line 14
[xUnit.net 00:00:01.34] at Microsoft.Maui.Resizetizer.SkiaSharpTools.CreateImaginary(Nullable`1 backgroundColor, ILogger logger) in /_/src/SingleProject/Resizetizer/src/SkiaSharpTools.cs:line 70
[xUnit.net 00:00:01.34] at Microsoft.Maui.Resizetizer.AndroidAdaptiveIconGenerator.ProcessBackground(List`1 results, DirectoryInfo fullIntermediateOutputPath) in /_/src/SingleProject/Resizetizer/src/AndroidAdaptiveIconGenerator.cs:line 89
[xUnit.net 00:00:01.34] at Microsoft.Maui.Resizetizer.AndroidAdaptiveIconGenerator.Generate() in /_/src/SingleProject/Resizetizer/src/AndroidAdaptiveIconGenerator.cs:line 43
[xUnit.net 00:00:01.34] at Microsoft.Maui.Resizetizer.ResizetizeImages.ProcessAppIcon(ResizeImageInfo img, ConcurrentBag`1 resizedImages) in /_/src/SingleProject/Resizetizer/src/ResizetizeImages.cs:line 182
[xUnit.net 00:00:01.34] at Microsoft.Maui.Resizetizer.ResizetizeImages.<>c__DisplayClass34_0.<ExecuteAsync>b__0(ResizeImageInfo img) in /_/src/SingleProject/Resizetizer/src/ResizetizeImages.cs:line 64
[xUnit.net 00:00:01.34] Cleaning up directories=/tmp/Microsoft.Maui.Resizetizer.Tests/ResizetizeImagesTests+ExecuteForAndroid/ymwcan3c.s4f
[xUnit.net 00:00:01.34] Microsoft.Maui.Resizetizer.Tests.ResizetizeImagesTests+ExecuteForiOS.SingleVectorAppIconWithOnlyPathSucceedsWithVectors(name: "camera_color", alias: "the_alias", outputName: "the_alias") [FAIL]
[xUnit.net 00:00:01.34] There was an exception processing the image ''. System.DllNotFoundException: Unable to load shared library 'libSkiaSharp' or one of its dependencies. In order to help diagnose loading problems, consider using a tool like strace. If you're using glibc, consider setting the LD_DEBUG environment variable:
[xUnit.net 00:00:01.34] /home/vsts/work/1/s/.dotnet/shared/Microsoft.NETCore.App/10.0.0/libSkiaSharp.so: cannot open shared object file: No such file or directory
[xUnit.net 00:00:01.34] /home/vsts/work/1/s/artifacts/bin/Resizetizer.UnitTests/Debug/net10.0/libSkiaSharp.so: cannot open shared object file: No such file or directory
[xUnit.net 00:00:01.34] /home/vsts/work/1/s/.dotnet/shared/Microsoft.NETCore.App/10.0.0/liblibSkiaSharp.so: cannot open shared object file: No such file or directory
[xUnit.net 00:00:01.34] /home/vsts/work/1/s/artifacts/bin/Resizetizer.UnitTests/Debug/net10.0/liblibSkiaSharp.so: cannot open shared object file: No such file or directory
[xUnit.net 00:00:01.34] /home/vsts/work/1/s/.dotnet/shared/Microsoft.NETCore.App/10.0.0/libSkiaSharp: cannot open shared object file: No such file or directory
[xUnit.net 00:00:01.34] /home/vsts/work/1/s/artifacts/bin/Resizetizer.UnitTests/Debug/net10.0/libSkiaSharp: cannot open shared object file: No such file or directory
[xUnit.net 00:00:01.34] /home/vsts/work/1/s/.dotnet/shared/Microsoft.NETCore.App/10.0.0/liblibSkiaSharp: cannot open shared object file: No such file or directory
[xUnit.net 00:00:01.34] /home/vsts/work/1/s/artifacts/bin/Resizetizer.UnitTests/Debug/net10.0/liblibSkiaSharp: cannot open shared object file: No such file or directory
[xUnit.net 00:00:01.34]
[xUnit.net 00:00:01.34] at SkiaSharp.SkiaApi.sk_compatpaint_new()
[xUnit.net 00:00:01.34] at SkiaSharp.SkiaApi.sk_compatpaint_new()
[xUnit.net 00:00:01.34] at SkiaSharp.SKPaint..ctor()
[xUnit.net 00:00:01.34] at Microsoft.Maui.Resizetizer.SkiaSharpTools..ctor(String filename, Nullable`1 baseSize, Nullable`1 backgroundColor, Nullable`1 tintColor, ILogger logger) in /_/src/SingleProject/Resizetizer/src/SkiaSharpTools.cs:line 83
[xUnit.net 00:00:01.34] at Microsoft.Maui.Resizetizer.SkiaSharpSvgTools..ctor(String filename, Nullable`1 baseSize, Nullable`1 backgroundColor, Nullable`1 tintColor, ILogger logger) in /_/src/SingleProject/Resizetizer/src/SkiaSharpSvgTools.cs:line 18
[xUnit.net 00:00:01.34] at Microsoft.Maui.Resizetizer.SkiaSharpTools.Create(Boolean isVector, String filename, Nullable`1 baseSize, Nullable`1 backgroundColor, Nullable`1 tintColor, ILogger logger) in /_/src/SingleProject/Resizetizer/src/SkiaSharpTools.cs:line 65
[xUnit.net 00:00:01.34] at Microsoft.Maui.Resizetizer.SkiaSharpAppIconTools..ctor(ResizeImageInfo info, ILogger logger) in /_/src/SingleProject/Resizetizer/src/SkiaSharpAppIconTools.cs:line 26
[xUnit.net 00:00:01.34] at Microsoft.Maui.Resizetizer.ResizetizeImages.ProcessAppIcon(ResizeImageInfo img, ConcurrentBag`1 resizedImages) in /_/src/SingleProject/Resizetizer/src/ResizetizeImages.cs:line 209
[xUnit.net 00:00:01.34] at Microsoft.Maui.Resizetizer.ResizetizeImages.<>c__DisplayClass34_0.<ExecuteAsync>b__0(ResizeImageInfo img) in /_/src/SingleProject/Resizetizer/src/ResizetizeImages.cs:line 64
[xUnit.net 00:00:01.34] Stack Trace:
[xUnit.net 00:00:01.34] /_/src/SingleProject/Resizetizer/test/UnitTests/ResizetizeImagesTests.cs(1322,0): at Microsoft.Maui.Resizetizer.Tests.ResizetizeImagesTests.ExecuteForiOS.SingleVectorAppIconWithOnlyPathSucceedsWithVectors(String name, String alias, String outputName)
[xUnit.net 00:00:01.34] at InvokeStub_ExecuteForiOS.SingleVectorAppIconWithOnlyPathSucceedsWithVectors(Object, Span`1)
[xUnit.net 00:00:01.34] at System.Reflection.MethodBaseInvoker.InvokeWithFewArgs(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
[xUnit.net 00:00:01.34] Output:
[xUnit.net 00:00:01.34] Using DestinationDirectory=/tmp/Microsoft.Maui.Resizetizer.Tests/ResizetizeImagesTests+ExecuteForiOS/vvconxxy.2jo
[xUnit.net 00:00:01.34] MESSAGE: iOS App Icon Set Directory: /tmp/Microsoft.Maui.Resizetizer.Tests/ResizetizeImagesTests+ExecuteForiOS/vvconxxy.2jo/Assets.xcassets/the_alias.appiconset
[xUnit.net 00:00:01.34] MESSAGE: App Icon
[xUnit.net 00:00:01.34] MESSAGE: iOS Icon Assets Generator
[xUnit.net 00:00:01.34] MESSAGE: Generating App Icon Bitmaps for DPIs
[xUnit.net 00:00:01.35] ERROR : There was an exception processing the image ''. System.DllNotFoundException: Unable to load shared library 'libSkiaSharp' or one of its dependencies. In order to help diagnose loading problems, consider using a tool like strace. If you're using glibc, consider setting the LD_DEBUG environment variable:
[xUnit.net 00:00:01.35] /home/vsts/work/1/s/.dotnet/shared/Microsoft.NETCore.App/10.0.0/libSkiaSharp.so: cannot open shared object file: No such file or directory
[xUnit.net 00:00:01.35] /home/vsts/work/1/s/artifacts/bin/Resizetizer.UnitTests/Debug/net10.0/libSkiaSharp.so: cannot open shared object file: No such file or directory
[xUnit.net 00:00:01.35] /home/vsts/work/1/s/.dotnet/shared/Microsoft.NETCore.App/10.0.0/liblibSkiaSharp.so: cannot open shared object file: No such file or directory
[xUnit.net 00:00:01.35] /home/vsts/work/1/s/artifacts/bin/Resizetizer.UnitTests/Debug/net10.0/liblibSkiaSharp.so: cannot open shared object file: No such file or directory
[xUnit.net 00:00:01.35] /home/vsts/work/1/s/.dotnet/shared/Microsoft.NETCore.App/10.0.0/libSkiaSharp: cannot open shared object file: No such file or directory
[xUnit.net 00:00:01.35] /home/vsts/work/1/s/artifacts/bin/Resizetizer.UnitTests/Debug/net10.0/libSkiaSharp: cannot open shared object file: No such file or directory
[xUnit.net 00:00:01.35] /home/vsts/work/1/s/.dotnet/shared/Microsoft.NETCore.App/10.0.0/liblibSkiaSharp: cannot open shared object file: No such file or directory
[xUnit.net 00:00:01.36] /home/vsts/work/1/s/artifacts/bin/Resizetizer.UnitTests/Debug/net10.0/liblibSkiaSharp: cannot open shared object file: No such file or directory
[xUnit.net 00:00:01.36]
[xUnit.net 00:00:01.36] at SkiaSharp.SkiaApi.sk_compatpaint_new()
[xUnit.net 00:00:01.36] at SkiaSharp.SkiaApi.sk_compatpaint_new()
[xUnit.net 00:00:01.36] at SkiaSharp.SKPaint..ctor()
[xUnit.net 00:00:01.36] at Microsoft.Maui.Resizetizer.SkiaSharpTools..ctor(String filename, Nullable`1 baseSize, Nullable`1 backgroundColor, Nullable`1 tintColor, ILogger logger) in /_/src/SingleProject/Resizetizer/src/SkiaSharpTools.cs:line 83
[xUnit.net 00:00:01.36] at Microsoft.Maui.Resizetizer.SkiaSharpSvgTools..ctor(String filename, Nullable`1 baseSize, Nullable`1 backgroundColor, Nullable`1 tintColor, ILogger logger) in /_/src/SingleProject/Resizetizer/src/SkiaSharpSvgTools.cs:line 18
[xUnit.net 00:00:01.36] at Microsoft.Maui.Resizetizer.SkiaSharpTools.Create(Boolean isVector, String filename, Nullable`1 baseSize, Nullable`1 backgroundColor, Nullable`1 tintColor, ILogger logger) in /_/src/SingleProject/Resizetizer/src/SkiaSharpTools.cs:line 65
[xUnit.net 00:00:01.36] at Microsoft.Maui.Resizetizer.SkiaSharpAppIconTools..ctor(ResizeImageInfo info, ILogger logger) in /_/src/SingleProject/Resizetizer/src/SkiaSharpAppIconTools.cs:line 26
[xUnit.net 00:00:01.36] at Microsoft.Maui.Resizetizer.ResizetizeImages.ProcessAppIcon(ResizeImageInfo img, ConcurrentBag`1 resizedImages) in /_/src/SingleProject/Resizetizer/src/ResizetizeImages.cs:line 209
[xUnit.net 00:00:01.36] at Microsoft.Maui.Resizetizer.ResizetizeImages.<>c__DisplayClass34_0.<ExecuteAsync>b__0(ResizeImageInfo img) in /_/src/SingleProject/Resizetizer/src/ResizetizeImages.cs:line 64
[xUnit.net 00:00:01.36] Cleaning up directories=/tmp/Microsoft.Maui.Resizetizer.Tests/ResizetizeImagesTests+ExecuteForiOS/vvconxxy.2jo
The active test run was aborted. Reason: Test host process crashed : Unhandled exception. System.TypeInitializationException: The type initializer for 'SkiaSharp.SKObject' threw an exception.
---> System.DllNotFoundException: Unable to load shared library 'libSkiaSharp' or one of its dependencies. In order to help diagnose loading problems, consider using a tool like strace. If you're using glibc, consider setting the LD_DEBUG environment variable:
/home/vsts/work/1/s/.dotnet/shared/Microsoft.NETCore.App/10.0.0/libSkiaSharp.so: cannot open shared object file: No such file or directory
/home/vsts/work/1/s/artifacts/bin/Resizetizer.UnitTests/Debug/net10.0/libSkiaSharp.so: cannot open shared object file: No such file or directory
/home/vsts/work/1/s/.dotnet/shared/Microsoft.NETCore.App/10.0.0/liblibSkiaSharp.so: cannot open shared object file: No such file or directory
/home/vsts/work/1/s/artifacts/bin/Resizetizer.UnitTests/Debug/net10.0/liblibSkiaSharp.so: cannot open shared object file: No such file or directory
/home/vsts/work/1/s/.dotnet/shared/Microsoft.NETCore.App/10.0.0/libSkiaSharp: cannot open shared object file: No such file or directory
/home/vsts/work/1/s/artifacts/bin/Resizetizer.UnitTests/Debug/net10.0/libSkiaSharp: cannot open shared object file: No such file or directory
/home/vsts/work/1/s/.dotnet/shared/Microsoft.NETCore.App/10.0.0/liblibSkiaSharp: cannot open shared object file: No such file or directory
/home/vsts/work/1/s/artifacts/bin/Resizetizer.UnitTests/Debug/net10.0/liblibSkiaSharp: cannot open shared object file: No such file or directory
at SkiaSharp.SkiaApi.sk_version_get_milestone()
at SkiaSharp.SkiaSharpVersion.get_Native()
at SkiaSharp.SkiaSharpVersion.CheckNativeLibraryCompatible(Boolean throwIfIncompatible)
at SkiaSharp.SKObject..cctor()
--- End of inner exception stack trace ---
at SkiaSharp.SKObject.DeregisterHandle(IntPtr handle, SKObject instance)
at SkiaSharp.SKObject.set_Handle(IntPtr value)
at SkiaSharp.SKNativeObject.Dispose(Boolean disposing)
at SkiaSharp.SKObject.Dispose(Boolean disposing)
at SkiaSharp.SKPaint.Dispose(Boolean disposing)
at SkiaSharp.SKNativeObject.Finalize()
at System.GC.RunFinalizers()
Test Run Aborted.
Total tests: Unknown
Failed: 24
Total time: 4.0360 Seconds
🟢 With fix — 🧪 ResizetizeImagesTests: FAIL ❌ · 9s
(truncated to last 15,000 chars)
0.0/libSkiaSharp: cannot open shared object file: No such file or directory
---> System.DllNotFoundException: Unable to load shared library 'libSkiaSharp' or one of its dependencies. In order to help diagnose loading problems, consider using a tool like strace. If you're using glibc, consider setting the LD_DEBUG environment variable:
/home/vsts/work/1/s/.dotnet/shared/Microsoft.NETCore.App/10.0.0/libSkiaSharp.so: cannot open shared object file: No such file or directory
/home/vsts/work/1/s/artifacts/bin/Resizetizer.UnitTests/Debug/net10.0/libSkiaSharp.so: cannot open shared object file: No such file or directory
[xUnit.net 00:00:02.05] /home/vsts/work/1/s/.dotnet/shared/Microsoft.NETCore.App/10.0.0/liblibSkiaSharp: cannot open shared object file: No such file or directory
/home/vsts/work/1/s/.dotnet/shared/Microsoft.NETCore.App/10.0.0/liblibSkiaSharp.so: cannot open shared object file: No such file or directory
/home/vsts/work/1/s/artifacts/bin/Resizetizer.UnitTests/Debug/net10.0/liblibSkiaSharp.so: cannot open shared object file: No such file or directory
[xUnit.net 00:00:02.05] /home/vsts/work/1/s/artifacts/bin/Resizetizer.UnitTests/Debug/net10.0/liblibSkiaSharp: cannot open shared object file: No such file or directory
[xUnit.net 00:00:02.05]
/home/vsts/work/1/s/.dotnet/shared/Microsoft.NETCore.App/10.0.0/libSkiaSharp: cannot open shared object file: No such file or directory
/home/vsts/work/1/s/artifacts/bin/Resizetizer.UnitTests/Debug/net10.0/libSkiaSharp: cannot open shared object file: No such file or directory
/home/vsts/work/1/s/.dotnet/shared/Microsoft.NETCore.App/10.0.0/liblibSkiaSharp: cannot open shared object file: No such file or directory
/home/vsts/work/1/s/artifacts/bin/Resizetizer.UnitTests/Debug/net10.0/liblibSkiaSharp: cannot open shared object file: No such file or directory
at SkiaSharp.SkiaApi.sk_version_get_milestone()
at SkiaSharp.SkiaSharpVersion.get_Native()
at SkiaSharp.SkiaSharpVersion.CheckNativeLibraryCompatible(Boolean throwIfIncompatible)
at SkiaSharp.SKObject..cctor()
--- End of inner exception stack trace ---
[xUnit.net 00:00:02.05] at SkiaSharp.SkiaApi.sk_compatpaint_new()
at SkiaSharp.SKObject.DeregisterHandle(IntPtr handle, SKObject instance)
at SkiaSharp.SKObject.set_Handle(IntPtr value)
at SkiaSharp.SKNativeObject.Dispose(Boolean disposing)
at SkiaSharp.SKObject.Dispose(Boolean disposing)
[xUnit.net 00:00:02.05] at SkiaSharp.SkiaApi.sk_compatpaint_new()
at SkiaSharp.SKPaint.Dispose(Boolean disposing)
at SkiaSharp.SKNativeObject.Finalize()
at System.GC.RunFinalizers()
[xUnit.net 00:00:02.05] at SkiaSharp.SKPaint..ctor()
[xUnit.net 00:00:02.05] at Microsoft.Maui.Resizetizer.SkiaSharpTools..ctor(String filename, Nullable`1 baseSize, Nullable`1 backgroundColor, Nullable`1 tintColor, ILogger logger) in /_/src/SingleProject/Resizetizer/src/SkiaSharpTools.cs:line 83
[xUnit.net 00:00:02.05] at Microsoft.Maui.Resizetizer.SkiaSharpSvgTools..ctor(String filename, Nullable`1 baseSize, Nullable`1 backgroundColor, Nullable`1 tintColor, ILogger logger) in /_/src/SingleProject/Resizetizer/src/SkiaSharpSvgTools.cs:line 18
[xUnit.net 00:00:02.05] at Microsoft.Maui.Resizetizer.SkiaSharpTools.Create(Boolean isVector, String filename, Nullable`1 baseSize, Nullable`1 backgroundColor, Nullable`1 tintColor, ILogger logger) in /_/src/SingleProject/Resizetizer/src/SkiaSharpTools.cs:line 65
[xUnit.net 00:00:02.05] at Microsoft.Maui.Resizetizer.SkiaSharpAppIconTools..ctor(ResizeImageInfo info, ILogger logger) in /_/src/SingleProject/Resizetizer/src/SkiaSharpAppIconTools.cs:line 26
[xUnit.net 00:00:02.05] at Microsoft.Maui.Resizetizer.WindowsIconGenerator.Generate() in /_/src/SingleProject/Resizetizer/src/WindowsIconGenerator.cs:line 36
[xUnit.net 00:00:02.05] at Microsoft.Maui.Resizetizer.ResizetizeImages.ProcessAppIcon(ResizeImageInfo img, ConcurrentBag`1 resizedImages) in /_/src/SingleProject/Resizetizer/src/ResizetizeImages.cs:line 204
[xUnit.net 00:00:02.05] at Microsoft.Maui.Resizetizer.ResizetizeImages.<>c__DisplayClass34_0.<ExecuteAsync>b__0(ResizeImageInfo img) in /_/src/SingleProject/Resizetizer/src/ResizetizeImages.cs:line 64
[xUnit.net 00:00:02.05] Cleaning up directories=/tmp/Microsoft.Maui.Resizetizer.Tests/ResizetizeImagesTests+ExecuteForWindows/qyx5fd4x.dft
[xUnit.net 00:00:02.05] There was an exception processing the image ''. System.DllNotFoundException: Unable to load shared library 'libSkiaSharp' or one of its dependencies. In order to help diagnose loading problems, consider using a tool like strace. If you're using glibc, consider setting the LD_DEBUG environment variable:
[xUnit.net 00:00:02.05] /home/vsts/work/1/s/.dotnet/shared/Microsoft.NETCore.App/10.0.0/libSkiaSharp.so: cannot open shared object file: No such file or directory
[xUnit.net 00:00:02.05] /home/vsts/work/1/s/artifacts/bin/Resizetizer.UnitTests/Debug/net10.0/libSkiaSharp.so: cannot open shared object file: No such file or directory
[xUnit.net 00:00:02.05] /home/vsts/work/1/s/.dotnet/shared/Microsoft.NETCore.App/10.0.0/liblibSkiaSharp.so: cannot open shared object file: No such file or directory
[xUnit.net 00:00:02.05] /home/vsts/work/1/s/artifacts/bin/Resizetizer.UnitTests/Debug/net10.0/liblibSkiaSharp.so: cannot open shared object file: No such file or directory
[xUnit.net 00:00:02.05] /home/vsts/work/1/s/.dotnet/shared/Microsoft.NETCore.App/10.0.0/libSkiaSharp: cannot open shared object file: No such file or directory
[xUnit.net 00:00:02.05] /home/vsts/work/1/s/artifacts/bin/Resizetizer.UnitTests/Debug/net10.0/libSkiaSharp: cannot open shared object file: No such file or directory
[xUnit.net 00:00:02.05] /home/vsts/work/1/s/.dotnet/shared/Microsoft.NETCore.App/10.0.0/liblibSkiaSharp: cannot open shared object file: No such file or directory
[xUnit.net 00:00:02.05] /home/vsts/work/1/s/artifacts/bin/Resizetizer.UnitTests/Debug/net10.0/liblibSkiaSharp: cannot open shared object file: No such file or directory
[xUnit.net 00:00:02.05]
[xUnit.net 00:00:02.05] at SkiaSharp.SkiaApi.sk_compatpaint_new()
[xUnit.net 00:00:02.05] at SkiaSharp.SkiaApi.sk_compatpaint_new()
[xUnit.net 00:00:02.05] at SkiaSharp.SKPaint..ctor()
[xUnit.net 00:00:02.05] at Microsoft.Maui.Resizetizer.SkiaSharpTools..ctor(String filename, Nullable`1 baseSize, Nullable`1 backgroundColor, Nullable`1 tintColor, ILogger logger) in /_/src/SingleProject/Resizetizer/src/SkiaSharpTools.cs:line 83
[xUnit.net 00:00:02.05] at Microsoft.Maui.Resizetizer.SkiaSharpSvgTools..ctor(String filename, Nullable`1 baseSize, Nullable`1 backgroundColor, Nullable`1 tintColor, ILogger logger) in /_/src/SingleProject/Resizetizer/src/SkiaSharpSvgTools.cs:line 18
[xUnit.net 00:00:02.05] at Microsoft.Maui.Resizetizer.SkiaSharpTools.Create(Boolean isVector, String filename, Nullable`1 baseSize, Nullable`1 backgroundColor, Nullable`1 tintColor, ILogger logger) in /_/src/SingleProject/Resizetizer/src/SkiaSharpTools.cs:line 65
[xUnit.net 00:00:02.05] at Microsoft.Maui.Resizetizer.SkiaSharpAppIconTools..ctor(ResizeImageInfo info, ILogger logger) in /_/src/SingleProject/Resizetizer/src/SkiaSharpAppIconTools.cs:line 26
[xUnit.net 00:00:02.05] at Microsoft.Maui.Resizetizer.ResizetizeImages.ProcessAppIcon(ResizeImageInfo img, ConcurrentBag`1 resizedImages) in /_/src/SingleProject/Resizetizer/src/ResizetizeImages.cs:line 209
[xUnit.net 00:00:02.05] at Microsoft.Maui.Resizetizer.ResizetizeImages.<>c__DisplayClass34_0.<ExecuteAsync>b__0(ResizeImageInfo img) in /_/src/SingleProject/Resizetizer/src/ResizetizeImages.cs:line 64
[xUnit.net 00:00:02.05] Stack Trace:
[xUnit.net 00:00:02.05] /_/src/SingleProject/Resizetizer/test/UnitTests/ResizetizeImagesTests.cs(1322,0): at Microsoft.Maui.Resizetizer.Tests.ResizetizeImagesTests.ExecuteForiOS.SingleVectorAppIconWithOnlyPathSucceedsWithVectors(String name, String alias, String outputName)
[xUnit.net 00:00:02.05] at InvokeStub_ExecuteForiOS.SingleVectorAppIconWithOnlyPathSucceedsWithVectors(Object, Span`1)
[xUnit.net 00:00:02.05] at System.Reflection.MethodBaseInvoker.InvokeWithFewArgs(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
[xUnit.net 00:00:02.05] Output:
[xUnit.net 00:00:02.05] Using DestinationDirectory=/tmp/Microsoft.Maui.Resizetizer.Tests/ResizetizeImagesTests+ExecuteForiOS/rx3tvkzn.5q3
[xUnit.net 00:00:02.05] MESSAGE: iOS App Icon Set Directory: /tmp/Microsoft.Maui.Resizetizer.Tests/ResizetizeImagesTests+ExecuteForiOS/rx3tvkzn.5q3/Assets.xcassets/camera_color.appiconset
[xUnit.net 00:00:02.05] MESSAGE: App Icon
[xUnit.net 00:00:02.05] MESSAGE: iOS Icon Assets Generator
[xUnit.net 00:00:02.05] MESSAGE: Generating App Icon Bitmaps for DPIs
[xUnit.net 00:00:02.05] ERROR : There was an exception processing the image ''. System.DllNotFoundException: Unable to load shared library 'libSkiaSharp' or one of its dependencies. In order to help diagnose loading problems, consider using a tool like strace. If you're using glibc, consider setting the LD_DEBUG environment variable:
[xUnit.net 00:00:02.05] /home/vsts/work/1/s/.dotnet/shared/Microsoft.NETCore.App/10.0.0/libSkiaSharp.so: cannot open shared object file: No such file or directory
[xUnit.net 00:00:02.05] /home/vsts/work/1/s/artifacts/bin/Resizetizer.UnitTests/Debug/net10.0/libSkiaSharp.so: cannot open shared object file: No such file or directory
[xUnit.net 00:00:02.05] /home/vsts/work/1/s/.dotnet/shared/Microsoft.NETCore.App/10.0.0/liblibSkiaSharp.so: cannot open shared object file: No such file or directory
[xUnit.net 00:00:02.05] /home/vsts/work/1/s/artifacts/bin/Resizetizer.UnitTests/Debug/net10.0/liblibSkiaSharp.so: cannot open shared object file: No such file or directory
[xUnit.net 00:00:02.05] /home/vsts/work/1/s/.dotnet/shared/Microsoft.NETCore.App/10.0.0/libSkiaSharp: cannot open shared object file: No such file or directory
[xUnit.net 00:00:02.05] /home/vsts/work/1/s/artifacts/bin/Resizetizer.UnitTests/Debug/net10.0/libSkiaSharp: cannot open shared object file: No such file or directory
[xUnit.net 00:00:02.05] /home/vsts/work/1/s/.dotnet/shared/Microsoft.NETCore.App/10.0.0/liblibSkiaSharp: cannot open shared object file: No such file or directory
[xUnit.net 00:00:02.05] /home/vsts/work/1/s/artifacts/bin/Resizetizer.UnitTests/Debug/net10.0/liblibSkiaSharp: cannot open shared object file: No such file or directory
[xUnit.net 00:00:02.05]
[xUnit.net 00:00:02.05] at SkiaSharp.SkiaApi.sk_compatpaint_new()
[xUnit.net 00:00:02.05] at SkiaSharp.SkiaApi.sk_compatpaint_new()
[xUnit.net 00:00:02.05] at SkiaSharp.SKPaint..ctor()
[xUnit.net 00:00:02.05] at Microsoft.Maui.Resizetizer.SkiaSharpTools..ctor(String filename, Nullable`1 baseSize, Nullable`1 backgroundColor, Nullable`1 tintColor, ILogger logger) in /_/src/SingleProject/Resizetizer/src/SkiaSharpTools.cs:line 83
[xUnit.net 00:00:02.05] at Microsoft.Maui.Resizetizer.SkiaSharpSvgTools..ctor(String filename, Nullable`1 baseSize, Nullable`1 backgroundColor, Nullable`1 tintColor, ILogger logger) in /_/src/SingleProject/Resizetizer/src/SkiaSharpSvgTools.cs:line 18
[xUnit.net 00:00:02.05] at Microsoft.Maui.Resizetizer.SkiaSharpTools.Create(Boolean isVector, String filename, Nullable`1 baseSize, Nullable`1 backgroundColor, Nullable`1 tintColor, ILogger logger) in /_/src/SingleProject/Resizetizer/src/SkiaSharpTools.cs:line 65
[xUnit.net 00:00:02.05] at Microsoft.Maui.Resizetizer.SkiaSharpAppIconTools..ctor(ResizeImageInfo info, ILogger logger) in /_/src/SingleProject/Resizetizer/src/SkiaSharpAppIconTools.cs:line 26
[xUnit.net 00:00:02.05] at Microsoft.Maui.Resizetizer.ResizetizeImages.ProcessAppIcon(ResizeImageInfo img, ConcurrentBag`1 resizedImages) in /_/src/SingleProject/Resizetizer/src/ResizetizeImages.cs:line 209
[xUnit.net 00:00:02.05] Microsoft.Maui.Resizetizer.Tests.ResizetizeImagesTests+ExecuteForiOS.SingleVectorAppIconWithOnlyPathSucceedsWithVectors(name: "camera_color", alias: "camera_color.png", outputName: "camera_color") [FAIL]
[xUnit.net 00:00:02.05] at Microsoft.Maui.Resizetizer.ResizetizeImages.<>c__DisplayClass34_0.<ExecuteAsync>b__0(ResizeImageInfo img) in /_/src/SingleProject/Resizetizer/src/ResizetizeImages.cs:line 64
The active test run was aborted. Reason: Test host process crashed : Unhandled exception. System.TypeInitializationException: The type initializer for 'SkiaSharp.SKObject' threw an exception.
---> System.DllNotFoundException: Unable to load shared library 'libSkiaSharp' or one of its dependencies. In order to help diagnose loading problems, consider using a tool like strace. If you're using glibc, consider setting the LD_DEBUG environment variable:
/home/vsts/work/1/s/.dotnet/shared/Microsoft.NETCore.App/10.0.0/libSkiaSharp.so: cannot open shared object file: No such file or directory
/home/vsts/work/1/s/artifacts/bin/Resizetizer.UnitTests/Debug/net10.0/libSkiaSharp.so: cannot open shared object file: No such file or directory
/home/vsts/work/1/s/.dotnet/shared/Microsoft.NETCore.App/10.0.0/liblibSkiaSharp.so: cannot open shared object file: No such file or directory
/home/vsts/work/1/s/artifacts/bin/Resizetizer.UnitTests/Debug/net10.0/liblibSkiaSharp.so: cannot open shared object file: No such file or directory
/home/vsts/work/1/s/.dotnet/shared/Microsoft.NETCore.App/10.0.0/libSkiaSharp: cannot open shared object file: No such file or directory
/home/vsts/work/1/s/artifacts/bin/Resizetizer.UnitTests/Debug/net10.0/libSkiaSharp: cannot open shared object file: No such file or directory
/home/vsts/work/1/s/.dotnet/shared/Microsoft.NETCore.App/10.0.0/liblibSkiaSharp: cannot open shared object file: No such file or directory
/home/vsts/work/1/s/artifacts/bin/Resizetizer.UnitTests/Debug/net10.0/liblibSkiaSharp: cannot open shared object file: No such file or directory
at SkiaSharp.SkiaApi.sk_version_get_milestone()
at SkiaSharp.SkiaSharpVersion.get_Native()
at SkiaSharp.SkiaSharpVersion.CheckNativeLibraryCompatible(Boolean throwIfIncompatible)
at SkiaSharp.SKObject..cctor()
--- End of inner exception stack trace ---
at SkiaSharp.SKObject.DeregisterHandle(IntPtr handle, SKObject instance)
at SkiaSharp.SKObject.set_Handle(IntPtr value)
at SkiaSharp.SKNativeObject.Dispose(Boolean disposing)
at SkiaSharp.SKObject.Dispose(Boolean disposing)
at SkiaSharp.SKPaint.Dispose(Boolean disposing)
at SkiaSharp.SKNativeObject.Finalize()
at System.GC.RunFinalizers()
Test Run Aborted.
Total tests: Unknown
Passed: 1
Failed: 23
Total time: 4.3923 Seconds
⚠️ Failure Details
- ❌ ResizetizeImagesTests FAILED with fix (should pass)
Device tests: 23 of 24 failed
📁 Fix files reverted (5 files)
.config/dotnet-tools.jsoneng/Version.Details.xmleng/Versions.propseng/pipelines/ci-copilot.ymlsrc/SingleProject/Resizetizer/src/SkiaSharpSvgTools.cs
🧪 UI Tests — Category Detection
No UI test categories needed for this PR (no UI-relevant changes).
🔍 Pre-Flight — Context & Validation
Issue: #35293 - Build fails when appicon is an empty (but valid) SVG after upgrade to 10.0.60
PR: #35305 - Fix: Build fails when appicon is an empty (but valid) SVG
Platforms Affected: Android, iOS, macOS, Windows (all platforms that use Resizetizer for app icon generation)
Files Changed: 1 implementation, 2 test (1 test class file + 1 new SVG asset)
Key Findings
- Regression introduced by PR Fix: Throw a clear error when an SVG lacks dimensions instead of a NullReferenceException #33194 which added a
size.IsEmptyguard before both code paths inDrawUnscaled. The guard was appropriate only for the downscale (else) branch. - Empty SVGs (valid declared dimensions but no rendered content) have
CullRect.Size = (0,0)in SkiaSharp, causing the guard to incorrectly reject them. - PR fix moves the
size.IsEmptycheck into the else branch only, where it is actually needed (SKImageInfo requires non-zero dimensions). - The scale >= 1 path (
canvas.DrawPicture) works correctly with empty SVGs, producing a valid transparent image. - Gate ❌ FAILED: The new test
EmptySvgAppIconSucceeds_Issue35293uses an SVG withviewBox="0 0 456 456". Svg.Skia sets the Picture's CullRect from theviewBox, soCullRect.Size = (456, 456)(non-empty). As a result, the test passes even on the broken baseline (pre-fix state), making it an ineffective regression test. - The reviewer (copilot-pull-request-reviewer) raised that removing the check from the scale >= 1 path silently drops MAUIR0001 protection for truly malformed SVGs (no width/height/viewBox). The author counter-argued that DrawPicture handles empty SVGs harmlessly.
- The reviewer's concern is partially valid: for truly malformed SVGs (no declared dimensions),
GetScaledSizecomputesscale = Infinity(due to 0/0 division), soscale >= 1is always true, and MAUIR0001 is now unreachable for those SVGs too. This is a silent regression of the protective error added in PR Fix: Throw a clear error when an SVG lacks dimensions instead of a NullReferenceException #33194.
Code Review Summary
Verdict: NEEDS_CHANGES
Confidence: high
Errors: 2 | Warnings: 1 | Suggestions: 1
Key code review findings:
- ❌
src/SingleProject/Resizetizer/src/SkiaSharpSvgTools.cs:45-48— MAUIR0001 error in the else branch is dead code for truly malformed SVGs. When an SVG has no declared dimensions (the case PR Fix: Throw a clear error when an SVG lacks dimensions instead of a NullReferenceException #33194 intended to protect),GetScaledSizecomputesscale = Infinity, so the else branch is never entered. The MAUIR0001 protection is effectively removed for malformed SVGs. - ❌
src/SingleProject/Resizetizer/test/UnitTests/images/appicon_empty.svg— Test SVG hasviewBox="0 0 456 456", makingCullRect.Size = (456, 456). The testEmptySvgAppIconSucceeds_Issue35293passes even on the broken baseline, so the Gate failed — the test does not verify the regression. ⚠️ src/SingleProject/Resizetizer/src/SkiaSharpSvgTools.cs:38-65— The fix does not address the NaN/Infinity arithmetic hazard inGetScaledSizewhenoriginalSize = (0,0)and noBaseSizeor explicitdpi.Sizeis provided. For non-app-icon SVG images rendered directly, this could cause silent NaN in canvas transform scaling.- 💡 Consider differentiating "empty content" (CullRect empty, declared dimensions valid) from "malformed" (no declared dimensions) for a more precise guard, so MAUIR0001 still fires for truly malformed SVGs.
Fix Candidates
| # | Source | Approach | Test Result | Files Changed | Notes |
|---|---|---|---|---|---|
| PR | PR #35305 | Move size.IsEmpty check into else (downscale) branch only | SkiaSharpSvgTools.cs, ResizetizeImagesTests.cs, appicon_empty.svg |
Original PR — test doesn't catch regression |
🔬 Code Review — Deep Analysis
Code Review — PR #35305
Independent Assessment
What this changes: The size.IsEmpty guard in SkiaSharpSvgTools.DrawUnscaled is relocated from the top of the method (before the scale >= 1 / scale < 1 branch) to inside the else (downscale, scale < 1) branch only. A new test and test SVG asset are added.
Inferred motivation: An SVG with valid viewport declarations (width, height, viewBox) but no drawn content will have an empty CullRect as reported by SkiaSharp's Svg.Skia library. The previous guard — added by PR #33194 — checked size.IsEmpty before reaching either code path, which meant a valid-but-empty SVG used as an app icon would always throw InvalidOperationException, even though the scale >= 1 path (canvas.DrawPicture) can handle an empty picture gracefully (it simply draws nothing). The downscale path is the one that actually requires non-zero dimensions, because it creates SKSurface from the raw pixel dimensions.
Is the approach sound? Yes. The behavioral split is well-founded:
DrawPicture(svg.Picture, Paint)— SkiaSharp handles an emptySKPicturesafely; the result is a transparent bitmap.SKSurface.Create(new SKImageInfo(0, 0))— would returnnullin SkiaSharp, causing aNullReferenceExceptionon the subsequent.Canvasaccess. The guard must stay here.
Moving the check into the else branch is the minimal, correct fix.
Reconciliation with PR Narrative
Author claims: The size.IsEmpty check was incorrectly placed to execute before both branches; only the downscale branch actually uses size to construct an SKImageInfo. Empty SVGs (valid dimensions, no content) produce a zero CullRect even though DrawPicture can handle them harmlessly.
Agreement: My independent reading matches exactly. The author's root-cause analysis is correct.
Prior review thread (already resolved): A previous copilot reviewer raised the concern that moving the check removes error protection for the scale >= 1 path. The author's rebuttal — "DrawPicture harmlessly draws nothing for empty SVGs" — is correct. The concern was about truly dimensionless SVGs (PR #32460), but (a) those also produce a blank asset on the DrawPicture path (no crash), and (b) the constructor already emits a warning log for zero-CullRect SVGs. The tradeoff is acceptable.
Findings
💡 Suggestion — Test does not assert output files are generated
File: src/SingleProject/Resizetizer/test/UnitTests/ResizetizeImagesTests.cs:120–136
EmptySvgAppIconSucceeds_Issue35293 checks only that task.Execute() returns true. For comparison, the analogous BasicImageProcessingWorks test calls AssertFileExists(GetPlatformOutputFileName(...)) after checking success. Without asserting that output PNG files were produced, a regression where the task "succeeds" but silently skips file generation would not be caught.
// Consider adding after Assert.True(success, ...):
AssertFileExists(GetPlatformOutputFileName("appicon.png")); // adjust to actual expected outputNot a blocker — the primary regression (crash / InvalidOperationException) is covered — but verifying file existence would make the test more robust.
💡 Suggestion — Stale constructor warning message
File: src/SingleProject/Resizetizer/src/SkiaSharpSvgTools.cs:29–30
The constructor logs: "SVG picture did not have a size and will fail to generate." After this fix, a zero-CullRect SVG at scale >= 1 does produce output (a transparent image). The message is now misleading for that code path. Consider updating to "SVG picture has an empty bounding box; output will be transparent." or similar.
Devil's Advocate
"Is the scale check reliable?" Yes — scale is a computed ratio in SkiaSharpTools.Draw. For standard app-icon DPI paths (1×, 1.5×, 2×, 3×), scale is always ≥ 1 when the target canvas is the same size or larger than the nominal image. The only time scale < 1 is triggered is when the canvas is smaller than the source image's nominal size — a narrower scenario. The guard in the else branch will fire correctly when needed.
"Could canvas.Scale(+∞, +∞) crash in the app-icon path?" When GetOriginalSize() returns 0×0 and the platform DPI path has a fixed dpi.Size, GetScaledSize produces +Infinity scale due to IEEE 754 division of a positive number by 0.0. canvas.Scale(+Infinity, +Infinity) with a subsequent DrawPicture on an empty picture is a no-op in Skia — no pixel writes occur. The bitmap is saved as a transparent PNG. This has always been the behavior before PR #33194; the current PR restores it for the scale >= 1 path.
"Should the error path be re-added for truly dimensionless SVGs at scale ≥ 1?" A more complete fix would distinguish between "empty content but valid viewport" (should succeed) and "no dimensions at all" (should error). However, implementing that distinction requires reading SVG attributes separately from CullRect, which is more invasive and out of scope for this focused regression fix. The existing constructor warning provides the signal for the "no dimensions" case.
CI Status
All completed checks are green (Build Windows/macOS Debug/Release, Pack, Helix Unit Tests, Integration Tests across all platforms and templates). Some checks show as pending which is consistent with a PR that has already merged — those jobs are simply no longer running against this branch. ✅
Verdict: LGTM
Confidence: high
Summary: The fix is logically sound. DrawPicture safely handles an empty SKPicture (produces transparent output), while SKSurface.Create(0, 0) does not — so confining the size.IsEmpty check to the downscale branch is the correct, minimal fix. The regression test covers the reported scenario. The two suggestions above are minor improvements that do not block merge. All CI checks pass.
🔧 Fix — Analysis & Comparison
Fix Candidates
| # | Source | Approach | Test Result | Files Changed | Notes |
|---|---|---|---|---|---|
| 1 | try-fix-1 (claude-opus-4.6) | Combine scale>=1 || size.IsEmpty as single condition; remove exception; fix test SVG to viewBox="0 0 0 0" |
✅ PASS | SkiaSharpSvgTools.cs, appicon_empty.svg |
No exception for any empty SVG; loses MAUIR0001 |
| 2 | try-fix-2 (claude-sonnet-4.6) | Compound guard if (size.IsEmpty && scale < 1) throw at top of method; fix test SVG |
✅ PASS | SkiaSharpSvgTools.cs, appicon_empty.svg |
Preserves some error path; note scale=NaN (malformed SVG) → NaN<1=false so error unreachable |
| 3 | try-fix-3 (gpt-5.3-codex) | Parse SVG XML for declared dimensions; add hasDeclaredSize field; throw only when size.IsEmpty && !hasDeclaredSize |
❌ FAIL | SkiaSharpSvgTools.cs, appicon_empty.svg |
Native library load error in environment; approach is architecturally most complete |
| 4 | try-fix-4 (claude-sonnet-4.6) | Fix ONLY the test SVG (dimensionless <svg xmlns>) + update stale warning message; PR code fix unchanged |
✅ PASS | SkiaSharpSvgTools.cs (warning msg only), appicon_empty.svg |
Minimal — validates the PR code is correct; only test was broken |
| PR | PR #35305 | Move size.IsEmpty check into else (downscale) branch only | SkiaSharpSvgTools.cs, ResizetizeImagesTests.cs, appicon_empty.svg |
Code logic is correct; test SVG has non-empty CullRect, so gate test passes vacuously |
Cross-Pollination
After all 4 attempts:
Key finding: Attempt 4 confirmed that the PR's code fix is architecturally correct. The gate failed due to an ineffective test SVG, not a code error.
The three passing approaches are:
scale >= 1 || size.IsEmpty(Attempt 1) — eliminates error entirely; simplest but drops MAUIR0001size.IsEmpty && scale < 1guard at top (Attempt 2) — preserves throw path for scale<1 but unreachable for malformed SVGs in practice- Test-only fix + warning message update (Attempt 4) — validates PR code is correct; minimal invasive change
| Model | Round | New Ideas? | Details |
|---|---|---|---|
| claude-opus-4.6 | 2 | NO NEW IDEAS | Attempts 1 and 4 already cover the test-fix and code-simplification space |
| claude-sonnet-4.6 | 2 | NO NEW IDEAS | Attempt 2 and 4 cover the compound-condition and test-only approaches |
| gpt-5.3-codex | 2 | NO NEW IDEAS | Attempt 3's metadata approach was the most sophisticated; env failure, not conceptual failure |
Exhausted: Yes
Selected Fix: try-fix-4 — PR code fix is correct; only the test SVG needs to be a truly dimensionless SVG to catch the regression. Most targeted, minimal change.
📋 Report — Final Recommendation
⚠️ Final Recommendation: REQUEST CHANGES
Phase Status
| Phase | Status | Notes |
|---|---|---|
| Pre-Flight | ✅ COMPLETE | Issue #35293, Resizetizer SVG fix |
| Code Review | LGTM (high) | 0 errors, 0 warnings, 2 minor suggestions |
| Gate | ❌ FAILED | Test SVG has non-empty CullRect — test passes vacuously on broken baseline |
| Try-Fix | ✅ COMPLETE | 4 attempts, 3 passing |
| Report | ✅ COMPLETE |
Code Review Impact on Try-Fix
The code review found 2 minor suggestions (💡) only — no errors or warnings. These findings directly guided try-fix exploration: Attempt 4 specifically addressed the inaccurate warning message and invalid test SVG, both of which were flagged in the code review. The expert reviewer's LGTM verdict helped all try-fix models confirm that the code logic is sound and exploration should focus on the test quality, not the implementation.
Summary
PR #35305's code fix (moving size.IsEmpty into the else/downscale branch) is architecturally correct and minimal. However, the gate failed because the regression test uses an SVG with viewBox="0 0 456 456" — Svg.Skia sets CullRect from the viewBox, so size.IsEmpty is false even on the broken baseline, meaning the test passes vacuously without the fix. The winning candidate (pr-plus-reviewer) adds a dimensionless test SVG and updates the stale constructor warning message.
Root Cause
PR #33194 moved the size.IsEmpty guard to execute before both code paths in DrawUnscaled. Empty SVGs (valid declared dimensions, no drawn content) have an empty CullRect from Svg.Skia even though DrawPicture handles them safely. The guard only needs to protect the downscale path, where SKImageInfo(0, 0) would create a null surface.
Fix Quality
The PR's code logic is correct (LGTM from independent expert review). The test quality is insufficient: the test SVG appicon_empty.svg has viewBox="0 0 456 456" which provides non-zero CullRect dimensions, making the regression test ineffective. The pr-plus-reviewer candidate fixes this by using a dimensionless SVG (no width/height/viewBox) that genuinely triggers an empty CullRect and causes the test to fail on the broken baseline.
Selected Winner: pr-plus-reviewer
- PR code fix: ✅ correct (unchanged)
- Test SVG: fixed to
<svg version="1.1" xmlns="http://www.w3.org/2000/svg">(truly empty CullRect) - Warning message: updated from "will fail to generate" to "may render at reduced quality when downscaled"
MauiBot
left a comment
There was a problem hiding this comment.
Expert Review — 2 findings
See inline comments for details.
| var task = GetNewTask(items); | ||
| var success = task.Execute(); | ||
|
|
||
| Assert.True(success, LogErrorEvents.FirstOrDefault()?.Message); |
There was a problem hiding this comment.
[minor] Regression Prevention — EmptySvgAppIconSucceeds_Issue35293 checks only that task.Execute() returns true, but does not verify that output PNG files were actually produced. The comparable BasicImageProcessingWorks test calls AssertFileExists(GetPlatformOutputFileName(...)) after the success assertion. Without a file-existence check a future regression where the task silently skips output generation would pass this test. Consider adding AssertFileExists for the expected platform-specific output file (e.g., the app icon PNGs) to make the test a full regression guard.
|
/backport to release/10.0.1xx-sr7 |
|
Started backporting to |
… valid) SVG (#35423) Backport of #35305 to release/10.0.1xx-sr7 /cc @kubaflo @Shalini-Ashokan --------- Co-authored-by: Shalini-Ashokan <102292178+Shalini-Ashokan@users.noreply.github.com>
<!-- !!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING MAIN. !!!!!!! --> <!-- Please let the below note in for people that find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you! <!-- !!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING MAIN. !!!!!!! --> ### Issue Details Build fails with InvalidOperationException when using an empty (but valid) SVG as the app icon. The SVG has width, height, and viewBox but no drawn shapes inside. ### Root Cause PR #33194 moved the size.IsEmpty check to run before both code paths in DrawUnscaled, but size (from CullRect) is only needed in the downscale path. Empty SVGs have a zero CullRect even with valid declared dimensions, so the check incorrectly blocks the upscale path that never uses size. ### Description of Change Moved the size.IsEmpty check from before both branches into only the else (downscale) branch where size is actually used. The scale >= 1 path calls DrawPicture directly, which harmlessly draws nothing for empty SVGs, producing a valid transparent image. Validated the behavior in the following platforms - [x] Android - [x] Windows - [x] iOS - [x] Mac ### Issues Fixed Fixes #35293 ### Output ScreenShot |Before|After| |--|--| | <video src="https://github.com/user-attachments/assets/cf8040d6-9b0f-4867-bd4a-1713ea41d1d5" >| <video src="https://github.com/user-attachments/assets/97c09d5e-b2cc-4a13-b5a3-dc056dacba78">|
…xx-sr8 (#35810) <!-- Please let the below note in for people that find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you! ## Cut-then-merge step 2 of 2 SR8 was cut from `main` at [`e02d6b6dc2`](e02d6b6) (commit "Add gh-aw rerun review scanner (#35685)"). This PR pulls the SR7 stabilization work into SR8 so SR8 contains everything that's in SR7. - **Base:** `release/10.0.1xx-sr8` @ [`e02d6b6dc2`](e02d6b6) - **Merging in:** `release/10.0.1xx-sr7` @ [`9da598b4a1`](9da598b) (PatchVersion bump to 71) - **Merge base:** [`f8cb875e`](f8cb875eee) ("[Testing] The Windows WebView category is removed from CI…" #35335) - **Strategy:** non-fast-forward merge commit (preserves both branches' history) ## Conflict resolution Two trivial conflicts, both resolved by taking the SR8 (`HEAD`) side: | File | Why it conflicted | Resolution | | --- | --- | --- | | [`eng/Versions.props`](https://github.com/dotnet/maui/blob/release/10.0.1xx-sr8/eng/Versions.props) | SR7 bumped `PatchVersion` 70→71 (#35786); SR8 starts at 80 | Keep `PatchVersion=80` (SR8 is the higher patch band) | | `src/Controls/src/Core/Compatibility/Handlers/Shell/iOS/ShellSectionRenderer.cs` | Whitespace-only difference (`false; //` vs `false; //`) in two comments | Keep SR8's whitespace | No semantic conflicts. ## Inherited from SR7 26 SR7-only commits land in SR8 via this merge. The source PRs are: <details> <summary>Source PRs (43, deduped by commit)</summary> #35020, #35072, #35092, #35150, #35223, #35299, #35305, #35347, #35356, #35359, #35360, #35421, #35423, #35424, #35425, #35426, #35427, #35428, #35430, #35434, #35441, #35447, #35461, #35480, #35503, #35520, #35521, #35559, #35566, #35585, #35625, #35642, #35664, #35689, #35690, #35691, #35692, #35693, #35694, #35703, #35744, #35768, #35786 Includes the SR7 revert chain: - #35689 — Revert PR #30068 (FontImageSource centering on Windows) - #35694 — Revert TalkBack RadioButton fix - #35703 — Revert Shell.NavBarIsVisible fix - #35744 — Revert HybridWebView WebView fix - #35461, #35503 — additional Android reverts </details> After this lands, the release-readiness tracker can survey `release/10.0.1xx-sr8` directly instead of using `-Candidate -InheritFromPriorSr` mode against SR7.
<!-- !!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING MAIN. !!!!!!! --> <!-- Please let the below note in for people that find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you! <!-- !!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING MAIN. !!!!!!! --> ### Issue Details Build fails with InvalidOperationException when using an empty (but valid) SVG as the app icon. The SVG has width, height, and viewBox but no drawn shapes inside. ### Root Cause PR #33194 moved the size.IsEmpty check to run before both code paths in DrawUnscaled, but size (from CullRect) is only needed in the downscale path. Empty SVGs have a zero CullRect even with valid declared dimensions, so the check incorrectly blocks the upscale path that never uses size. ### Description of Change Moved the size.IsEmpty check from before both branches into only the else (downscale) branch where size is actually used. The scale >= 1 path calls DrawPicture directly, which harmlessly draws nothing for empty SVGs, producing a valid transparent image. Validated the behavior in the following platforms - [x] Android - [x] Windows - [x] iOS - [x] Mac ### Issues Fixed Fixes #35293 ### Output ScreenShot |Before|After| |--|--| | <video src="https://github.com/user-attachments/assets/cf8040d6-9b0f-4867-bd4a-1713ea41d1d5" >| <video src="https://github.com/user-attachments/assets/97c09d5e-b2cc-4a13-b5a3-dc056dacba78">|
<!-- !!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING MAIN. !!!!!!! --> <!-- Please let the below note in for people that find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you! <!-- !!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING MAIN. !!!!!!! --> ### Issue Details Build fails with InvalidOperationException when using an empty (but valid) SVG as the app icon. The SVG has width, height, and viewBox but no drawn shapes inside. ### Root Cause PR #33194 moved the size.IsEmpty check to run before both code paths in DrawUnscaled, but size (from CullRect) is only needed in the downscale path. Empty SVGs have a zero CullRect even with valid declared dimensions, so the check incorrectly blocks the upscale path that never uses size. ### Description of Change Moved the size.IsEmpty check from before both branches into only the else (downscale) branch where size is actually used. The scale >= 1 path calls DrawPicture directly, which harmlessly draws nothing for empty SVGs, producing a valid transparent image. Validated the behavior in the following platforms - [x] Android - [x] Windows - [x] iOS - [x] Mac ### Issues Fixed Fixes #35293 ### Output ScreenShot |Before|After| |--|--| | <video src="https://github.com/user-attachments/assets/cf8040d6-9b0f-4867-bd4a-1713ea41d1d5" >| <video src="https://github.com/user-attachments/assets/97c09d5e-b2cc-4a13-b5a3-dc056dacba78">|
<!-- !!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING MAIN. !!!!!!! --> <!-- Please let the below note in for people that find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you! <!-- !!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING MAIN. !!!!!!! --> ### Issue Details Build fails with InvalidOperationException when using an empty (but valid) SVG as the app icon. The SVG has width, height, and viewBox but no drawn shapes inside. ### Root Cause PR #33194 moved the size.IsEmpty check to run before both code paths in DrawUnscaled, but size (from CullRect) is only needed in the downscale path. Empty SVGs have a zero CullRect even with valid declared dimensions, so the check incorrectly blocks the upscale path that never uses size. ### Description of Change Moved the size.IsEmpty check from before both branches into only the else (downscale) branch where size is actually used. The scale >= 1 path calls DrawPicture directly, which harmlessly draws nothing for empty SVGs, producing a valid transparent image. Validated the behavior in the following platforms - [x] Android - [x] Windows - [x] iOS - [x] Mac ### Issues Fixed Fixes #35293 ### Output ScreenShot |Before|After| |--|--| | <video src="https://github.com/user-attachments/assets/cf8040d6-9b0f-4867-bd4a-1713ea41d1d5" >| <video src="https://github.com/user-attachments/assets/97c09d5e-b2cc-4a13-b5a3-dc056dacba78">|
<!-- !!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING MAIN. !!!!!!! --> <!-- Please let the below note in for people that find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you! <!-- !!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING MAIN. !!!!!!! --> ### Issue Details Build fails with InvalidOperationException when using an empty (but valid) SVG as the app icon. The SVG has width, height, and viewBox but no drawn shapes inside. ### Root Cause PR #33194 moved the size.IsEmpty check to run before both code paths in DrawUnscaled, but size (from CullRect) is only needed in the downscale path. Empty SVGs have a zero CullRect even with valid declared dimensions, so the check incorrectly blocks the upscale path that never uses size. ### Description of Change Moved the size.IsEmpty check from before both branches into only the else (downscale) branch where size is actually used. The scale >= 1 path calls DrawPicture directly, which harmlessly draws nothing for empty SVGs, producing a valid transparent image. Validated the behavior in the following platforms - [x] Android - [x] Windows - [x] iOS - [x] Mac ### Issues Fixed Fixes #35293 ### Output ScreenShot |Before|After| |--|--| | <video src="https://github.com/user-attachments/assets/cf8040d6-9b0f-4867-bd4a-1713ea41d1d5" >| <video src="https://github.com/user-attachments/assets/97c09d5e-b2cc-4a13-b5a3-dc056dacba78">|
## What's Coming .NET MAUI inflight/candidate introduces significant improvements across all platforms with focus on quality, performance, and developer experience. This release includes 153 commits with various improvements, bug fixes, and enhancements. ## Activityindicator - [Android] Fix CollectionView ActivityIndicator not animating after header height change by @Vignesh-SF3580 in #35358 <details> <summary>🔧 Fixes</summary> - [CollectionView items fail to update ActivityIndicator state after header height change](#33780) </details> ## Animation - [Android] Fix Shadow property affecting transform matrix. by @Shalini-Ashokan in #32962 <details> <summary>🔧 Fixes</summary> - [[Android] Applying Shadow property affects the properties in Visual Transform Matrix](#32731) </details> ## API - Add delegate-based alert dialog extensibility convention (no public API changes) by @Redth in #35095 <details> <summary>🔧 Fixes</summary> - [Alert/Dialog system (`DisplayAlert`, `DisplayActionSheet`, `DisplayPromptAsync`) needs a public extensibility point](#34104) </details> ## Blazor - [Android] Fix for BlazorWebView predictive back callback blocks Android back-to-home animation by @BagavathiPerumal in #35538 <details> <summary>🔧 Fixes</summary> - [[Android] BlazorWebView predictive back callback blocks Android back-to-home animation](#35397) </details> - [Android] Fix BlazorWebView back callback can swallow the first Back press when its callback is stale-enabled by @devanathan-vaithiyanathan in #35611 <details> <summary>🔧 Fixes</summary> - [[inflight regression] Android BlazorWebView back callback can swallow the first Back press when its callback is stale-enabled](#35573) </details> ## Border - [Windows] Fixed the ContentView clip is not updated when wrapping inside the Border by @Ahamed-Ali in #30408 <details> <summary>🔧 Fixes</summary> - [[Windows] ContentView clip is not updated when wrapping inside the Border](#30404) </details> - Fix Border.StrokeDashArray leaks dashed Borders when using a shared Application resource by @devanathan-vaithiyanathan in #35544 <details> <summary>🔧 Fixes</summary> - [`Border.StrokeDashArray` leaks dashed Borders when using a shared Application resource](#35492) </details> - [Windows] Border: Add AutomationPeer support by @Vignesh-SF3580 in #35577 <details> <summary>🔧 Fixes</summary> - [Adding AutomationPeers to Windows Borders](#27627) </details> - [Windows] Fixed BoxView improper rendering inside Border by @Dhivya-SF4094 in #28465 <details> <summary>🔧 Fixes</summary> - [[Windows] Issues with BoxView Placement Inside Border](#19668) </details> ## Button - Prevent NullReferenceException in LayoutButton by @GamesAgeddon in #35284 <details> <summary>🔧 Fixes</summary> - [NullReferenceException on iOS in Button.LayoutButton from WrapperView.LayoutSubviews](#31048) </details> - Fix TextColor null reset to restore platform defaults on iOS and Android by @Shalini-Ashokan in #35563 <details> <summary>🔧 Fixes</summary> - [[Windows, Android, iOS & Mac]Button TextColor does not restore to platform default when reset to null after dynamic update](#35513) </details> ## CollectionView - Fix CollectionView grid spacing updates for first row and column by @KarthikRajaKalaimani in #34527 <details> <summary>🔧 Fixes</summary> - [[MAUI] I2_Vertical grid for horizontal Item Spacing and Vertical Item Spacing - horizontally updating the spacing only applies to the second column](#34257) </details> - [MacCatalyst] Fix CollectionView Header/Footer Not Expanding to Content Width by @KarthikRajaKalaimani in #35213 <details> <summary>🔧 Fixes</summary> - [[MacOS][CV2] I8_View header and footer_Horizontal_View - Footer on the right doesn't adapt when resizing the window](#35113) </details> - [iOS/MacCatalyst] Fix IndicatorView not updating when IndicatorSize is changed to default value by @Shalini-Ashokan in #35215 <details> <summary>🔧 Fixes</summary> - [[iOS/MacCatalyst] IndicatorView does not update when IndicatorSize is dynamically changed to the default value](#35214) </details> - CollectionView selecteditem background lost if collectionview (or parent) IsEnabled changed. by @KarthikRajaKalaimani in #31540 <details> <summary>🔧 Fixes</summary> - [CollectionView selecteditem background lost if collectionview (or parent) IsEnabled changed.](#20615) </details> - [iOS/macOS] CollectionView: Fix FlowDirection not working on EmptyView by @Dhivya-SF4094 in #32674 <details> <summary>🔧 Fixes</summary> - [[iOS, MacOS] FlowDirection not working on EmptyView in CollectionView](#32404) - [[iOS, Mac] CollectionView EmptyViewTemplate content text is mirrored when FlowDirection is RightToLeft](#34522) </details> - Fix iOS CollectionView stale layout invalidations by @filipnavara in #35245 <details> <summary>🔧 Fixes</summary> - [[iOS] CollectionView tries to invalidate cells with invalid indexes](#35244) </details> - Fix Android grouped CollectionView header/footer rebind leak by @AdamEssenmacher in #35368 <details> <summary>🔧 Fixes</summary> - [Memory leak when scrolling a CollectionView with IsGrouped=true](#17698) </details> - [Windows] Fix for Item should scrolled based on the GroupHeaderTemplate by @SuthiYuvaraj in #28074 <details> <summary>🔧 Fixes</summary> - [I9_Scroll by object for grouped data - The group name is always pined at the top after clicking 'Scroll to Proboscis Monkey' button](#27922) </details> - [Android] Fix ScrollTo regression when IsGrouped true on CollectionView by @SubhikshaSf4851 in #35356 <details> <summary>🔧 Fixes</summary> - [[10.0.60] ScrollTo(0) not working anymore on CollectionView when IsGrouped="True"](#35313) </details> - [Android] Fix CollectionView scrolling performance regression by @devanathan-vaithiyanathan in #35379 <details> <summary>🔧 Fixes</summary> - [[10.0.60] CollectionView scrolling performance regression](#35344) </details> - Optimize parent dynamic resource refresh by @AdamEssenmacher in #35408 <details> <summary>🔧 Fixes</summary> - [Memory usage increases when scrolling collectionview if resources count is more than 191](#22053) </details> - Fix CI failure for CollectionView Scrolling Feature Tests due to PR #35379 by @devanathan-vaithiyanathan in #35536 - [iOS & Mac] CarouselViewController2 leaks on iOS/MacCatalyst due to unremoved orientation notification observer by @SubhikshaSf4851 in #35532 <details> <summary>🔧 Fixes</summary> - [CarouselViewController2 leaks on iOS/MacCatalyst due to unremoved orientation notification observer](#35472) </details> - Fix CollectionView.SelectedItems leaks popped views when bound to a retained ObservableCollection by @HarishwaranVijayakumar in #35558 <details> <summary>🔧 Fixes</summary> - [`CollectionView.SelectedItems` leaks popped views when bound to a retained `ObservableCollection`](#35497) </details> - Fix for Android - Dynamic Updates to CollectionView Header/Footer and Templates Are Not Displayed by @SuthiYuvaraj in #28904 <details> <summary>🔧 Fixes</summary> - [Android - Dynamic Updates to CollectionView Header/Footer and Templates Are Not Displayed](#28676) </details> - [Windows] Fix CarouselView EmptyView display when filtering to zero items by @Shalini-Ashokan in #29247 <details> <summary>🔧 Fixes</summary> - [[Windows] [Scenario Day] EmptyView using Template displayed at the same time as the content](#7150) </details> - [Android/iOS] Fix IsEnabled=False on CollectionView not working by @devanathan-vaithiyanathan in #27749 <details> <summary>🔧 Fixes</summary> - [[iOS/Android] CollectionView IsEnabled Not Working](#27770) </details> - Fix CarouselView.Loop property does not update dynamically and fails to maintain the scroll position when the loop value is changed at runtime by @devanathan-vaithiyanathan in #29527 <details> <summary>🔧 Fixes</summary> - [[Android] CarouselView.Loop = false causes crash on Android when changed at runtime](#29411) - [Loop Binding in CarouselView Not Updating Dynamically at Runtime](#29449) </details> - [iOS / Mac] Fix CollectionView.ScrollTo(index) silently failing whenIsGrouped="True" by @Dhivya-SF4094 in #35609 <details> <summary>🔧 Fixes</summary> - [CollectionView.ScrollTo(index) doesn't work correctly when IsGrouped="True" on iOS, MacCatalyst, and Windows](#35326) </details> - Fix Android nested carousel scrolling by @AdamEssenmacher in #35656 <details> <summary>🔧 Fixes</summary> - [Vertical scrolling not working for CarouselView and CustomLayouts](#7814) </details> - [Inflight regression] Fixed Test failures ModalTabbedPagePushAsyncShouldOverlayBottomNavigationView and GroupedCollectionViewScrollToIndexScrollsToCorrectItem by @Dhivya-SF4094 in #35823 - Fix CarouselView tests fail in June 8 Candidate by @devanathan-vaithiyanathan in #35825 ## Core - Reduce allocations on AnimationManager by @pictos in #35612 <details> <summary>🔧 Fixes</summary> - [AnimationManager is allocating a lot](#35654) </details> ## Core Lifecycle - Fix device test memory by @pictos in #35487 <details> <summary>🔧 Fixes</summary> - [Memory leak Device.Test pass with false positive](#35485) </details> ## Datepicker - Fix MacCatalyst DatePicker focus handling by @AdamEssenmacher in #35553 <details> <summary>🔧 Fixes</summary> - [[mauipalooza] DatePicker focus only works first time](#5947) </details> ## DateTimePicker - [Android] Fix DatePicker dialog dismisses after the device is rotated by @HarishwaranVijayakumar in #34980 <details> <summary>🔧 Fixes</summary> - [[Android] [Regression] DatePicker dialog dismisses after the device is rotated](#34973) </details> ## Docs - doc: Add paragraph to README.md explaining how to fetch the `maui` project templates by @durandt in #34561 ## Drawing - [Android] Fix LinearGradientBrush rendering as opaque black box by @SubhikshaSf4851 in #35299 <details> <summary>🔧 Fixes</summary> - [[Regression] LinearGradientBrush broken on Android in 10.0.60](#35280) - [10.0.60 breaks transparency on Brushes (on Android?)](#35354) </details> - Fix polygon points collection handler leak by @AdamEssenmacher in #35526 <details> <summary>🔧 Fixes</summary> - [PolygonHandler and PolylineHandler leak when Points is replaced before disconnect](#35387) </details> ## Editor - [iOS] Fix Editor losing scrollability after rotation when CharacterSpacing is applied by @Vignesh-SF3580 in #35309 <details> <summary>🔧 Fixes</summary> - [[.NET 10][iOS] D2 - Editor can't be scrolled after rotating simulator.](#35114) </details> - [Inflight/Candidate][iOS & Mac] Fix for Editor height inconsistency when VerticalTextAlignment is Center or End on iOS and MacCatalyst by @BagavathiPerumal in #35662 <details> <summary>🔧 Fixes</summary> - [[MAUI] D13_Customize_Text_Alignment - Text Editor Height is not consistent](#35615) </details> ## Entry - [iOS/Mac] Fix Entry clear button retaining tint color after TextColor is reset to null by @SyedAbdulAzeemSF4852 in #35177 <details> <summary>🔧 Fixes</summary> - [[iOS/Mac]Entry ClearButtonVisibility color does not reset when TextColor is set to null](#35076) </details> - [iOS/MacCatalyst] Fix Entry clear button appearing dimmed compared to TextColor by @SyedAbdulAzeemSF4852 in #35541 <details> <summary>🔧 Fixes</summary> - [[MacCatalyst] [Entry] ClearButtonVisibility color appears dimmed compared to TextColor](#35517) </details> - Fix pill-shaped focus ring on macOS 26 by @Dhivya-SF4094 in #35393 <details> <summary>🔧 Fixes</summary> - [.Net 10 Picker item not centered and wrong focus outline of Entry on Mac](#34899) </details> - Fix Entry select all text on refocus not working on WinUI by @kubaflo in #35383 ## Essentials - [Android] Fix Capture video crashes after stopping recording on Android 12 by @HarishwaranVijayakumar in #35638 <details> <summary>🔧 Fixes</summary> - [Capture video crashes after stopping recording on Android 12](#28891) </details> - [Essentials] Browser.OpenAsync(External): drop visibility-filtered ResolveActivity pre-check by @Kebechet in #35652 <details> <summary>🔧 Fixes</summary> - [Browser.OpenAsync(External) on Android throws FeatureNotSupportedException for verified App Link owner URLs even with documented <queries> fix applied](#35651) </details> ## Essentials Texttospeech - [Mac, iOS, Windows] Fix for inconsistent Text-to-Speech rate behavior by @HarishwaranVijayakumar in #32850 <details> <summary>🔧 Fixes</summary> - [[Essentials] TTS rate](#32492) </details> ## Flyoutpage - [iOS/Mac] Fix FlyoutPage RTL FlowDirection is not working by @devanathan-vaithiyanathan in #34831 <details> <summary>🔧 Fixes</summary> - [[iOS/Mac] FlyoutPage RTL FlowDirection is not working properly](#34830) </details> - [Android] Fix for Android 16 Back button is not working after command from FlyoutPage by @BagavathiPerumal in #35196 <details> <summary>🔧 Fixes</summary> - [Android: BackButton on Android 16 not working after command from FlyOutPage](#33508) </details> ## Gestures - Fix DragGestureRecognizer.DropCompleted event not firing in Android platform by @KarthikRajaKalaimani in #35179 <details> <summary>🔧 Fixes</summary> - [[Android] DragGestureRecognizer.DropCompleted event not firing](#17554) </details> - Windows: Ensure layouts without background participate in hit testing by @jpd21122012 in #34364 <details> <summary>🔧 Fixes</summary> - [[Windows] TapGestureRecognizer does NOT work on a ContentView without Background](#32279) </details> - [iOS] Fix VoiceOver dropping child labels on layouts with SemanticProperties.Hint or TapGestureRecognizer by @Vignesh-SF3580 in #35590 <details> <summary>🔧 Fixes</summary> - [[iOS] VoiceOver does not correctly describe View with GestureRecognizers](#34380) </details> ## Hybridwebview - Fix RemovePossibleQueryString to also strip URL fragments by @kubaflo in #35551 <details> <summary>🔧 Fixes</summary> - [HybridWebViewQueryStringHelper.RemovePossibleQueryString removes '?' but not other special characters e.g. '#'](#31472) </details> - [Revert] - [Windows] Fix WebView blank rendering when used with HybridWebView by @SubhikshaSf4851 in #35814 ## Image - Avoid image source layout invalidation for fixed-size views by @AdamEssenmacher in #35369 <details> <summary>🔧 Fixes</summary> - [Image source swaps thrash layout under fixed constraints, tanking frame rate when scrolling virtualized collections](#32457) </details> - [Windows] Fix Image layout inconsistency caused by async decode race in GetDesiredSize by @praveenkumarkarunanithi in #34699 <details> <summary>🔧 Fixes</summary> - [[Windows] Image cropping produces inconsistent results when window is minimized or resized](#32393) </details> - [Testing] Include more testing around Windows Image Aspect recent fixes by @kubaflo in #35620 <details> <summary>🔧 Fixes</summary> - [[Testing] Include more testing around Windows Image Aspect recent fixes](#31686) </details> - Revert PR #30068 — Fix FontImageSource centering regression on Windows by @Shalini-Ashokan in #35642 <details> <summary>🔧 Fixes</summary> - [[Windows] Image with FontImageSource is not centered and gets clipped when WidthRequest/HeightRequest equals FontImageSource Size](#35618) </details> - [Android] Fix screenshot from WebView content not working by @kubaflo in #35384 <details> <summary>🔧 Fixes</summary> - [[Android] Loading the captured screenshot from webview content to Image control does not visible](#30010) </details> ## Label - Improve label mapping performance and ensure complete coverage including ToPlatform and subsequent property changes by @Tamilarasan-Paranthaman in #31159 - Fix for Label.FormattedText leaks labels when shared FormattedString is stored in Application.Resources by @BagavathiPerumal in #35582 <details> <summary>🔧 Fixes</summary> - [`Label.FormattedText` leaks labels when shared `FormattedString` is stored in `Application.Resources`](#35495) </details> - [iOS] Fix Label Span formatting test failures on candidate branch by @Vignesh-SF3580 in #35815 ## Layout - [iOS, Mac] Fix Item spacing not properly applied between items in Horizontal LinearItemsLayout by @Dhivya-SF4094 in #35445 <details> <summary>🔧 Fixes</summary> - [[CollectionView2] Item spacing not properly applied between items in Horizontal LinearItemsLayout](#35429) </details> - [Windows] Add Automation Id support for Layouts. by @SubhikshaSf4851 in #35562 <details> <summary>🔧 Fixes</summary> - [[Windows] AutomationId does not work for ContentView, Layouts and controls that inherit them](#4715) </details> - Avoid layout diagnostics allocations without listeners by @AdamEssenmacher in #35475 <details> <summary>🔧 Fixes</summary> - [MAUI 10 layout diagnostics no-consumer path is not zero-allocation](#35473) </details> - [Windows/Android] FlexLayout: Fix wrap misalignment due to floating-point precision by @SuthiYuvaraj in #31341 <details> <summary>🔧 Fixes</summary> - [FlexLayout Wrap Misalignment with Dynamically-Sized Buttons in .NET MAUI](#30957) </details> ## Listview - Fix Binding for ListView.IsRefreshing by @bill2004158 in #28516 <details> <summary>🔧 Fixes</summary> - [Bind ListView.IsRefreshing is not work.](#28514) </details> ## Map - Fix iOS/Catalyst MapPool retention with MapElements by @AdamEssenmacher in #35480 <details> <summary>🔧 Fixes</summary> - [iOS/Mac Catalyst MapHandler leaks MAUI Map views and MapElements through MapPool](#35479) </details> - Fix Android map view lifecycle cleanup by @AdamEssenmacher in #35476 <details> <summary>🔧 Fixes</summary> - [Navigating to a page with Maps multiple times Increase RAM Usage but doesn't reduce it back after navigating back](#15257) </details> - Fix Android map element options retention by @AdamEssenmacher in #35634 <details> <summary>🔧 Fixes</summary> - [[Regression] [Android] [Maps] Map locks up after rendering 50 Polylines](#20502) </details> ## Menubar - [MacCatalyst] Fix KeyboardAccelerator with Cmd+Shift modifiers breaks entire MenuBarItem on Mac Catalyst by @KarthikRajaKalaimani in #35318 <details> <summary>🔧 Fixes</summary> - [[Bug] KeyboardAccelerator with Cmd+Shift modifiers breaks entire MenuBarItem on Mac Catalyst](#35279) </details> ## Navigation - [iOS, Mac] Fix OnBackButtonPressed not invoked for NavigationPage and Shell by @Dhivya-SF4094 in #35072 <details> <summary>🔧 Fixes</summary> - [On Screen Back Button Does Not Fire OnBackButtonPressed in Android](#9095) - [ContentPage's OnBackButtonPressed not invoked on iOS and MacCatalyst](#8296) </details> - Fix Android stale ContainerView root leak by @AdamEssenmacher in #35372 <details> <summary>🔧 Fixes</summary> - [Android: Stale ContainerView retains replaced FlyoutPage graph](#35371) </details> - [Android] Fix for predictive back-to-home animation blocked by unconditional back callback registration by @BagavathiPerumal in #35223 <details> <summary>🔧 Fixes</summary> - [OnBackInvokedCallbacks block back-to-home animation](#34594) - [Migrate to OnBackPressedCallback](#24752) </details> - Revert [Android, iOS] - Flyout icon should remain visible when a page is pushed onto a NavigationPage or Shell page with the back button disabled. by @praveenkumarkarunanithi in #35604 ## Picker - [iOS] Fix Picker CharacterSpacing lost after item selection when Title is set by @SyedAbdulAzeemSF4852 in #34974 <details> <summary>🔧 Fixes</summary> - [[iOS] Picker loses CharacterSpacing after item selection when Title is set](#34971) </details> - [iOS] Fix Picker CharacterSpacing ignored on initial load by @SyedAbdulAzeemSF4852 in #34957 <details> <summary>🔧 Fixes</summary> - [[iOS] Picker ignores CharacterSpacing on initial load](#34955) </details> - [Windows] Fix for Picker CharacterSpacing Not Being Applied to Title and Dropdown Items by @SyedAbdulAzeemSF4852 in #30612 <details> <summary>🔧 Fixes</summary> - [[Windows] Picker CharacterSpacing property not applied to Title and PickerItems text](#30464) </details> - Fix Picker SelectedIndex deferred initialization by @AdamEssenmacher in #35629 <details> <summary>🔧 Fixes</summary> - [Picker Attribute "SelectedIndex" Not being respected on page load on Android?](#9150) </details> ## Progressbar - Fix iOS ProgressBar bounding box by @AdamEssenmacher in #35507 <details> <summary>🔧 Fixes</summary> - [[iOS] ProgressBar and Label don't correctly obey height and width at the core level](#7935) </details> ## RadioButton - [Windows, Android] Fix Border Color and Border Width Not applying for Radio Button by @HarishwaranVijayakumar in #35616 <details> <summary>🔧 Fixes</summary> - [[Windows, Android] Border Color and Border Width Not applying for Radio Button.](#35587) </details> - [inflight/current] Fixes a CS0111 build failure in RadioButton.cs caused by a duplicate OnPropertyChanged override by @HarishwaranVijayakumar in #35631 - Revert - Fix TalkBack not correctly narrating RadioButtons with Content by @devanathan-vaithiyanathan in #35625 <details> <summary>🔧 Fixes</summary> - [[Android] MissingMethodException AccessibilityNodeInfoCompat.set_Checked(bool) on 10.0.70 due to AndroidX.Core 1.17 breaking change](#35584) </details> ## Refreshview - [Windows] Fix RefreshView IsRefreshing property not working while binding by @devanathan-vaithiyanathan in #34845 <details> <summary>🔧 Fixes</summary> - [[Windows] RefreshView IsRefreshing property not working while binding](#30535) </details> - [Android] Fix for RefreshView triggering pull-to-refresh when scrolling inside a WebView with internal scrollable content by @BagavathiPerumal in #34614 <details> <summary>🔧 Fixes</summary> - [[Android] RefreshView triggers pull-to-refresh immediately when scrolling up inside a WebView](#33510) </details> ## SafeArea - [Android] Fix bottom safe area padding dropping to zero when keyboard is shown by @praveenkumarkarunanithi in #35084 <details> <summary>🔧 Fixes</summary> - [[Android] Bottom insets issues when keyboard is shown.](#32871) </details> - Gate SafeArea inset listeners in recycler items by @AdamEssenmacher in #35664 <details> <summary>🔧 Fixes</summary> - [[10.0.60] CollectionView scrolling performance regression](#35344) </details> ## ScrollView - [Windows] Fix COMException when restoring a ScrollView as ContentPage.Content after swapping it out by @Vignesh-SF3580 in #35360 <details> <summary>🔧 Fixes</summary> - [COMException when clone a page's content to a object and set it back later in mainthread on Windows](#35277) </details> - Fix - ScrollView.ScrollToAsync(x, y, animated) doesn't work when called from Page.OnAppearing by @Shalini-Ashokan in #35395 <details> <summary>🔧 Fixes</summary> - [[iOS] ScrollView.ScrollToAsync(x, y, animated) doesn't work when called from Page.OnAppearing](#31177) </details> ## Searchbar - [Android] Fix SearchBar IME full-screen extract mode in landscape orientation by @SubhikshaSf4851 in #35197 <details> <summary>🔧 Fixes</summary> - [[Android] Investigate SearchBar presentation in horizontal screen orientation ](#14708) </details> - [iOS 26] Fix SearchBar layout spacing issues for small HeightRequest values by @devanathan-vaithiyanathan in #35347 <details> <summary>🔧 Fixes</summary> - [Spacing problem with maui 10.0.60 iOS](#35286) </details> ## SearchBar - [Windows] Fix SearchHandler does not focus when ShowSoftInputAsync is called by @praveenkumarkarunanithi in #35079 <details> <summary>🔧 Fixes</summary> - [[Windows] SearchHandler.ShowSoftInputAsync() does not focus the SearchHandler](#34930) </details> ## Shell - Fix Android layout jump when navigating with IME open and NavBarIsVisible=false by @jpd21122012 in #34621 <details> <summary>🔧 Fixes</summary> - [Shell page without NavBar jumping when navigating with keyboard open](#34584) </details> - [Android] Add defensive not null check to SearchHandlerAppearanceTracker.FocusChange by @Transis-Felipe in #29939 - [Android] Fix for Shell colors change before navigation completes on Android in .NET 10 by @BagavathiPerumal in #35295 <details> <summary>🔧 Fixes</summary> - [Shell colors change before navigation completes on Android in .NET 10](#35060) </details> - [Windows] Fix Shell FlyoutItem not taking full width by @SubhikshaSf4851 in #35131 <details> <summary>🔧 Fixes</summary> - [MAUI WinUI Grids don't render properly in flyout menu](#19542) - [[Windows] [.NET 8 RC2] FlyoutItem Backgroundcolor Is not fully displaying](#18238) </details> - [Android, iOS, Catalyst] Fix SearchHandler.BackgroundColor cannot be reset to null by @HarishwaranVijayakumar in #35224 <details> <summary>🔧 Fixes</summary> - [[Android, iOS, Catalyst] SearchHandler.BackgroundColor cannot be reset to null](#35088) </details> - Fix for ApplyQueryAttributes being called on non-destination pages during back navigation by @BagavathiPerumal in #35392 <details> <summary>🔧 Fixes</summary> - [ApplyQueryAttributes gets called for not activated (navigated to) page on back](#35183) </details> - [Android] Fix Shell flyout background to follow Material 3 theme colors by @SyedAbdulAzeemSF4852 in #35148 <details> <summary>🔧 Fixes</summary> - [[Android] Shell Flyout ignores Material 3 surface color when UseMaterial3 is enabled](#35147) </details> - [Android] Fix Shell.FlyoutHeader background incorrect by @SyedAbdulAzeemSF4852 in #35489 <details> <summary>🔧 Fixes</summary> - [[Android] Shell.FlyoutHeader background is incorrect](#35416) </details> - [iOS/MacCatalyst] Fix Shell.BackgroundColor not applied to bottom TabBar by @Shalini-Ashokan in #35545 <details> <summary>🔧 Fixes</summary> - [[MacCatalyst] Shell.BackgroundColor not applied to bottom TabBar](#35380) - [[Catalyst] Shell.TabBarBackgroundColor is not applied](#35381) </details> - [Android] Fix Shell FlyoutIcon tint loss after navigation by @SyedAbdulAzeemSF4852 in #35561 <details> <summary>🔧 Fixes</summary> - [[Android] The flyout icon loses colours](#35390) </details> - [iOS] Fix Shell - opened keyboard on modal page shifts parent page/frame behind modal after update to 10.0.60 by @KarthikRajaKalaimani in #35559 <details> <summary>🔧 Fixes</summary> - [[iOS] Shell - opened keyboard on modal page shifts parent page/frame behind modal after update to 10.0.60](#35401) </details> - Fix intermediate pages not receiving query parameters in multi-page Shell navigation by @mattleibow in #35432 <details> <summary>🔧 Fixes</summary> - [Shell GoToAsync: no way to pass query parameters to intermediate pages in multi-segment navigation](#35107) </details> - [Windows] Fix Shell title bar overlap with window controls in RTL mode by @Shalini-Ashokan in #33109 <details> <summary>🔧 Fixes</summary> - [[Windows] Binding RTL FlowDirection in Shell causes Flyout MenuIcon and native window controls to overlap](#32476) </details> - [macOS] Fix IsEnabled property false not working on MenuBarItem by @devanathan-vaithiyanathan in #35546 <details> <summary>🔧 Fixes</summary> - [[macOS] IsEnabled property false not working on MenuBarItem](#34038) </details> - Fix Android Shell top inset when nav bar is hidden by @ne0rrmatrix in #35555 <details> <summary>🔧 Fixes</summary> - [wrong statusbar height when Android device has a notch](#35103) </details> - Fix Changing Content property of ShellContent doesn't change visual content by @devanathan-vaithiyanathan in #34630 <details> <summary>🔧 Fixes</summary> - [Changing Content property of ShellContent doesn't change visual content. ](#12669) </details> - Fixed a NullReferenceException when starting application with empty shell on Windows by @Shalini-Ashokan in #28879 <details> <summary>🔧 Fixes</summary> - [NullReferenceException when starting application with empty shell on Windows](#21562) - [Using SelectionChangedCommand with CollectionView in Shell.FlyoutContent results in Win32 Unhandled Exception](#10041) </details> ## Slider - [iOS] Slider: Scale ThumbImageSource to match default thumb size by @NirmalKumarYuvaraj in #34184 <details> <summary>🔧 Fixes</summary> - [[Slider] MAUI Slider thumb image is big on android](#13258) </details> ## Stepper - Fix iOS 26 Stepper overlap in landscape by @AdamEssenmacher in #35374 <details> <summary>🔧 Fixes</summary> - [[.NET10] D10-The number and buttons overlap after rotating the simulator.](#35211) </details> ## SwipeView - Fix SwipeViews with invoked properties crash the app in Release mode by @BagavathiPerumal in #35208 <details> <summary>🔧 Fixes</summary> - [[iOS/Catalyst] Swipeviews with invoked properties crash the app in Release](#18055) </details> - Fix SwipeItemView command leak by @AdamEssenmacher in #35510 <details> <summary>🔧 Fixes</summary> - [`SwipeItemView.Command` leaks row views and command parameters through `CanExecuteChanged`](#35498) </details> - [iOS/Android] Fix SwipeItem.IsVisible not refreshing native swipe items when binding changes by @SyedAbdulAzeemSF4852 in #35217 <details> <summary>🔧 Fixes</summary> - [SwipeItem.IsVisible doesn't properly refresh the native swipe items when the binding value changes dynamically](#34832) </details> - Fix SwipeView memory leak when SwipeItems are reused or replaced by @Vignesh-SF3580 in #35539 <details> <summary>🔧 Fixes</summary> - [SwipeView leaks when SwipeItems are reused or replaced](#35481) </details> - Fix SwipeItem IconImageSource color handling and rendering across platforms by @Shalini-Ashokan in #35632 <details> <summary>🔧 Fixes</summary> - [[Android] SwipeItem IconImageSource should allow more configuration](#23074) </details> ## Switch - [Android/Windows] Fix RadioButton gradient not clearing when switching background by @Shalini-Ashokan in #34997 <details> <summary>🔧 Fixes</summary> - [RadioButton Background does not reset when set to null at runtime](#34993) </details> - [Windows] Fix "PlatformView cannot be null here" exception during handler disconnect by @kubaflo in #35314 <details> <summary>🔧 Fixes</summary> - ["PlatformView cannot be null here" Exception in Switch control [Windows]](#27101) </details> - [iOS 26] Fix Switch ThumbColor and OffColor not applied on initial load by @SyedAbdulAzeemSF4852 in #35400 <details> <summary>🔧 Fixes</summary> - [iOS 26 Switch default color for Off and On is incorrect + Off Color is not applied at start + Thumb Colors is not applied](#35257) </details> - [Android] Fix AppBar flicker on CheckBox/Switch toggle with Material 3 by @Dhivya-SF4094 in #35181 <details> <summary>🔧 Fixes</summary> - [[Android] AppBar flicker while changing the CheckBox or Switch state after scrolling in Material 3](#35180) </details> - [Android] Fix Switch Shadow Does Not Follow Thumb when Toggle On or Off by @Dhivya-SF4094 in #35623 <details> <summary>🔧 Fixes</summary> - [[Android] Switch Shadow Does Not Follow Thumb when Toggle On or Off](#30046) </details> ## TabbedPage - [Android] Fix TabbedPage truncating tab titles instead of scrolling by @Shalini-Ashokan in #35086 <details> <summary>🔧 Fixes</summary> - [Maui migrating Xamarin to Maui - Tabbed Page Scroll Issue - Tabs are not scrolling](#16470) </details> - [Android] Fix BottomNavigationView remaining visible for TabbedPage inside modal NavigationPage after PushAsync by @Dhivya-SF4094 in #35359 <details> <summary>🔧 Fixes</summary> - [Android TabbedPage inside Modal Navigation does not overlay BottomNavigationView after PushAsync in .NET MAUI 10.0.60](#35331) </details> - [Android & iOS] TabbedPage leaks with shared GradientBrush. by @SubhikshaSf4851 in #35543 <details> <summary>🔧 Fixes</summary> - [TabbedPage leaks renderer/manager when BarBackground uses shared GradientBrush resource](#35469) </details> ## Templates - Bumps Syncfusion.Maui.Toolkit dependency to version 1.0.10 by @PaulAndersonS in #35608 ## Toolbar - Fix Android app bar inset background coloring by @ne0rrmatrix in #35601 <details> <summary>🔧 Fixes</summary> - [Android Edge-to-Edge: Shell and NavigationPage Top Bar colour is not used for status bar.](#35568) </details> ## Tooling - Add default .gitignore to MAUI project templates by @davidortinau in #34862 <details> <summary>🔧 Fixes</summary> - [Add a gitignore file to the Maui template in VS 2022](#4131) </details> - Fix: Propagate AdditionalProperties from ProjectReference in ResizetizeCollectItems by @mattleibow in #35575 <details> <summary>🔧 Fixes</summary> - [Resizetizer GetMauiItems does not propagate ProjectReference AdditionalProperties](#35574) </details> ## WebView - [Windows] Fix WebView blank rendering when used with HybridWebView by @SubhikshaSf4851 in #35092 <details> <summary>🔧 Fixes</summary> - [[Windows] WebView Regression from NET9 to NET10](#34558) </details> - Fix AOT integration test failures: suppress IL3050/IL2026 for HybridWebViewHandler in AddControlsHandlers by @mattleibow via @Copilot in #34868 - Fix Android activity result callback leak by @AdamEssenmacher in #35436 <details> <summary>🔧 Fixes</summary> - [Android WebView file chooser callbacks leak via ActivityResultCallbackRegistry](#35405) </details> - [Windows] Fix WebView Does Not Inherit App Theme by @devanathan-vaithiyanathan in #35037 <details> <summary>🔧 Fixes</summary> - [WebView on Windows Does Not Inherit App Theme](#34823) </details> - Fix for WebView leaks when reusing a shared WebViewSource by @BagavathiPerumal in #35524 <details> <summary>🔧 Fixes</summary> - [WebView leaks when reusing a shared WebViewSource](#35483) </details> - Destroy Android WebView on handler disconnect by @AdamEssenmacher in #35552 <details> <summary>🔧 Fixes</summary> - [Right way to dispose page with WebView](#18021) </details> ## Xaml - Fix: Enable VisualStateManager to set Style property dynamically by @Shalini-Ashokan in #33389 <details> <summary>🔧 Fixes</summary> - [Setting the `Style` property using the `VisualStateManager` within a Style resource does not work](#17175) </details> - Fix Implicit parameter conversion from integer to byte fails with source generated XAML by @KarthikRajaKalaimani in #35444 <details> <summary>🔧 Fixes</summary> - [Implicit parameter conversion from integer to byte fails with source generated XAML](#35396) </details> <details> <summary>🔧 Infrastructure (3)</summary> - Fix: Build fails when appicon is an empty (but valid) SVG by @Shalini-Ashokan in #35305 <details> <summary>🔧 Fixes</summary> - [Build fails when appicon is an empty (but valid) svg after upgrade to 10.0.60](#35293) </details> - [inflight/current] Fix CS0111 duplicate GetNativeCharacterSpacing in PickerHandlerTests.iOS by @SyedAbdulAzeemSF4852 in #35419 - Update WinAppSDK to 1.8.260508005 by @kubaflo in #35678 </details> <details> <summary>🧪 Testing (3)</summary> - Backport Test Fixes and Snapshots from SR to Inflight Branch by @Tamilarasan-Paranthaman in #35499 - Fix hardcoded version of Microsoft.DotNet.XHarness.TestRunners.Xunit in test projects by @akoeplinger in #29905 - [Testing] Fixed Build error on inflight/ candidate PR 35716 by @HarishKumarSF4517 in #35730 </details> <details> <summary>🏠 Housekeeping (1)</summary> - [HouseKeeping] Fix inconsistant namespace in HostApp by @NirmalKumarYuvaraj in #35210 </details> <details> <summary>📦 Other (8)</summary> - Add .cab and ReconnectModal.razor.js to signing config by @jesuszarate in #35026 - Fix typo in Clipboard.shared.cs by @Deadpikle in #35316 - Fix single modifier for NSMenuItem accelerators by @jeremy-visionaid in #35351 - Avoid unnecessary LINQ enumerations by @jeremy-visionaid in #35272 - [Testing] Replace retryDelay with retryTimeout in UI tests by @kubaflo in #35367 - Replace JavaFinalize() with Dispose(bool) in GenericAnimatorListener by @jonathanpeppers in #35548 - Fix incorrect SDK provisioning commands in integration-tests instructions by @davidnguyen-tech in #34992 - Fix VisualElement.ChangeVisualState() gets stuck in Selected state by @Dhivya-SF4094 in #35421 <details> <summary>🔧 Fixes</summary> - [VisualElement's ChangeVisualState gets stuck in Selected state](#35399) </details> </details> <details> <summary>📝 Issue References</summary> Fixes #4131, Fixes #4715, Fixes #5947, Fixes #7150, Fixes #7814, Fixes #7935, Fixes #8296, Fixes #9095, Fixes #9150, Fixes #10041, Fixes #12669, Fixes #13258, Fixes #14708, Fixes #15257, Fixes #16470, Fixes #17175, Fixes #17554, Fixes #17698, Fixes #18021, Fixes #18055, Fixes #18238, Fixes #19542, Fixes #19668, Fixes #20502, Fixes #20615, Fixes #21562, Fixes #22053, Fixes #23074, Fixes #24752, Fixes #27101, Fixes #27627, Fixes #27770, Fixes #27922, Fixes #28514, Fixes #28676, Fixes #28891, Fixes #29411, Fixes #29449, Fixes #30010, Fixes #30046, Fixes #30404, Fixes #30464, Fixes #30535, Fixes #30957, Fixes #31048, Fixes #31177, Fixes #31472, Fixes #31686, Fixes #32279, Fixes #32393, Fixes #32404, Fixes #32457, Fixes #32476, Fixes #32492, Fixes #32731, Fixes #32871, Fixes #33508, Fixes #33510, Fixes #33780, Fixes #34038, Fixes #34104, Fixes #34257, Fixes #34380, Fixes #34522, Fixes #34558, Fixes #34584, Fixes #34594, Fixes #34823, Fixes #34830, Fixes #34832, Fixes #34899, Fixes #34930, Fixes #34955, Fixes #34971, Fixes #34973, Fixes #34993, Fixes #35060, Fixes #35076, Fixes #35088, Fixes #35103, Fixes #35107, Fixes #35113, Fixes #35114, Fixes #35147, Fixes #35180, Fixes #35183, Fixes #35211, Fixes #35214, Fixes #35244, Fixes #35257, Fixes #35277, Fixes #35279, Fixes #35280, Fixes #35286, Fixes #35293, Fixes #35313, Fixes #35326, Fixes #35331, Fixes #35344, Fixes #35354, Fixes #35371, Fixes #35380, Fixes #35381, Fixes #35387, Fixes #35390, Fixes #35396, Fixes #35397, Fixes #35399, Fixes #35401, Fixes #35405, Fixes #35416, Fixes #35429, Fixes #35469, Fixes #35472, Fixes #35473, Fixes #35479, Fixes #35481, Fixes #35483, Fixes #35485, Fixes #35492, Fixes #35495, Fixes #35497, Fixes #35498, Fixes #35513, Fixes #35517, Fixes #35568, Fixes #35573, Fixes #35574, Fixes #35584, Fixes #35587, Fixes #35615, Fixes #35618, Fixes #35651, Fixes #35654 </details> **Full Changelog**: main...inflight/candidate
Note
Are you waiting for the changes in this PR to be merged?
It would be very helpful if you could test the resulting artifacts from this PR and let us know in a comment if this change resolves your issue. Thank you!
Issue Details
Build fails with InvalidOperationException when using an empty (but valid) SVG as the app icon. The SVG has width, height, and viewBox but no drawn shapes inside.
Root Cause
PR #33194 moved the size.IsEmpty check to run before both code paths in DrawUnscaled, but size (from CullRect) is only needed in the downscale path. Empty SVGs have a zero CullRect even with valid declared dimensions, so the check incorrectly blocks the upscale path that never uses size.
Description of Change
Moved the size.IsEmpty check from before both branches into only the else (downscale) branch where size is actually used. The scale >= 1 path calls DrawPicture directly, which harmlessly draws nothing for empty SVGs, producing a valid transparent image.
Validated the behavior in the following platforms
Issues Fixed
Fixes #35293
Output ScreenShot
35293-BeforeFix.mov
35293-AfterFix.mov