Giter Club home page Giter Club logo

Comments (18)

github-actions avatar github-actions commented on August 17, 2024 2

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

from maui.

jonathanpeppers avatar jonathanpeppers commented on August 17, 2024 1

You could comment on dotnet/runtime#103975 and ask if it is going back to .NET 8.

from maui.

RobTF avatar RobTF commented on August 17, 2024

Hi,

The AOT stuff is pretty glitched, try adding

<RunAOTCompilation>False</RunAOTCompilation>

to your .csproj for Android release builds, e.g.

<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|net8.0-android|AnyCPU'">
	<RunAOTCompilation>False</RunAOTCompilation>
</PropertyGroup>

from maui.

gabriel-kozma avatar gabriel-kozma commented on August 17, 2024

Hi,

The AOT stuff is pretty glitched, try adding

<RunAOTCompilation>False</RunAOTCompilation>

to your .csproj for Android release builds, e.g.

<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|net8.0-android|AnyCPU'">
	<RunAOTCompilation>False</RunAOTCompilation>
</PropertyGroup>

The problem is, I need aot, I've waited to update to maui from Xamarin, since IL stripping didn't work on maui and with .net 8 they've added support

from maui.

gabriel-kozma avatar gabriel-kozma commented on August 17, 2024

Just tried without AOT and still crashes

from maui.

RobTF avatar RobTF commented on August 17, 2024

Maybe it's not AOT then - but you mentioned IL stripping - maybe something there is being too aggressive? Maybe post your settings w.r.t. any IL stripping that's taking place.

from maui.

gabriel-kozma avatar gabriel-kozma commented on August 17, 2024

it was a combination of and IL stripping, is there a way to control IL removing?

from maui.

wagenheimer avatar wagenheimer commented on August 17, 2024

I'm encountering the same issue; disabling AOT didn't resolve it. I urgently need to create a release build. Is there a workaround available?

from maui.

wagenheimer avatar wagenheimer commented on August 17, 2024

It appears that dependency injection fails to work as expected in release mode; it crashes when a parameterless constructor is absent.

from maui.

gabriel-kozma avatar gabriel-kozma commented on August 17, 2024

It appears that dependency injection fails to work as expected in release mode; it crashes when a parameterless constructor is absent.

Have you figured out a workaround?

from maui.

PureWeen avatar PureWeen commented on August 17, 2024

@jonathanpeppers thoughts?

from maui.

wagenheimer avatar wagenheimer commented on August 17, 2024

In the end, the error was due to an incorrect definition in my XAML. The issue was that the actual error wasn't displayed anywhere. Correcting the XAML resolved the issue with Dependency Injection.

from maui.

jonathanpeppers avatar jonathanpeppers commented on August 17, 2024

There is a lack of information here, to know what went wrong.

@gabriel-kozma said:

it was a combination of and IL stripping, is there a way to control IL removing?

What was the setting that worked vs didn't work?

There is an issue related to the experimental $(AndroidStripILAfterAOT) setting, that should be fixed in .NET 9 now:

from maui.

gabriel-kozma avatar gabriel-kozma commented on August 17, 2024

hi @jonathanpeppers just using IL stripping causes the app to crash, I could try the .net 9, but I would need to wait for production to release it?

Can this be back ported to .net 8?

I'll try here and report back

from maui.

gabriel-kozma avatar gabriel-kozma commented on August 17, 2024

Thank you @jonathanpeppers is there a way for me to add more logging in order to figure out how is breaking?

from maui.

gabriel-kozma avatar gabriel-kozma commented on August 17, 2024

I followed what @wagenheimer said and started looking, I'm not using XAML anymore, but I've had some code comments with the Xamarin.Forms xaml and it was this that was causing the problem with IL Stripping

another question I have @jonathanpeppers is were the empty dlls are stored on the release application? In xamarin they were stored at a file monodroidbundle which cointaned all dlls and I could verify that they were indeed stripped of their IL

from maui.

jonathanpeppers avatar jonathanpeppers commented on August 17, 2024

On Android, .NET assemblies are compressed into a single file that can be mmap'd in one call.

You can use either of these tools to inspect or pull them out of an .apk:

from maui.

samhouts avatar samhouts commented on August 17, 2024

Is this issue good to close now? Thanks!

from maui.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.