maui: [regression/7.0.100] MAUI SR9 7.0.100 breaks iOS build

Description

With the release of 7.0.100 (and the recently released 7.0.101) the iOS builds now fail. Exception is listed in the log output below.

Steps to Reproduce

Run my build as we have been doing daily for the last 12 months

Link to public reproduction project repository

No response

Version with bug

7.0.101

Is this a regression from previous behavior?

Yes, this used to work in .NET MAUI

Last version that worked well

7.0.96

Affected platforms

iOS

Affected platform versions

No response

Did you find any workaround?

No

Relevant log output

2023-11-07T15:21:22.1961850Z /Users/runner/hostedtoolcache/dotnet/packs/Microsoft.Maui.Resizetizer.Sdk/7.0.101/targets/Microsoft.Maui.Resizetizer.targets(531,9): warning : MAUI0000 [/Users/runner/work/1/s/Mobile.Survey.Appl/Mobile.Survey.Appl.csproj::TargetFramework=net7.0-ios]
2023-11-07T15:21:22.1964620Z /Users/runner/hostedtoolcache/dotnet/packs/Microsoft.Maui.Resizetizer.Sdk/7.0.101/targets/Microsoft.Maui.Resizetizer.targets(531,9): error MAUI0000: System.MissingMethodException: Method not found: 'SkiaSharp.SKTextBlob SkiaSharp.SKTextBlob.CreatePositioned(System.String, SkiaSharp.SKFont, System.ReadOnlySpan`1<SkiaSharp.SKPoint>)'. [/Users/runner/work/1/s/Mobile.Survey.Appl/Mobile.Survey.Appl.csproj::TargetFramework=net7.0-ios]
2023-11-07T15:21:22.1966930Z /Users/runner/hostedtoolcache/dotnet/packs/Microsoft.Maui.Resizetizer.Sdk/7.0.101/targets/Microsoft.Maui.Resizetizer.targets(531,9): error MAUI0000:    at Svg.Skia.SkiaModelExtensions.Draw(CanvasCommand canvasCommand, SKCanvas skCanvas) [/Users/runner/work/1/s/Mobile.Survey.Appl/Mobile.Survey.Appl.csproj::TargetFramework=net7.0-ios]
2023-11-07T15:21:22.1968350Z /Users/runner/hostedtoolcache/dotnet/packs/Microsoft.Maui.Resizetizer.Sdk/7.0.101/targets/Microsoft.Maui.Resizetizer.targets(531,9): error MAUI0000:    at Svg.Skia.SkiaModelExtensions.Draw(SKPicture picture, SKCanvas skCanvas) in /_/src/Svg.Skia/SkiaModelExtensions.cs:line 1054 [/Users/runner/work/1/s/Mobile.Survey.Appl/Mobile.Survey.Appl.csproj::TargetFramework=net7.0-ios]
2023-11-07T15:21:22.1969720Z /Users/runner/hostedtoolcache/dotnet/packs/Microsoft.Maui.Resizetizer.Sdk/7.0.101/targets/Microsoft.Maui.Resizetizer.targets(531,9): error MAUI0000:    at Svg.Skia.SkiaModelExtensions.ToSKPicture(SKPicture picture) in /_/src/Svg.Skia/SkiaModelExtensions.cs:line 933 [/Users/runner/work/1/s/Mobile.Survey.Appl/Mobile.Survey.Appl.csproj::TargetFramework=net7.0-ios]
2023-11-07T15:21:22.1971260Z /Users/runner/hostedtoolcache/dotnet/packs/Microsoft.Maui.Resizetizer.Sdk/7.0.101/targets/Microsoft.Maui.Resizetizer.targets(531,9): error MAUI0000:    at Svg.Skia.SKSvg.Load(String path) in /_/src/Svg.Skia/SKSvg.cs:line 70 [/Users/runner/work/1/s/Mobile.Survey.Appl/Mobile.Survey.Appl.csproj::TargetFramework=net7.0-ios]
2023-11-07T15:21:22.1973420Z /Users/runner/hostedtoolcache/dotnet/packs/Microsoft.Maui.Resizetizer.Sdk/7.0.101/targets/Microsoft.Maui.Resizetizer.targets(531,9): error MAUI0000:    at Microsoft.Maui.Resizetizer.SkiaSharpSvgTools..ctor(String filename, Nullable`1 baseSize, Nullable`1 backgroundColor, Nullable`1 tintColor, ILogger logger) in D:\a\_work\1\s\src\SingleProject\Resizetizer\src\SkiaSharpSvgTools.cs:line 24 [/Users/runner/work/1/s/Mobile.Survey.Appl/Mobile.Survey.Appl.csproj::TargetFramework=net7.0-ios]
2023-11-07T15:21:22.1975120Z /Users/runner/hostedtoolcache/dotnet/packs/Microsoft.Maui.Resizetizer.Sdk/7.0.101/targets/Microsoft.Maui.Resizetizer.targets(531,9): error MAUI0000:    at Microsoft.Maui.Resizetizer.SkiaSharpTools.Create(Boolean isVector, String filename, Nullable`1 baseSize, Nullable`1 backgroundColor, Nullable`1 tintColor, ILogger logger) in D:\a\_work\1\s\src\SingleProject\Resizetizer\src\SkiaSharpTools.cs:line 21 [/Users/runner/work/1/s/Mobile.Survey.Appl/Mobile.Survey.Appl.csproj::TargetFramework=net7.0-ios]
2023-11-07T15:21:22.1976600Z /Users/runner/hostedtoolcache/dotnet/packs/Microsoft.Maui.Resizetizer.Sdk/7.0.101/targets/Microsoft.Maui.Resizetizer.targets(531,9): error MAUI0000:    at Microsoft.Maui.Resizetizer.SkiaSharpAppIconTools..ctor(ResizeImageInfo info, ILogger logger) in D:\a\_work\1\s\src\SingleProject\Resizetizer\src\SkiaSharpAppIconTools.cs:line 26 [/Users/runner/work/1/s/Mobile.Survey.Appl/Mobile.Survey.Appl.csproj::TargetFramework=net7.0-ios]
2023-11-07T15:21:22.1977960Z /Users/runner/hostedtoolcache/dotnet/packs/Microsoft.Maui.Resizetizer.Sdk/7.0.101/targets/Microsoft.Maui.Resizetizer.targets(531,9): error MAUI0000:    at Microsoft.Maui.Resizetizer.ResizetizeImages.ProcessAppIcon(ResizeImageInfo img, ConcurrentBag`1 resizedImages) in D:\a\_work\1\s\src\SingleProject\Resizetizer\src\ResizetizeImages.cs:line 163 [/Users/runner/work/1/s/Mobile.Survey.Appl/Mobile.Survey.Appl.csproj::TargetFramework=net7.0-ios]
2023-11-07T15:21:22.1979580Z /Users/runner/hostedtoolcache/dotnet/packs/Microsoft.Maui.Resizetizer.Sdk/7.0.101/targets/Microsoft.Maui.Resizetizer.targets(531,9): error MAUI0000:    at Microsoft.Maui.Resizetizer.ResizetizeImages.<>c__DisplayClass26_0.<ExecuteAsync>b__0(ResizeImageInfo img) in D:\a\_work\1\s\src\SingleProject\Resizetizer\src\ResizetizeImages.cs:line 56 [/Users/runner/work/1/s/Mobile.Survey.Appl/Mobile.Survey.Appl.csproj::TargetFramework=net7.0-ios]
2023-11-07T15:21:22.1981000Z /Users/runner/hostedtoolcache/dotnet/packs/Microsoft.Maui.Resizetizer.Sdk/7.0.101/targets/Microsoft.Maui.Resizetizer.targets(531,9): error MAUI0000:    at Microsoft.Maui.Resizetizer.AsyncTaskExtensions.<>c__DisplayClass0_0`1.<ParallelForEach>b__0(TSource s) in D:\a\_work\1\s\src\SingleProject\Resizetizer\src\AsyncTaskExtensions.cs:line 21 [/Users/runner/work/1/s/Mobile.Survey.Appl/Mobile.Survey.Appl.csproj::TargetFramework=net7.0-ios]

About this issue

  • Original URL
  • State: open
  • Created 8 months ago
  • Reactions: 7
  • Comments: 15 (2 by maintainers)

Most upvoted comments

The Mapsui/Mapsui#2150(comment) workaround is for an app that crashes during runtime. The Mapsui app uses Svg.Skia. This issue is happening in the Resizetizer during the build. I haven’t had a chance to try it yet but I’m not understanding how this might help in this instance.

In my case it’s not a runtime. I couldn’t build a vanilla maui app. So it’s either optimized out by the linker or references a wrong SkiaSharp version. Have a try.

I found that when I get this error, if I remove this line from the project file:

<MauiIcon Include="Resources\AppIcon\appicon.svg" ForegroundFile="Resources\AppIcon\appiconfg.svg" Color="#512BD4" /> This the compiler error goes away, no idea why its related, but this error always starts the moment I drag and drop a new image into the Resources\Images folder

A fix that works for me on Mac:

  1. Download this NuGet package: https://www.nuget.org/packages/Microsoft.Maui.Resizetizer.Sdk/7.0.96
  2. Extract it.
  3. In Finder go to /usr/local/share/dotnet/packags/Microsoft.Maui.Resizetizer.Sdk
  4. Rename the version you have currently installed to something else
  5. Move the extracted folder to this location
  6. Rename folder to the original version
  7. Restart Visual Studio, give permissions for the files, restart again.

Still an issue on version 7.0.101 released today.