No MSIX 🚫 Distribute Your .NET MAUI Windows App Unpackaged

แชร์
ฝัง
  • เผยแพร่เมื่อ 5 ส.ค. 2024
  • Sometimes you just want to grab the exe and DLLs and send that over as a way of distributing your .NET MAUI Windows app. Until now, you had to use an MSIX installer to do that, but not anymore! In this video I'll show you how to distribute Your .NET MAUI Windows App Unpackaged.
    💝 Join this channel to get access to perks:
    th-cam.com/channels/ral.html...
    Disclaimer: this channel is done on personal title, in my free time, and not officially affiliated with or endorsed by Microsoft (my employer) in any way. Opinions and views are my own.
    🛑 Don't forget to subscribe to my channel for more amazing content: th-cam.com/users/GeraldVerslui...
    🔗 Links
    Sample Code Repo: github.com/jfversluis/MauiWin...
    Unpackaged Apps Docs: docs.microsoft.com/windows/ap...
    .NET MAUI Docs: docs.microsoft.com/dotnet/maui
    ⏱ Timestamps
    00:00 - .NET MAUI Windows Apps Without MSIX
    00:13 - What Is MSIX? Unpackaged?
    01:10 - Enable Unpackaged Distribution
    04:28 - Warning!
    🐦 Follow me on Twitter: / jfversluis
    🤝 Join the Discord server: / discord
    🎥 Video edited with Camtasia (ref): techsmith.z6rjha.net/AJoeD
    🙋‍♂️ Also find my...
    Twitter: / jfversluis
    Blog: blog.verslu.is
    Twitch: / jfversluis
    All the rest: jfversluis.dev
    #dotnetmaui #msix #unpackaged #winui #dotnet6 #maui
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 81

  • @jfversluis
    @jfversluis  ปีที่แล้ว

    Landed here but actually wanted to know how you _do_ publish to the Microsoft Store? I got a video for that (and iOS and Android too!) check it here: th-cam.com/video/FNwv_W3TtSU/w-d-xo.html

  • @ertan1147
    @ertan1147 7 หลายเดือนก่อน +4

    You are a life saver thank you a lot. The app was asked from me in a short time and this signing thing is a bit complicated and somehow did not go well and I saw your video and done! It works with .net 8.0 too. Thank you again

    • @jfversluis
      @jfversluis  7 หลายเดือนก่อน +1

      Glad you were able to make it a success! Congrats!

  • @Canodis
    @Canodis 3 หลายเดือนก่อน

    I've been trying for 1 week to figure this out, you are amazing, thank you so much

    • @jfversluis
      @jfversluis  3 หลายเดือนก่อน

      Happy to help!

  • @olivier0003
    @olivier0003 ปีที่แล้ว

    Quick and Useful as always !

    • @jfversluis
      @jfversluis  ปีที่แล้ว

      Thank you sir 🫡

  • @bondymagnomous3544
    @bondymagnomous3544 ปีที่แล้ว +1

    You are life saver mate. Thanks.

  • @matthewleibowitz7372
    @matthewleibowitz7372 ปีที่แล้ว +3

    Good news! I think the windows app sdk is now included by default in the bin folder, so less to worry about! It can be disabled by setting the WindowsAppSDKSelfContained property to false in the csproj. You will then have to worry about installing it.

  • @josedonizeteoliveirajunior1744
    @josedonizeteoliveirajunior1744 ปีที่แล้ว +2

    Very good video. Very good to know the options available.

    • @jfversluis
      @jfversluis  ปีที่แล้ว

      Glad you liked it José thank you!

  • @davidmiller9852
    @davidmiller9852 หลายเดือนก่อน

    Amazing thank you

  • @Timm3D
    @Timm3D ปีที่แล้ว +6

    I hope that it will soon be possible to create a single executable. I really liked that in WPF.

    • @jfversluis
      @jfversluis  ปีที่แล้ว +2

      That should be a next logical step! I think that will make even more people happy!

    • @matiasbonet6618
      @matiasbonet6618 ปีที่แล้ว +2

      @@jfversluis Is there some update regarding the single executable?

    • @tesshartis6684
      @tesshartis6684 4 หลายเดือนก่อน

      @@matiasbonet6618 a workaround is using IL Merge

  • @ikhifeli5443
    @ikhifeli5443 ปีที่แล้ว +1

    Hi, Gerald! Great video, really informative. I am in a situation where I need to publish an windows app in this way, however, the size of the app, which is windows only (I removed the other files from the platform directory) still has a ton of extra files, such as those language packs or resized images of some sort. Any idea how we can trim them out?
    Thanks!

    • @TWiesendanger
      @TWiesendanger ปีที่แล้ว

      th-cam.com/video/LHNahJi21Vg/w-d-xo.html

  • @douglaswt77
    @douglaswt77 ปีที่แล้ว

    Nice. It Workd. But can someone tell me why my VS2022 isn't creating the APK file for Android? It' just creates the .AAB file for layStore deploying

  • @mkgungor
    @mkgungor ปีที่แล้ว

    Hi
    Could you make a video about how to make the .Net MAUI app auto start at boot for Android … Thank you!

  • @philippedoumet6073
    @philippedoumet6073 8 หลายเดือนก่อน

    Hey Gerald, do you remember me? haha
    Thank you for this very usefull tutorial :)

    • @jfversluis
      @jfversluis  8 หลายเดือนก่อน +1

      Of course my friend! How can I forget you! Thank you so much!

    • @philippedoumet6073
      @philippedoumet6073 8 หลายเดือนก่อน

      @@jfversluis 😘😘

  • @en_acorn
    @en_acorn ปีที่แล้ว

    Hi Gerald, the video is informative and helpful, thanks!. I have a question, is this possible on Mac Catalyst?

    • @jfversluis
      @jfversluis  ปีที่แล้ว +1

      Yes! Official docs on that should be published soon :)

    • @en_acorn
      @en_acorn ปีที่แล้ว

      @@jfversluis Good to hear! Thanks!

    • @jfversluis
      @jfversluis  ปีที่แล้ว +1

      @@en_acorn thanks for you support Wendell! 🥰

  • @griffithe2438
    @griffithe2438 ปีที่แล้ว

    Hello Gerald. First of all, Thank You!
    ..tried out to compile this way and it worked. The another thing about MAUI is the size. So I've simply compiled the standard example with a size of around 310mb for a white screen app with an logo. Is there maybe a way to strip it somehow? Or why is this that large. If this is true, maybe I should keep up with WPF. I'm new to MAUI.

    • @jfversluis
      @jfversluis  ปีที่แล้ว +1

      Thanks for the kind words! There are lots of optimizations you can do. You might want to check the docs.
      Als a debug build is not the same as a production build. If you do a release build it should be much better.

    • @griffithe2438
      @griffithe2438 ปีที่แล้ว +2

      @@jfversluis Thanks for the quick response Gerald. Guess there is a difference between a whole solution and the build of (CTRL+B), so the size is now with 162mb mush better.
      While I'm here, maybe one more thing, if I may... Talking to a developer of MAUI, is there ehem... a chance for a Linux support in the future? :'D
      This would round up the MAUI as an real cross-plattform solution. : ]
      For a lot of people it's important to know to take a decision what technology they want to spend the time with...

  • @Kevmoens
    @Kevmoens ปีที่แล้ว

    We build our apps in house and ship an installer that then publishes a click once app in IIS at The customer’s on premise server. Moving to Maui and .Net 6 will we be able to do the same thing?

    • @jfversluis
      @jfversluis  ปีที่แล้ว

      Not officially right now, we're looking into it. Search the repository for issues about it there, are some hacks I think to make it work today.

  • @goblelol
    @goblelol ปีที่แล้ว

    Is it possible to make something like Debug-Msix, Debug-Unpackaged? i.e. separate ways of building

    • @jfversluis
      @jfversluis  ปีที่แล้ว

      Good question! I'm not 100% sure. I would say at the very least you can include different files in your csproj with different conditions depending on the build configuration

  • @Jennalcn
    @Jennalcn ปีที่แล้ว +1

    Thank you for sharing. I am new in MAUI, and I am working on a MAUI Blazor project. With this method, I can build exe file. But when I double click the exe. Nothing happen, no window, no error, no message. I try to execute exe in cmd, still nothing happen, no window, no error, no message. How can I debug this issue?

    • @jfversluis
      @jfversluis  ปีที่แล้ว

      As mentioned in the video. Doing it like this puts you in charge of checking it all the requirements are there. So you need to make sure WinAppSDK is installed on the machine and in the case of a Blazor app also WebView2, those are the likely causes.
      Having that said, there is a current issue ongoing here: github.com/dotnet/maui/issues/10054 you might want to check that out

    • @Jennalcn
      @Jennalcn ปีที่แล้ว

      @@jfversluis Thank you for you kindly reply. It is working when I do build instead of publish. It seems some data asset files are not copied into publish folder.

  • @humbertomoli99
    @humbertomoli99 ปีที่แล้ว

    to publish it in the store you have to pass it as win 32 in this case?

    • @jfversluis
      @jfversluis  ปีที่แล้ว

      Publishing for the store can be found here: th-cam.com/video/FNwv_W3TtSU/w-d-xo.html

  • @JonathanPeel
    @JonathanPeel ปีที่แล้ว

    Is there any way to do this with Xamarin projects?

    • @jfversluis
      @jfversluis  ปีที่แล้ว

      Xamarin is based on UWP. I’m not too familiar unfortunately… If it’s possible with UWP, it’s possible with Xamarin.

  • @kishanrt
    @kishanrt ปีที่แล้ว

    Hi Gerald.
    Will this work on windows 7 machine? My client has windows 7 installed in the system, and they do not want to change the OS.

    • @jfversluis
      @jfversluis  ปีที่แล้ว

      I’m afraid not. .NET MAUI apps run on Windows 10 and above

    • @kishanrt
      @kishanrt ปีที่แล้ว

      @@jfversluis Is there any workaround please?

  • @carlosmedina742
    @carlosmedina742 7 หลายเดือนก่อน

    And if the application is made in Maui Blazor or better known as Maui Hybrid

    • @jfversluis
      @jfversluis  7 หลายเดือนก่อน

      Hat shouldn’t matter

  • @myti1617
    @myti1617 หลายเดือนก่อน +1

    Nice

  • @redrevyol
    @redrevyol ปีที่แล้ว

    I used Inno Setup to create the exe installer., but I can't install it in Program Files because I get a purple screen.

    • @jfversluis
      @jfversluis  ปีที่แล้ว

      Sorry that doesn’t ring any bells

    • @GabrielUechi
      @GabrielUechi 3 หลายเดือนก่อน

      I had the same problem when I try create using inno setup. The only way i have discovery to fix this, was changed the install folder of the aplication out of C:/Program Files (or C:/Program Files x86), something like C:/newFolderMaui, it works for me

  • @flobuilds
    @flobuilds ปีที่แล้ว

    How can you create like real world installers for this?

    • @jfversluis
      @jfversluis  ปีที่แล้ว

      That very much depends on the installer. If you do use MSIX that is an installer in itself

  • @anwaralomari2261
    @anwaralomari2261 ปีที่แล้ว +1

    which one do you prefer
    Flutter or MAUI
    and why؟😊

    • @jfversluis
      @jfversluis  ปีที่แล้ว +5

      I work on the .NET MAUI team, I think you’re asking the wrong person 😉
      Both have pros and cons. The biggest difference being: Flutter draws everything where .NET MAUI maps everything to the platform controls.
      With drawing the look and feel will be exactly the same across platforms, but might not necessarily feel natural on a certain platform. Also you might lose built-in capabilities in terms of functionality or more hidden things like accessibility.
      By mapping everything to the platform control you will retain the platform-specific look and feel which should make it feel more natural on the platform you’re running on, you’ll be able to leverage all functionality including accessibility, but things might look different depending on the platform you’re running it on.
      At the end of the day both can do the exact same thing but in a different way and it simply comes down to what you like to use or what requirements you might have.

    • @anwaralomari2261
      @anwaralomari2261 ปีที่แล้ว

      Thanks alot😅

    • @jfversluis
      @jfversluis  ปีที่แล้ว +1

      @@anwaralomari2261 hope it helps!

    • @anwaralomari2261
      @anwaralomari2261 ปีที่แล้ว

      @@jfversluis Of course I love MAUI and look forward to it being the best

  • @toma1385
    @toma1385 ปีที่แล้ว

    Blazor Maui the same?

  • @fmkid192
    @fmkid192 ปีที่แล้ว

    how to remove that "Home" text ?

    • @jfversluis
      @jfversluis  ปีที่แล้ว

      What home text?

    • @fmkid192
      @fmkid192 ปีที่แล้ว

      @@jfversluis at the navigator left top

  • @hesham1871
    @hesham1871 ปีที่แล้ว

    this way not working now last update of vs close it

    • @jfversluis
      @jfversluis  ปีที่แล้ว

      Define “not working”?

    • @hesham1871
      @hesham1871 ปีที่แล้ว

      @@jfversluis
      Thank you very much for your reply
      Before updating Windows and vs, this method worked fine for me
      But now two errors happen
      first error says
      Severity Code Description Project File Line Suppression State
      Error c1010070 Failed to load and parse the manifest. Windows was unable to parse the requested XML data. MauiApp1 C:\Users\hesham 1
      The second error says
      Severity Code Description Project File Line Suppression State
      Error MSB3073 The command ""C:\Users\hesham gaber\.nuget\packages\microsoft.windows.sdk.buildtools\10.0.22621.755\bin\10.0.22621.0\x64\mt.exe" -nologo -manifest "C: \Users\hesham gaber\Desktop\upload2this\MauiApp1\obj\Release
      et7.0-windows10.0.19041.0\win10-x64\\Manifests\app.manifest" "Platforms\Windows\app.manifest" C:\Users \hesham gaber\.nuget\packages\microsoft.windowsappsdk\1.2.221209.1\manifests\Microsoft.InteractiveExperiences.manifest C:\Users\hesham gaber\.nuget\packages\microsoft.windowsappsdk\1.2.221209.1\manifests\Microsoft.WindowsAppSdk .Foundation.manifest -out:"C:\Users\hesham gaber\Desktop\upload2this\MauiApp1\obj\Release
      et7.0-windows10.0.19041.0\win10-x64\\Manifests\mergeapp.manifest"" exited with code 31. MauiApp1 C:\Users\hesham gaber\.nuget\packages\microsoft.windowsappsdk\1.2.221209.1\buildTransitive\Microsoft.WindowsAppSDK.SelfContained.targets 243
      Please please help me

    • @hesham1871
      @hesham1871 ปีที่แล้ว

      The solution is New setup for windows 😅

    • @jfversluis
      @jfversluis  ปีที่แล้ว

      @@hesham1871 sorry to hear that!

  • @carlossantamaria1820
    @carlossantamaria1820 6 หลายเดือนก่อน +2

    I want to send that .exe file to another person, but that person cannot open it.

  • @Lextrack12
    @Lextrack12 ปีที่แล้ว

    ¡Muchas gracias, funciona de lujo!

    • @jfversluis
      @jfversluis  ปีที่แล้ว

      ¡que gran! ¡Gracias!

  • @schnipseljung2878
    @schnipseljung2878 ปีที่แล้ว

    Does not work for me, unfortunately. When I double-click the created EXE, nothing happens.
    In the Windows Event Viewer I get the following error:
    Application: BuildingCalculator.exe
    CoreCLR Version: 6.0.1022.47605
    .NET Version: 6.0.10
    Description: The process was terminated due to an unhandled exception.
    Exception Info: System.DllNotFoundException: Unable to load DLL 'Microsoft.ui.xaml.dll' or one of its dependencies: Das angegebene Modul wurde nicht gefunden. (0x8007007E)
    at BuildingCalculator.WinUI.Program.XamlCheckProcessRequirements()
    at BuildingCalculator.WinUI.Program.Main(String[] args) in E:\***\obj\Debug
    et6.0-windows10.0.19041.0\win10-x64\Platforms\Windows\App.g.i.cs:line 28
    Any ideas?

    • @jfversluis
      @jfversluis  ปีที่แล้ว +1

      Sounds like one or more of the dependencies are not on your system?

    • @schnipseljung2878
      @schnipseljung2878 ปีที่แล้ว

      @@jfversluis Thanks for your quick reply.
      I'm completely new to this.
      I have got the following:
      - VS Community 2022 17.3.6
      - VCRedist x64 2015-2022 14.34.31931
      - Windows App SDK x64 1.2.221116.1
      - .NET 6.0.402
      Do I need anything else?

  • @philipjohndekock
    @philipjohndekock ปีที่แล้ว +1

    Thanks is advance, but I have been battling with this for a couple of months and this is the closest topic I have found to my issue: I keep get this error when building a maul application and I need to know how to resolve it Severity Code Description Project File Line Suppression State
    Error MSB4062 The "Microsoft.Build.Msix.Recipe.ReunionExpandPayloadDirectories" task could not be loaded from the assembly C:\Users\phili\.nuget\packages\microsoft.windowsappsdk.winui\1.0.0-experimental1\buildTransitive\..\tools\Microsoft.Build.Msix.dll. Confirm that the declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask. ArdentMobility.Business C:\Users\phili\
    .nuget\packages\microsoft.windowsappsdk.winui\1.0.0-experimental1\buildTransitive\Microsoft.Build.Msix.Packaging.targets 1180

    • @jfversluis
      @jfversluis  ปีที่แล้ว +1

      A bit hard to say with just this error message, but the first thing that stands out is that this seems to use an older and experimental version of WinAppSDK, so updating that seems to be a first logical step

    • @philipjohndekock
      @philipjohndekock ปีที่แล้ว

      @@jfversluis I thought that might be the issue but how do I install a new version?

    • @jfversluis
      @jfversluis  ปีที่แล้ว +1

      You’ll want to add something like this: github.com/CommunityToolkit/Maui/blob/add-mediaelement/samples/CommunityToolkit.Maui.Sample/CommunityToolkit.Maui.Sample.csproj#L79-L81

    • @philipjohndekock
      @philipjohndekock ปีที่แล้ว

      Thanks I will give that a try

    • @philipjohndekock
      @philipjohndekock ปีที่แล้ว

      It only happens on my Maui app that has Maui class libraries, it been a real pain