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,711 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,711 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,806 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,806 Reputation points
2025-01-06T18:55:14.55+00:00 see docs:
https://learn.microsoft.com/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,806 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,711 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,711 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,711 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,711 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?
-
Wenyan Zhang (Shanghai Wicresoft Co,.Ltd.) • 34,711 Reputation points • Microsoft Vendor
2025-01-15T07:25:44.75+00:00 Please follow the guide on the official doc- Build your first .NET MAUI app - .NET MAUI | Microsoft Learn. (Select the Visual Studio Code tab)
-
Dani_S • 3,911 Reputation points
2025-01-15T07:31:14.4333333+00:00 The doc speak about VS i do not see VS code.
-
Wenyan Zhang (Shanghai Wicresoft Co,.Ltd.) • 34,711 Reputation points • Microsoft Vendor
2025-01-15T08:04:41.2233333+00:00 here
-
Dani_S • 3,911 Reputation points
2025-01-15T08:48:03.81+00:00 thanks.
i do not have this screen:
-
Dani_S • 3,911 Reputation points
2025-01-15T10:49:37.52+00:00 Your quick answer will be appreciated.
-
Dani_S • 3,911 Reputation points
2025-01-15T14:01:28.1733333+00:00 I succeded to creare new poject. but not running.
-
Dani_S • 3,911 Reputation points
2025-01-15T14:20:33.45+00:00 more info.
-
Bruce (SqlWork.com) • 69,806 Reputation points
2025-01-15T16:56:40.9233333+00:00 the default project template includes windows, iOS and android targets. this means you either install all the build tools for each platform or edit the project file to limit the targets to only what you want.
also as Maui 8 support ends in May, you should probably install net 9 and Maui 9 to start you project. The newer tools may also have fewer issues.
-
Dani_S • 3,911 Reputation points
2025-01-15T17:07:58.2366667+00:00 So this the problem also with my project They have same error
-
Bruce (SqlWork.com) • 69,806 Reputation points
2025-01-15T23:53:37.0033333+00:00 if you want an android build, you need to install the android sdk from google. I don't do android, so can not verify steps.
-
Dani_S • 3,911 Reputation points
2025-01-16T06:50:14.49+00:00 How to update my csproject?im in mac
-
Dani_S • 3,911 Reputation points
2025-01-19T07:59:30.39+00:00 Hi,
I limited the target only for new Maui project to macalist as below:
and got same error:
-
Dani_S • 3,911 Reputation points
2025-01-19T08:00:47.56+00:00 what do i miss ? my project , not the new maui project work before ?
-
Dani_S • 3,911 Reputation points
2025-01-19T08:09:15.19+00:00 my launch .json of the new maui project
my task.json of the new maui project
-
Dani_S • 3,911 Reputation points
2025-01-19T08:31:35.1733333+00:00 This after clear nd rebuild my project:
-
Dani_S • 3,911 Reputation points
2025-01-19T11:00:24.14+00:00 also the task json is empty in my project like the empty project.
and launch.json is like the empty project.
are they define correctly? if not how?
-
Dani_S • 3,911 Reputation points
2025-01-19T11:30:36.3566667+00:00 IS IT CONNECTED TO C# DEV KIT?
-
Bruce (SqlWork.com) • 69,806 Reputation points
2025-01-19T17:40:46.9933333+00:00 The error says that the referenced package OpenGLES does not support the MacCatalyst framework.
-
Dani_S • 3,911 Reputation points
2025-01-19T18:20:31.9266667+00:00 I have no such reference.
-
Dani_S • 3,911 Reputation points
2025-01-19T18:21:40.74+00:00 Could you please help?
-
Dani_S • 3,911 Reputation points
2025-01-20T07:29:01.2133333+00:00 @Wenyan Zhang (Shanghai Wicresoft Co,.Ltd.)
Your quick answer will be appreciated.
-
Wenyan Zhang (Shanghai Wicresoft Co,.Ltd.) • 34,711 Reputation points • Microsoft Vendor
2025-01-20T08:26:41.14+00:00 For your scenario, it is recommended to open a support ticket for this. Please contact our paid phone support at MS Support. You will get 1:1 support on that.
-
Dani_S • 3,911 Reputation points
2025-01-20T08:33:33.39+00:00 What happened the project work ok,and suddenly stop working. What opengls pacakge come from, doesnt appear in my csproje file?
-
Dani_S • 3,911 Reputation points
2025-01-20T08:47:55.81+00:00 Your quick answer will be appreciated
-
Wenyan Zhang (Shanghai Wicresoft Co,.Ltd.) • 34,711 Reputation points • Microsoft Vendor
2025-01-20T09:00:27.9666667+00:00 Go to the 'PROBLEM'tab, I saw there are 36 issues. Could you provide the log in txt?
-
Dani_S • 3,911 Reputation points
2025-01-20T09:18:00.0666667+00:00 -
Dani_S • 3,911 Reputation points
2025-01-21T07:34:09.79+00:00 Your quick answer will be appreciated
-
Wenyan Zhang (Shanghai Wicresoft Co,.Ltd.) • 34,711 Reputation points • Microsoft Vendor
2025-01-21T09:27:02.3233333+00:00 This shows that there is an Android SDK error, please follow the doc to install- Install .NET for Android dependencies - .NET for Android | Microsoft Learn
I know you have edited the csproj file to target maccatalyst platform only, please try to set ".net9-maccatalyst" to see if the issue only occurs on .net8.
Form the image, I see you add two project references in your project, do you also add these references when creating a new project for testing?
-
Dani_S • 3,911 Reputation points
2025-01-21T10:03:25.9566667+00:00 1.regarding the Android sdk, , I'm in MAC what is the c is it correct ?
Can you please give the path in MAC for p:AndroidSdkDirectory +
p:JavaSdkDirectory.
from where i run this cmd?
dotnet build -t:InstallAndroidDependencies -f net8.0-android -p:AndroidSdkDirectory=c:\work\android-sdk -p:JavaSdkDirectory=c:\work\jdk -p:AcceptAndroidSdkLicenses=True
2.I tried to set ".net9-maccatalyst",is not working, i have no net 9 in my project ?
3.I do not added these references when creating a new project for testing.
Your quick answer will be appreciated
-
Dani_S • 3,911 Reputation points
2025-01-21T10:04:28.81+00:00 regarding 1:Is this the full command in MAC? sasasoftware is my user.
dotnet build -t:InstallAndroidDependencies -f net8.0-android \
-p:AndroidSdkDirectory=/Users/sasasoftware/Library/Android/sdk \
-p:JavaSdkDirectory=/Library/Java/JavaVirtualMachines/jdk-17.jdk/Contents/Home \
-p:AcceptAndroidSdkLicenses=True
-
Dani_S • 3,911 Reputation points
2025-01-22T06:29:33.61+00:00 Your quick answer will be appreciated.
-
Wenyan Zhang (Shanghai Wicresoft Co,.Ltd.) • 34,711 Reputation points • Microsoft Vendor
2025-01-22T07:11:39.5066667+00:00 No, you could save the SDK in /Users/XXX/Library/Developer/Xamarin/android-sdk-macosx/...There is another way to configure Android, click "View" on the top bar, select "Command Palette"->.NET MAUI Configure Android.
-
Wenyan Zhang (Shanghai Wicresoft Co,.Ltd.) • 34,711 Reputation points • Microsoft Vendor
2025-01-22T07:16:42.6833333+00:00 Since it cost a long time, and we still cannot find the root issue, it is recommended to open a support ticket for this. Please contact our paid phone support at MS Support. You will get 1:1 support on that.
-
Dani_S • 3,911 Reputation points
2025-01-22T09:20:52.42+00:00 I do not have this command paallete:
.NET MAUI Configure Android.
-
Dani_S • 3,911 Reputation points
2025-01-22T10:12:08.42+00:00 Your quick answer will be appreciated.
-
Dani_S • 3,911 Reputation points
2025-01-22T10:30:10.74+00:00 In my project I removed the target .net8.0-android && net 8.0-ios and the Android SDK error disapper. but still got this error:
ILLINK : warning MT0182: Not linking with the framework OpenGLES (referenced by a module reference in SkiaSharp.Views.iOS.dll) because it's not available on the current platform (MacCatalyst). [/Users/sasasoftware/Documents/GssdDesktopClient/GssdDesktopClient.Maui/GssdDesktopClient.Maui.csproj::TargetFramework=net8.0-maccatalyst]
-
Dani_S • 3,911 Reputation points
2025-01-22T10:30:35.0466667+00:00 Your quick answer will be appreciated.
-
Dani_S • 3,911 Reputation points
2025-01-22T11:08:53.3066667+00:00 Your quick answer will be appreciated.
Sign in to comment