UBports Robot Logo UBports Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    .NET6 on UT

    Scheduled Pinned Locked Moved App Development
    avalonia.uiuno platformnet6
    26 Posts 9 Posters 4.4k Views 3 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
      Reply
      • Reply as topic
      Log in to reply
      This topic has been deleted. Only users with topic management privileges can see it.
      • dizzyD Offline
        dizzy
        last edited by

        Hi all!
        Is it possible to develop applications with .NET6 for UT? I was thinking of Avalonia.UI or Uno Platform.

        LakotaubpL N T 3 Replies Last reply Reply Quote 0
        • LakotaubpL Offline
          Lakotaubp @dizzy
          last edited by

          @dizzy This might help https://docs.ubports.com/en/latest/appdev/index.html

          dizzyD 1 Reply Last reply Reply Quote 0
          • dizzyD Offline
            dizzy @Lakotaubp
            last edited by

            @lakotaubp Thanks! That's indeed helpful but it doesn't answer my question I'm afraid.
            I know for sure Avalonia and Uno Platform runs well on Linux desktop and can probably also run on for example Manjaro arm, but can it run on UT?
            Have someone tried?

            arubislanderA 1 Reply Last reply Reply Quote 0
            • arubislanderA Offline
              arubislander @dizzy
              last edited by

              @dizzy in order to run a .NET app on UT the whole .NET runtime would need to be packaged in the .click (clicks are the package format for UTouch apps). This probably being a game, the gaming engine would need to be included as well.

              There are no tutorials or instructions on how to do this as it has as yet never been attempted.

              πŸ‡¦πŸ‡Ό πŸ‡³πŸ‡± πŸ‡ΊπŸ‡Έ πŸ‡ͺπŸ‡Έ
              Happily running Ubuntu Touch
              Google Pixel 3a (20.04 DEV)
              JingPad (24.04 preview)
              Meizu Pro 5 (16.04 DEV)

              dizzyD 1 Reply Last reply Reply Quote 0
              • dizzyD Offline
                dizzy @arubislander
                last edited by dizzy

                @arubislander You can deploy both Avalonia and Uno apps self contained and as a single executable file, and it runs on Linux desktop. No installation needed. I have tried it on Ubuntu and Manjaro Gnome. Could that work on UT? Not optimal but a good start if so.

                arubislanderA 1 Reply Last reply Reply Quote 0
                • arubislanderA Offline
                  arubislander @dizzy
                  last edited by

                  @dizzy said in .NET6 on UT:

                  @arubislander You can deploy both Avalonia and Uno apps self contained and as a single executable file, and it runs on Linux desktop. No installation needed. I have tried it on Ubuntu and Manjaro Gnome. Could that work on UT? Not optimal but a good start if so.

                  @dizzy It would depend on what those self-contained packages expect to be installed on the base system.
                  Desktops and laptops have many more packages installed than there are on Ubuntu Touch. Also the non-mainline devices use the Mir protocol for the display manager. The PinePhone uses the Wayland protocol. These need to be supported by the afore mentioned packages.

                  πŸ‡¦πŸ‡Ό πŸ‡³πŸ‡± πŸ‡ΊπŸ‡Έ πŸ‡ͺπŸ‡Έ
                  Happily running Ubuntu Touch
                  Google Pixel 3a (20.04 DEV)
                  JingPad (24.04 preview)
                  Meizu Pro 5 (16.04 DEV)

                  dizzyD 1 Reply Last reply Reply Quote 0
                  • dizzyD Offline
                    dizzy @arubislander
                    last edited by

                    @arubislander Interesting, so Pinephone UT uses Wayland. To be honest, I wasn't even thinking of Mir...
                    I guess I just have to tryout a "Hellow world" application. Thanks!

                    1 Reply Last reply Reply Quote 0
                    • fredldotmeF Offline
                      fredldotme
                      last edited by

                      @dizzy it all depends on what native-side toolkit those .NET toolkits use. If it's GTK or SDL (something that uses Wayland to spawn window surfaces) then to some extent it could work, at least on Halium >= 9.0 and mainline devices.

                      dizzyD 1 Reply Last reply Reply Quote 0
                      • N Offline
                        nero355 @dizzy
                        last edited by

                        @dizzy said in .NET6 on UT:

                        Is it possible to develop applications with .NET6 for UT? I was thinking of Avalonia.UI or Uno Platform.

                        Never heard of those two before so learned something new today! Thnx! πŸ™‚

                        About .NET in combination with Linux in general :
                        You could try https://www.mono-project.com/ and see what happens when you add it to your phone...

                        Huge chance you will ending up flashing the phone again but it also might be worth it ?!

                        Good luck! πŸ™‚

                        My phones :

                        • BQ Aquaris E5 HD Ubuntu Phone Edition - Ubuntu Touch 16.04 LTS
                        • ZUK Z2 Pro - ZUI Android 8.x
                        • Xiaomi Mi 9T - Jolla SailFish 3.4.x Community Build

                        P.S. : I am NOT a developer! ;)

                        1 Reply Last reply Reply Quote 0
                        • dizzyD Offline
                          dizzy
                          last edited by

                          I tried a little bit today with no success. Haven't had time to investigate it further but I did find this:
                          https://stackoverflow.com/questions/66108147/is-there-any-way-to-run-an-avalonia-app-in-an-arm64-environment

                          1 Reply Last reply Reply Quote 0
                          • dizzyD Offline
                            dizzy @fredldotme
                            last edited by

                            This post is deleted!
                            1 Reply Last reply Reply Quote 0
                            • dizzyD Offline
                              dizzy
                              last edited by

                               When trying to run the app on UT

                              arubislanderA 1 Reply Last reply Reply Quote 0
                              • arubislanderA Offline
                                arubislander @dizzy
                                last edited by

                                @dizzy does it have to be executed as root? What happens if you try it without sudo?

                                In case it does need root, then you need to provide the complete path to the executable.

                                It could also be that nothing is allowed to be executed in the Downloads folder.

                                πŸ‡¦πŸ‡Ό πŸ‡³πŸ‡± πŸ‡ΊπŸ‡Έ πŸ‡ͺπŸ‡Έ
                                Happily running Ubuntu Touch
                                Google Pixel 3a (20.04 DEV)
                                JingPad (24.04 preview)
                                Meizu Pro 5 (16.04 DEV)

                                dizzyD 1 Reply Last reply Reply Quote 0
                                • dizzyD Offline
                                  dizzy @arubislander
                                  last edited by dizzy

                                  @arubislander On Linux desktop it doesn't has to be as root but I got a "Permission denied" on UT.
                                  This is the executable. It's a single file, self contained application. EDIT: Ah. You meen like this of cause: sudo ./home/phablet/Documents/Avalonia.UT. Have tried that too.
                                  I have also tried it in Downloads and Documents.
                                  EDIT: Added info.
                                  This error was because I compiled it for alpine-arm64.
                                  When compiled for linux-arm64 console app runs and Avalonia app at least tryes to.

                                  1 Reply Last reply Reply Quote 0
                                  • dizzyD Offline
                                    dizzy
                                    last edited by

                                    By the way, is it possible to run appimages on UT? Install flatpacks or snaps?

                                    arubislanderA 1 Reply Last reply Reply Quote 0
                                    • arubislanderA Offline
                                      arubislander @dizzy
                                      last edited by

                                      @dizzy none of the above is readily possible. AppImages could theoretically be made to work, but none had dedicated themselves to the effort.

                                      πŸ‡¦πŸ‡Ό πŸ‡³πŸ‡± πŸ‡ΊπŸ‡Έ πŸ‡ͺπŸ‡Έ
                                      Happily running Ubuntu Touch
                                      Google Pixel 3a (20.04 DEV)
                                      JingPad (24.04 preview)
                                      Meizu Pro 5 (16.04 DEV)

                                      dizzyD A 2 Replies Last reply Reply Quote 0
                                      • dizzyD Offline
                                        dizzy @arubislander
                                        last edited by dizzy

                                        @arubislander Yep, I'm starting to think it will only run on Plasma Mobile. I will try it again when my Pixel 3a arrives but then I don't have more time for it at the moment. Maybe in the future.

                                        1 Reply Last reply Reply Quote 0
                                        • dizzyD Offline
                                          dizzy
                                          last edited by dizzy

                                          Thanks all!
                                          By the way, I also found this article:
                                          https://www.codingnagger.com/2021/02/14/linux-app-for-pinephone-with-pain-and-net-core/

                                          1 Reply Last reply Reply Quote 0
                                          • A Offline
                                            aarontheissueguy @arubislander
                                            last edited by

                                            @arubislander Thats actually an interristing thought. I wonder what it would take.

                                            1 Reply Last reply Reply Quote 0
                                            • dizzyD Offline
                                              dizzy
                                              last edited by dizzy

                                              I have done some progress. .NET 6 ConsoleApp running on UT. This is on Pinephone. Sorry about the text πŸ™‚

                                              ConsoleApp.jpg

                                              Error when launching Avalonia App:

                                              AvaloniaApp.jpg

                                              1 Reply Last reply Reply Quote 0
                                              • First post
                                                Last post