New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Aot compilation fail when publishing for iOS #8286
Comments
@Ghevi can you upload a reproduction to github please? |
Hi @Ghevi. We have added the "s/needs-repro" label to this issue, which indicates that we require steps and sample code to reproduce the issue before we can take further action. Please try to create a minimal sample project/solution or code samples which reproduce the issue, ideally as a GitHub repo that we can clone. See more details about creating repros here: https://github.com/dotnet/maui/blob/main/.github/repro.md This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time. |
@PureWeen i can't upload the whole project, but I could try to make a new one, try publishing that to exclude it's not an issue on my environment, then try with the same packages that i'm using in the affected app. |
@PureWeen so i tried publishing a brand new project, first with Maui Blazor and then Maui. Both still presented the same issue. This didn't work This did work So the issue seems to be the LLVM optimization... |
Thanks for the feedback @Ghevi I tried reproducing your issue with a new ios and a new maui project with this set:
and I was unable to. Attaching a repro would be very useful. |
@chamons Things I've tried on Android:
Will try again on iOS too... |
Hi @Ghevi. We have added the "s/needs-repro" label to this issue, which indicates that we require steps and sample code to reproduce the issue before we can take further action. Please try to create a minimal sample project/solution or code samples which reproduce the issue, ideally as a GitHub repo that we can clone. See more details about creating repros here: https://github.com/dotnet/maui/blob/main/.github/repro.md This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time. |
This issue has been automatically marked as stale because it has been marked as requiring author feedback to reproduce the issue but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. If it is closed, feel free to comment when you are able to provide the additional information and we will re-investigate. |
I'm getting this issue when I've referenced a project in my MAUI application that has a private asset project reference. MAUI project: <Project Sdk="Microsoft.NET.Sdk.Razor">
<PropertyGroup>
<TargetFrameworks>net6.0-android;net6.0-ios;net6.0-maccatalyst</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net6.0-windows10.0.19041.0</TargetFrameworks>
<OutputType>Exe</OutputType>
<RootNamespace>MyMauiProject</RootNamespace>
<UseMaui>true</UseMaui>
<SingleProject>true</SingleProject>
<ImplicitUsings>enable</ImplicitUsings>
<EnableDefaultCssItems>false</EnableDefaultCssItems>
<!-- Display name -->
<ApplicationTitle>Application</ApplicationTitle>
<!-- App Identifier -->
<ApplicationId>com.company.application</ApplicationId>
<ApplicationIdGuid>0000000-0000-0000-0000-000000000000</ApplicationIdGuid>
<!-- Versions -->
<ApplicationDisplayVersion>1.0</ApplicationDisplayVersion>
<ApplicationVersion>1</ApplicationVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">14.2</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">14.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">23.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</SupportedOSPlatformVersion>
<TargetPlatformMinVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</TargetPlatformMinVersion>
</PropertyGroup>
<ItemGroup>
<!-- App Icon -->
<MauiIcon Include="Resources\appicon.svg" ForegroundFile="Resources\appiconfg.svg" Color="#2E3643" />
<!-- Splash Screen -->
<MauiSplashScreen Include="Resources\logo.svg" Color="#2E3544" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\MyReferencedProject\MyReferencedProject.csproj" />
</ItemGroup>
</Project> Referenced Project: <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\AnotherProject\AnotherProject.csproj" PrivateAssets="All" />
</ItemGroup>
</Project> PrivateAsset Project: <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="NuGetPackage" Version="1.0.0" />
</ItemGroup>
</Project> Then fails with:
|
Hi @Ghevi. We have added the "s/needs-repro" label to this issue, which indicates that we require steps and sample code to reproduce the issue before we can take further action. Please try to create a minimal sample project/solution or code samples which reproduce the issue, ideally as a GitHub repo that we can clone. See more details about creating repros here: https://github.com/dotnet/maui/blob/main/.github/repro.md This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time. |
Thanks for the information @Alby-o but unfortunately that's not a repro that we can use to dig into this. We need an actual executable project to dig into why the AOT compiler is failing. |
This issue has been automatically marked as stale because it has been marked as requiring author feedback to reproduce the issue but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. If it is closed, feel free to comment when you are able to provide the additional information and we will re-investigate. |
Description
I'm trying to publish a maui app on a windows pc by pairing it with a Mac, with the command
dotnet publish -f:net6.0-ios -c:Release
When the publishing reaches the step of
Optimizing assemblies for size
it remains stucked and eventually the connection with the Mac is interrupted. The process times out and other than this no other error appears.In order to connect againt the two machines, I need to restart the Mac. This all happens on a windows machine.
So I tried to publish the app directly on the Mac from the Terminal with the same command prefixed by
sudo
.This time the process reaches the same step and then give this error:
usr/local/share/dotnet/packs/Microsoft.iOS.Sdk/15.4.311/targets/Xamarin.Shared.Sdk.targets(1000,3): error : Failed to AOT compile Microsoft.Identity.Client.dll, the AOT compiler exited with code 1 [/Users/MyUser/Desktop/MyApp/MyApp.csproj]
and in the same way it starts to hang at this point, slowing down the machine a lot and I need to terminate the process.
If i press ctrl + C, it tries to quit the compilation and these other lines are printed to the terminal that I have attached in the log output section.
Version with bug: 6.0.400-preview.22301.10
Steps to Reproduce
Publish for iOS with a windows machine and mac
Version with bug
Unknown/Other (please specify)
Last version that worked well
Unknown/Other
Affected platforms
iOS
Affected platform versions
iOS
Did you find any workaround?
No response
Relevant log output
The text was updated successfully, but these errors were encountered: