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: ruclips.net/video/FNwv_W3TtSU/видео.html
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
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.
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!
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?
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
@@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.
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.
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.
@@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...
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?
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
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
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.
@@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
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
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
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
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 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?
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: ruclips.net/video/FNwv_W3TtSU/видео.html
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
Glad you were able to make it a success! Congrats!
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.
I've been trying for 1 week to figure this out, you are amazing, thank you so much
Happy to help!
I hope that it will soon be possible to create a single executable. I really liked that in WPF.
That should be a next logical step! I think that will make even more people happy!
@@jfversluis Is there some update regarding the single executable?
@@matiasbonet6618 a workaround is using IL Merge
You are life saver mate. Thanks.
Thank you!
Very good video. Very good to know the options available.
Glad you liked it José thank you!
Quick and Useful as always !
Thank you sir 🫡
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!
ruclips.net/video/LHNahJi21Vg/видео.html
Hey Gerald, do you remember me? haha
Thank you for this very usefull tutorial :)
Of course my friend! How can I forget you! Thank you so much!
@@jfversluis 😘😘
Hi Gerald, the video is informative and helpful, thanks!. I have a question, is this possible on Mac Catalyst?
Yes! Official docs on that should be published soon :)
@@jfversluis Good to hear! Thanks!
@@en_acorn thanks for you support Wendell! 🥰
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?
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
@@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.
Amazing thank you
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.
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.
@@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...
Hi
Could you make a video about how to make the .Net MAUI app auto start at boot for Android … Thank you!
¡Muchas gracias, funciona de lujo!
¡que gran! ¡Gracias!
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?
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.
Nice
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
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.
I’m afraid not. .NET MAUI apps run on Windows 10 and above
@@jfversluis Is there any workaround please?
So... clickonce is not used anymore.
Is it possible to make something like Debug-Msix, Debug-Unpackaged? i.e. separate ways of building
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
to publish it in the store you have to pass it as win 32 in this case?
Publishing for the store can be found here: ruclips.net/video/FNwv_W3TtSU/видео.html
And if the application is made in Maui Blazor or better known as Maui Hybrid
Hat shouldn’t matter
I used Inno Setup to create the exe installer., but I can't install it in Program Files because I get a purple screen.
Sorry that doesn’t ring any bells
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
How can you create like real world installers for this?
That very much depends on the installer. If you do use MSIX that is an installer in itself
which one do you prefer
Flutter or MAUI
and why؟😊
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.
Thanks alot😅
@@anwaralomari2261 hope it helps!
@@jfversluis Of course I love MAUI and look forward to it being the best
Blazor Maui the same?
Yep!
Is there any way to do this with Xamarin projects?
Xamarin is based on UWP. I’m not too familiar unfortunately… If it’s possible with UWP, it’s possible with Xamarin.
I want to send that .exe file to another person, but that person cannot open it.
how to remove that "Home" text ?
What home text?
@@jfversluis at the navigator left top
this way not working now last update of vs close it
Define “not working”?
@@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
The solution is New setup for windows 😅
@@hesham1871 sorry to hear that!
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
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
@@jfversluis I thought that might be the issue but how do I install a new version?
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
Thanks I will give that a try
It only happens on my Maui app that has Maui class libraries, it been a real pain
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?
Sounds like one or more of the dependencies are not on your system?
@@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?