can’t build my .NET 8 Maui app in ios emulator

  Kiến thức lập trình

I used Xamarin forms but it going to be obsolete so I decided to migrate to Maui. I updated code with assistant and in Android I can build project in emulator but can’t do this in iOS. When I launch VS for MAC I got a message telling me Visual studio Mac will be obsolete in August 2024. So first I don’t know if I can build in VS before august. I also noticed I can’t install latest VS version (I’m using v17)

My issue is when wanting select target device I don’t see any iOS device, I got :

  • net-8.0-ios
  • net-8.0-android
  • net-8.0-maccatalyst

Moreover at the top I got a message telling I’ve not SDK software development installed

Here is my configuration
.NET version : 8.0.301
.NET sdk : 8.0.301, 7.., 6.., 5.., 3..

So here are my questions :

  • Can I build in iOS device simulator using VS, if yes why I can’t build my project
  • Is there someone able to build with VS or VS code

hope the following informations are sufficient. If you need more info about something I can give you answer.

I also tried to build in vscode but there are some bugs with .NET extension which is not the subject of this topic.

I also tried to create new MAui project to test initial project build and got same issue

<Project Sdk="Microsoft.NET.Sdk">

    <PropertyGroup>
        <TargetFrameworks>net8.0-android;net8.0-ios;net8.0-maccatalyst</TargetFrameworks>
        <TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net8.0-windows10.0.19041.0</TargetFrameworks>
        <!-- Uncomment to also build the tizen app. You will need to install tizen by following this: https://github.com/Samsung/Tizen.NET -->
        <!-- <TargetFrameworks>$(TargetFrameworks);net8.0-tizen</TargetFrameworks> -->

        <!-- Note for MacCatalyst:
        The default runtime is maccatalyst-x64, except in Release config, in which case the default is maccatalyst-x64;maccatalyst-arm64.
        When specifying both architectures, use the plural <RuntimeIdentifiers> instead of the singular <RuntimeIdentifier>.
        The Mac App Store will NOT accept apps with ONLY maccatalyst-arm64 indicated;
        either BOTH runtimes must be indicated or ONLY macatalyst-x64. -->
        <!-- For example: <RuntimeIdentifiers>maccatalyst-x64;maccatalyst-arm64</RuntimeIdentifiers> -->

        <OutputType>Exe</OutputType>
        <RootNamespace>MauiApp1</RootNamespace>
        <UseMaui>true</UseMaui>
        <SingleProject>true</SingleProject>
        <ImplicitUsings>enable</ImplicitUsings>
        <Nullable>enable</Nullable>

        <!-- Display name -->
        <ApplicationTitle>MauiApp1</ApplicationTitle>
...

New contributor

Wyllis MONTEIRO is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

Theme wordpress giá rẻ Theme wordpress giá rẻ Thiết kế website

LEAVE A COMMENT