✅ EXE from MAUI
I made a program with MAUI. It runs with VS fine, but now I want to install this program on another computer. I think I need an EXE or some sort of executable. How to I do this? Did some research, could not find a working solution.
12 Replies
You need to publish your app
@Angius tried to, got a folder with 282 items... most are .dll files
$singlefile
dotnet publish -c Release -r <runtime identifier> -p:PublishSingleFile=true
Use of -r
|--runtime
implies --self-contained true
. Add --self-contained false
to publish as runtime-dependent.
-r RID
and -p:PublishSingleFile=true
can be moved to .csproj as the following properties:but to target multiple RIDs, you have to use dotnet publish
with the -r
option for each RID.
You can also add -p:IncludeNativeLibrariesForSelfExtract=true
to include native libraries (like Common Language Runtime dlls) in the output executable.
You might want to instead publish your application compiled Ahead Of Time to native code, see $nativeaot.
https://docs.microsoft.com/en-us/dotnet/core/deploying/single-file
https://docs.microsoft.com/en-us/dotnet/core/rid-catalog
https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-publishCreate a single file for application deployment - .NET
Learn what single file application is and why you should consider using this application deployment model.
.NET Runtime Identifier (RID) catalog
Learn about the Runtime Identifier (RID) and how RIDs are used in .NET.
This will be of use, then
That is something I haven't tried yet. I am going to try it now, thanks for the quick response!
@Angius Seems to be not possible on MAUI projects for some reason
@Angius
MAUI projects cannot be published into a folder
They are Microsoft-Store only
the default is packaged (to msix)
you can build unpackaged
GitHub
Add Support for WinUI Unpackaged Apps · Issue #3166 · dotnet/maui
Summary Since the release of the Windows App SDK Preview 3, we can now use unpackaged apps: https://docs.microsoft.com/en-us/windows/apps/winui/winui3/create-your-first-winui3-app?pivots=winui3-unp...
@Angius @Cyberrex @OneWholesomeDev Thank you all for the help! I think the last github link will be the solution!
np
/close
when youre done :)Closed!