iOS crash report: System_Runtime_CompilerServices_AsyncMethodBuilderCore_Start_TStateMachine_GSHAREDVT_TStateMachine_GSHAREDVT_

Kim Strasser 1,671 Reputation points
2025-11-04T21:08:44.2066667+00:00

I have uploaded my iOS build on TestFlight and then installed it on my iPad. My game always crashes 1-2 seconds after I opened it on my iPad. It only crashes in release mode and not in debug mode.

It's not the first time that I have this kind of crash. Last time the problem could be solved when I changed Link Framework SDKs Only to Don't link in the iOS project Build properties: https://learn.microsoft.com/en-sg/answers/questions/2151387/ios-crash-report-system-runtime-compilerservices-a

This time I already use Don't link in the iOS project Build properties but my app still crashes.

SharedCode_MyClass__Updated__303_MoveNext (in ProjectiOS) (<unknown>:1) System_Runtime_CompilerServices_AsyncMethodBuilderCore_Start_TStateMachine_GSHAREDVT_TStateMachine_GSHAREDVT_ (in ProjectiOS) + 388 ProjectiOS_SharedCode_MyClass_Update_Microsoft_Xna_Framework_GameTime (in ProjectiOS) + 184 -[iOSGameView doTick] (in ProjectiOS) (registrar.mm:14955)

Why does my app crash in release mode?

I use Visual Studio Community 2022 (64-bit) Version 17.14.19.

Screenshot 2025-11-04 222509

My iOS .csproj file:

<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <TargetFramework>net9.0-ios</TargetFramework>
    <OutputType>Exe</OutputType>
    <SupportedOSPlatformVersion>15.0</SupportedOSPlatformVersion>
    <CodesignKey>Apple Distribution: Kim Strasser (...)</CodesignKey>
    </PropertyGroup>
    <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
    <CreatePackage>false</CreatePackage>
    <WarningLevel>4</WarningLevel>
    <CodesignProvision>Automatic</CodesignProvision>
    <MtouchLink>None</MtouchLink>
    <NoStdLib>false</NoStdLib>
  </PropertyGroup>
<PropertyGroup>
    <NoSymbolStrip>true</NoSymbolStrip>
</PropertyGroup>
<PropertyGroup> <DisableFastUpToDateCheck>true</DisableFastUpToDateCheck> <CollectBundleResourcesDependsOn> IncludeContent; </CollectBundleResourcesDependsOn> <ProvisioningType>manual</ProvisioningType> <CodesignProvision>ProjectiOS Profile Distribution</CodesignProvision> </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
    <CreatePackage>false</CreatePackage>
    <NoStdLib>false</NoStdLib>
    <MtouchLink>None</MtouchLink>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net6.0-ios|AnyCPU'">
    <CodesignKey>iPhone Developer</CodesignKey>
    <CodesignProvision>ProjectiOS Profile Development</CodesignProvision>
    <MtouchDebug>true</MtouchDebug>
    <CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net7.0-ios|AnyCPU'">
    <CodesignProvision>Automatic</CodesignProvision>
    <CodesignKey>iPhone Developer</CodesignKey>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net7.0-ios|AnyCPU'" />
…
 <ProjectExtensions><VisualStudio><UserProperties XamarinHotReloadDebuggerTimeoutExceptionProjectiOSHideInfoBar="True" /></VisualStudio></ProjectExtensions>
</Project>

Is something wrong in my .csproj file? Should I change something in the .csproj file before uploading my app to TestFlight or before distribution in the Apple App Store?

Developer technologies | .NET | .NET MAUI
{count} votes

1 answer

Sort by: Most helpful
  1. Michael Le (WICLOUD CORPORATION) 5,930 Reputation points Microsoft External Staff Moderator
    2025-12-04T08:22:38.9233333+00:00

    Hello @Kim Strasser ,

    Please try this streamlined setup in your .csproj file. I have cleaned up a few conflicting settings (like the duplicate LLVM properties) and set the linker to None for the Release configuration.

    1. Close Visual Studio.
    2. Manually delete the bin and obj folders in your project directory.
    3. Replace your .csproj content with the XML below.
    4. Open the project and try to build again.
    <Project Sdk="Microsoft.NET.Sdk">
      <PropertyGroup>
        <TargetFramework>net10.0-ios</TargetFramework>
        <OutputType>Exe</OutputType>
        <SupportedOSPlatformVersion>15.0</SupportedOSPlatformVersion>
      </PropertyGroup>
    
      <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
        <MtouchLink>SdkOnly</MtouchLink>
        <DebugType>portable</DebugType>
        <MtouchDebug>true</MtouchDebug>
        <CodesignKey>iPhone Developer</CodesignKey>
        <CodesignProvision>Project iOS Profile Development</CodesignProvision>
      </PropertyGroup>
    
      <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
        <CreatePackage>true</CreatePackage>
        <!-- Set Link to None to prevent the original crash and build errors -->
        <MtouchLink>None</MtouchLink> 
        <DebugType>portable</DebugType>
        <MtouchDebug>true</MtouchDebug>
        <Optimize>true</Optimize>
        <UseLlvm>false</UseLlvm>
        <CodesignKey>iPhone Distribution</CodesignKey>
        <CodesignProvision>Project iOS Profile Distribution</CodesignProvision>
      </PropertyGroup>
    
      <!-- Your ItemGroups remain the same -->
    </Project>
    
    

    If the build still fails after cleaning the project and settings, please try creating a brand new, empty .NET 10 iOS project (File > New Project) and see if that builds and deploys to your device.

    • If the empty project works: The issue is definitely inside your specific project code or one of your NuGet packages (like PlayFabAllSDK or MonoGame). You will need to add them back one by one to find the culprit.
    • If the empty project also fails: Your Visual Studio installation or Mac connection is corrupted. You will need to fully reinstall Visual Studio and the iOS workloads.

    If you do isolate the issue to a specific bug in the SDK (like the IL Trimmer error persisting even on a clean project), the best place to get it fixed is the official GitHub repository where the engineering team tracks these defects. You can file an issue here: github.com/dotnet/maui/issues.

    Also, if you post there or need further help anywhere else, please share the full build log, not just the last error line. The "Info.plist" error is usually just the final symptom; the actual cause will be buried much earlier in the log output.


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.