Maui app in mac using VS Code stop working
Hi,
Maui app in mac using VS Code stop working.
I got this error.
Using .Net 8.
.NET MAUI
-
Wenyan Zhang (Shanghai Wicresoft Co,.Ltd.) • 34,226 Reputation points • Microsoft Vendor
2025-01-06T05:38:18.2566667+00:00 What's the debug target? Do you run the app on an iOS simulator? If so, what's the Xcode version?
-
Dani_S • 3,911 Reputation points
2025-01-06T07:06:59.42+00:00 What's the debug target?
I selecte the project to run in MAC and from menu run the app with/without debugging
and I got this image error above.
Do you run the app on an iOS simulator? If so, what's the Xcode version?
Can you explain how to check both questions?
I'm using VS CODE.
-
Wenyan Zhang (Shanghai Wicresoft Co,.Ltd.) • 34,226 Reputation points • Microsoft Vendor
2025-01-06T09:34:50.9866667+00:00 The debug target is from the language status item at the bottom right of VS Code (you can find it clicking the '{}' icon)
I understand you are using VS Code on Mac. If you target on iOS and test on an iOS simulator, we can investigate if the issue is related to Xcode version.
-
Dani_S • 3,911 Reputation points
2025-01-06T11:17:52.62+00:00 When i click on {} i got:
-
Dani_S • 3,911 Reputation points
2025-01-06T11:28:13.1966667+00:00 In addition i haide the stuatus bar and i don't know how to bring it back ?
-
Bruce (SqlWork.com) • 69,276 Reputation points
2025-01-06T18:43:06.0766667+00:00 the error is pretty clear. when compiling to release (AOT) one of your dependent library is not supported. You might try:
<UseInterpreter>true</UseInterpreter>
in the release build.
-
Dani_S • 3,911 Reputation points
2025-01-06T18:48:08.3866667+00:00 1.Where i put this tag, it worked before?2.i hide the status bar =>{} where i can bring it back?
-
Dani_S • 3,911 Reputation points
2025-01-06T18:48:21.76+00:00 ........
-
Bruce (SqlWork.com) • 69,276 Reputation points
2025-01-06T18:55:14.55+00:00 see docs:
https://zcusa.951200.xyz/en-us/dotnet/maui/macios/interpreter?view=net-maui-9.0
the error is unreleased to vscode status bar.
on a Mac to toggle the status bar its:
View->Appearance->Status Bar
-
Dani_S • 3,911 Reputation points
2025-01-07T09:30:14.92+00:00 The status bar work as expected.
But i added this to csproj file to enable the interpreter.
try these two options and got same error.
Please help.
The Mono interpreter can be enabled in iOS release builds by setting the
$(UseInterpreter)
MSBuild property totrue
in your .NET MAUI app's project file:XMLCopy
<PropertyGroup Condition="$(TargetFramework.Contains('-ios')) and '$(Configuration)' == 'Release'">
The interpreter can also be enabled for Mac Catalyst release builds on ARM64:
XMLCopy
<PropertyGroup Condition="'$(RuntimeIdentifier)' == 'maccatalyst-arm64' and '$(Configuration)' == 'Release'">
-
Dani_S • 3,911 Reputation points
2025-01-07T11:49:18.72+00:00 Your quick answer will be appreciated.
-
Bruce (SqlWork.com) • 69,276 Reputation points
2025-01-07T17:08:51.07+00:00 you should check with the library owner. see issue:
https://github.com/mono/SkiaSharp/issues/1885
as the bug has been open for 3 years, you will probably need to fork and fix yourself.
-
Dani_S • 3,911 Reputation points
2025-01-07T17:15:41.1833333+00:00 This library is pary of maui project?
-
Dani_S • 3,911 Reputation points
2025-01-08T06:43:56.2466667+00:00 Can you please answer ?
-
Wenyan Zhang (Shanghai Wicresoft Co,.Ltd.) • 34,226 Reputation points • Microsoft Vendor
2025-01-08T09:14:10.61+00:00 But i added this to csproj file to enable the interpreter.try these two options and got same error.
Could you provide the detailed error message in the log dashboard so that we can investigate further?
-
Dani_S • 3,911 Reputation points
2025-01-08T09:17:36.8466667+00:00 ן added screenshoot from terminal in the above ticket you can see it
-
Wenyan Zhang (Shanghai Wicresoft Co,.Ltd.) • 34,226 Reputation points • Microsoft Vendor
2025-01-08T09:27:02.4666667+00:00 OK. It would be easier to diagnose the problem if you shared the text.
As Bruce, the log shows that the issue is from SkiaSharp. When you run an empty template MAUI app, does the issue still exist?
-
Dani_S • 3,911 Reputation points
2025-01-08T10:02:20.7+00:00 I will check with empty maui app.what is skiasharp come from?
-
Wenyan Zhang (Shanghai Wicresoft Co,.Ltd.) • 34,226 Reputation points • Microsoft Vendor
2025-01-09T05:29:53.0333333+00:00 You could see if you added the
SkiaSharp.Views.Maui.Controls
package. By default, SkiaSharp is a part of MAUI. Could you find if there are any other error messages besides the "maui- build"? -
Dani_S • 3,911 Reputation points
2025-01-14T09:20:55.0133333+00:00 not add this module.
-
Wenyan Zhang (Shanghai Wicresoft Co,.Ltd.) • 34,226 Reputation points • Microsoft Vendor
2025-01-14T09:22:33.22+00:00 On an empty project, you still have this problem, right?
-
Dani_S • 3,911 Reputation points
2025-01-14T09:45:27.9533333+00:00 I attached the problems tab + and pacakges
-
Dani_S • 3,911 Reputation points
2025-01-14T09:55:19.1966667+00:00 How i create new project with vs code?
Sign in to comment