Skip to content

Build fail for project in Android [.NET 8] #97171

@Zacharianel

Description

@Zacharianel

Description

Good morning,

I have a perfectly working MAUI project developed with .NET7 that I decided to migrate to .NET8. However, I am unable to publish in Release, while in Debug it works correctly. Good morning, I have a perfectly working MAUI project developed with .NET7 (with this framework i don't have any problem) that I decided to migrate to .NET8.

However, I am unable to publish in Release, while in Debug it works correctly. these are the errors I get (involved Microsoft.Android.Sdk.Aot.targets):
Any suggestions?

Error Precompiling failed for C:\WorkingFolders\Kering-APEEvo\src\APEEvo.Mobile\APEEvo.Mobile\obj\Release\net8.0-android\android-arm64\aot-in\Microsoft.VisualBasic.Core.dll with exit code 1. Can not open image obj\Release\net8.0-android\android-arm64\aot-in\Microsoft.VisualBasic.Core.dll APEEvo.Mobile C:\Program Files\dotnet\packs\Microsoft.Android.Sdk.Windows\34.0.52\targets\Microsoft.Android.Sdk.Aot.targets 109 

Error Precompiling failed for C:\WorkingFolders\Kering-APEEvo\src\APEEvo.Mobile\APEEvo.Mobile\obj\Release\net8.0-android\android-arm64\aot-in\System.AppContext.dll with exit code 1. Can not open image obj\Release\net8.0-android\android-arm64\aot-in\System.AppContext.dll APEEvo.Mobile C:\Program Files\dotnet\packs\Microsoft.Android.Sdk.Windows\34.0.52\targets\Microsoft.Android.Sdk.Aot.targets 109 

Error Precompiling failed for C:\WorkingFolders\Kering-APEEvo\src\APEEvo.Mobile\APEEvo.Mobile\obj\Release\net8.0-android\android-arm64\aot-in\System.ComponentModel.Annotations.dll with exit code 1. Can not open image obj\Release\net8.0-android\android-arm64\aot-in\System.ComponentModel.Annotations.dll APEEvo.Mobile C:\Program Files\dotnet\packs\Microsoft.Android.Sdk.Windows\34.0.52\targets\Microsoft.Android.Sdk.Aot.targets 109 

Error Precompiling failed for C:\WorkingFolders\Kering-APEEvo\src\APEEvo.Mobile\APEEvo.Mobile\obj\Release\net8.0-android\android-arm\aot-in\Microsoft.VisualBasic.Core.dll with exit code 1. Can not open image obj\Release\net8.0-android\android-arm\aot-in\Microsoft.VisualBasic.Core.dll APEEvo.Mobile C:\Program Files\dotnet\packs\Microsoft.Android.Sdk.Windows\34.0.52\targets\Microsoft.Android.Sdk.Aot.targets 109 

Error Precompiling failed for C:\WorkingFolders\Kering-APEEvo\src\APEEvo.Mobile\APEEvo.Mobile\obj\Release\net8.0-android\android-x64\aot-in\Microsoft.VisualBasic.Core.dll with exit code 1. Can not open image obj\Release\net8.0-android\android-x64\aot-in\Microsoft.VisualBasic.Core.dll APEEvo.Mobile C:\Program Files\dotnet\packs\Microsoft.Android.Sdk.Windows\34.0.52\targets\Microsoft.Android.Sdk.Aot.targets 109 

Error Precompiling failed for C:\WorkingFolders\Kering-APEEvo\src\APEEvo.Mobile\APEEvo.Mobile\obj\Release\net8.0-android\android-x64\aot-in\System.AppContext.dll with exit code 1. Can not open image obj\Release\net8.0-android\android-x64\aot-in\System.AppContext.dll APEEvo.Mobile C:\Program Files\dotnet\packs\Microsoft.Android.Sdk.Windows\34.0.52\targets\Microsoft.Android.Sdk.Aot.targets 109 

Error Precompiling failed for C:\WorkingFolders\Kering-APEEvo\src\APEEvo.Mobile\APEEvo.Mobile\obj\Release\net8.0-android\android-x64\aot-in\System.ComponentModel.Annotations.dll with exit code 1. Can not open image obj\Release\net8.0-android\android-x64\aot-in\System.ComponentModel.Annotations.dll APEEvo.Mobile C:\Program Files\dotnet\packs\Microsoft.Android.Sdk.Windows\34.0.52\targets\Microsoft.Android.Sdk.Aot.targets 109

Error Precompiling failed for C:\WorkingFolders\Kering-APEEvo\src\APEEvo.Mobile\APEEvo.Mobile\obj\Release\net8.0-android\android-x86\aot-in\Microsoft.VisualBasic.Core.dll with exit code 1. Can not open image obj\Release\net8.0-android\android-x86\aot-in\Microsoft.VisualBasic.Core.dll APEEvo.Mobile C:\Program Files\dotnet\packs\Microsoft.Android.Sdk.Windows\34.0.52\targets\Microsoft.Android.Sdk.Aot.targets 109 

Error Precompiling failed for C:\WorkingFolders\Kering-APEEvo\src\APEEvo.Mobile\APEEvo.Mobile\obj\Release\net8.0-android\android-x86\aot-in\System.AppContext.dll with exit code 1. Can not open image obj\Release\net8.0-android\android-x86\aot-in\System.AppContext.dll APEEvo.Mobile C:\Program Files\dotnet\packs\Microsoft.Android.Sdk.Windows\34.0.52\targets\Microsoft.Android.Sdk.Aot.targets 109 

Error Precompiling failed for C:\WorkingFolders\Kering-APEEvo\src\APEEvo.Mobile\APEEvo.Mobile\obj\Release\net8.0-android\android-x86\aot-in\System.ComponentModel.Annotations.dll with exit code 1. Can not open image obj\Release\net8.0-android\android-x86\aot-in\System.ComponentModel.Annotations.dll APEEvo.Mobile C:\Program Files\dotnet\packs\Microsoft.Android.Sdk.Windows\34.0.52\targets\Microsoft.Android.Sdk.Aot.targets 109

Steps to Reproduce

No response

Link to public reproduction project repository

No response

Version with bug

8.0.6

Is this a regression from previous behavior?

Yes, this used to work in .NET MAUI

Last version that worked well

8.0.0-rc.1.9171

Affected platforms

Android

Affected platform versions

No response

Did you find any workaround?

No response

Relevant log output

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-VM-meta-mononeeds-author-actionAn issue or pull request that requires more info or actions from the author.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions