Тёмный

No MSIX 🚫 Distribute Your .NET MAUI Windows App Unpackaged 

Подписаться
Просмотров 14 тыс.
% 506

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:
ru-vid.com/show-GeraldVersluisjoin
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: ru-vid.com
🔗 Links
Sample Code Repo: github.com/jfversluis/MauiWindowsUnpackagesSample
Unpackaged Apps Docs: docs.microsoft.com/windows/apps/windows-app-sdk/deploy-unpackaged-apps
.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.gg/2cAyTGNHBD
🎥 Video edited with Camtasia (ref): techsmith.z6rjha.net/AJoeD
🙋‍♂️ Also find my...
Twitter: jfversluis
Blog: blog.verslu.is
Twitch: twitch.tv/jfversluis
All the rest: jfversluis.dev
#dotnetmaui #msix #unpackaged #winui #dotnet6 #maui

Наука

Опубликовано:

 

13 сен 2022

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 82   
@jfversluis
@jfversluis 2 года назад
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: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-FNwv_W3TtSU.html
@ertan1147
@ertan1147 9 месяцев назад
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 9 месяцев назад
Glad you were able to make it a success! Congrats!
@matthewleibowitz7372
@matthewleibowitz7372 2 года назад
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.
@Timm3D
@Timm3D 2 года назад
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 Год назад
@@jfversluis Is there some update regarding the single executable?
@tesshartis6684
@tesshartis6684 6 месяцев назад
@@matiasbonet6618 a workaround is using IL Merge
@Canodis
@Canodis 5 месяцев назад
I've been trying for 1 week to figure this out, you are amazing, thank you so much
@jfversluis
@jfversluis 5 месяцев назад
Happy to help!
@ikhifeli5443
@ikhifeli5443 Год назад
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 Год назад
ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-LHNahJi21Vg.html
@bondymagnomous3544
@bondymagnomous3544 Год назад
You are life saver mate. Thanks.
@jfversluis
@jfversluis Год назад
Thank you!
@olivier0003
@olivier0003 Год назад
Quick and Useful as always !
@jfversluis
@jfversluis Год назад
Thank you sir 🫡
@josedonizeteoliveirajunior1744
@josedonizeteoliveirajunior1744 2 года назад
Very good video. Very good to know the options available.
@jfversluis
@jfversluis 2 года назад
Glad you liked it José thank you!
@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 Год назад
Yes! Official docs on that should be published soon :)
@en_acorn
@en_acorn Год назад
@@jfversluis Good to hear! Thanks!
@jfversluis
@jfversluis Год назад
@@en_acorn thanks for you support Wendell! 🥰
@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 10 месяцев назад
Hey Gerald, do you remember me? haha Thank you for this very usefull tutorial :)
@jfversluis
@jfversluis 10 месяцев назад
Of course my friend! How can I forget you! Thank you so much!
@philippedoumet6073
@philippedoumet6073 10 месяцев назад
@@jfversluis 😘😘
@Lextrack12
@Lextrack12 2 года назад
¡Muchas gracias, funciona de lujo!
@jfversluis
@jfversluis 2 года назад
¡que gran! ¡Gracias!
@Jennalcn
@Jennalcn Год назад
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.
@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
@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 Год назад
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 Год назад
@@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...
@davidmiller9852
@davidmiller9852 3 месяца назад
Amazing thank you
@giuliuploader
@giuliuploader 18 дней назад
So... clickonce is not used anymore.
@myti1617
@myti1617 3 месяца назад
Nice
@Kevmoens
@Kevmoens 2 года назад
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 2 года назад
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.
@carlosmedina742
@carlosmedina742 9 месяцев назад
And if the application is made in Maui Blazor or better known as Maui Hybrid
@jfversluis
@jfversluis 9 месяцев назад
Hat shouldn’t matter
@goblelol
@goblelol 2 года назад
Is it possible to make something like Debug-Msix, Debug-Unpackaged? i.e. separate ways of building
@jfversluis
@jfversluis 2 года назад
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
@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?
@humbertomoli99
@humbertomoli99 2 года назад
to publish it in the store you have to pass it as win 32 in this case?
@jfversluis
@jfversluis 2 года назад
Publishing for the store can be found here: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-FNwv_W3TtSU.html
@redrevyol
@redrevyol 2 года назад
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 2 года назад
Sorry that doesn’t ring any bells
@GabrielUechi
@GabrielUechi 5 месяцев назад
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
@anwaralomari2261
@anwaralomari2261 2 года назад
which one do you prefer Flutter or MAUI and why؟😊
@jfversluis
@jfversluis 2 года назад
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 2 года назад
Thanks alot😅
@jfversluis
@jfversluis 2 года назад
@@anwaralomari2261 hope it helps!
@anwaralomari2261
@anwaralomari2261 2 года назад
@@jfversluis Of course I love MAUI and look forward to it being the best
@carlossantamaria1820
@carlossantamaria1820 9 месяцев назад
I want to send that .exe file to another person, but that person cannot open it.
@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
@JonathanPeel
@JonathanPeel 2 года назад
Is there any way to do this with Xamarin projects?
@jfversluis
@jfversluis 2 года назад
Xamarin is based on UWP. I’m not too familiar unfortunately… If it’s possible with UWP, it’s possible with Xamarin.
@toma1385
@toma1385 Год назад
Blazor Maui the same?
@jfversluis
@jfversluis Год назад
Yep!
@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!
@philipjohndekock
@philipjohndekock Год назад
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 Год назад
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 Год назад
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
@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 Год назад
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?