dotnet / maui

.NET MAUI is the .NET Multi-platform App UI, a framework for building native device applications spanning mobile, tablet, and desktop.
https://dot.net/maui
MIT License
22.05k stars 1.73k forks source link

Run Maui MSI on window server 2019 not working. #8830

Closed danies8 closed 2 years ago

danies8 commented 2 years ago

Description

I deployed Maui app as shown in https://docs.microsoft.com/en-us/dotnet/maui/windows/deployment/overview Run this on new server 2019 with Desktop Experience installed in it. and is not working.

Steps to Reproduce

  1. Publish Maui app.
  2. Run on server 2019
  3. Nothing happened.

Version with bug

6.0.408 (current)

Last version that worked well

Unknown/Other

Affected platforms

Windows

Affected platform versions

....

Did you find any workaround?

No

Relevant log output

No
rmarinho commented 2 years ago

Hello friend, what's the error you see? Can you post some logs from EventViewer for example, or some print screens?

Thanks

danies8 commented 2 years ago
  1. The msix was not clickable.
  2. After installing msixmgrSetup-1.1.0.0-x64 it was clickable.
  3. I run the msix and got this popup message: "You'll need new app to open this ms-appinstaller" MESSAGE I didn't see any logs in event viewer(Windows logs/applications)
  4. Do I need to install any frameworks and more to run it , if yes give links please?
  5. The msix app is running in window 10.
danies8 commented 2 years ago

I installed https://dotnet.microsoft.com/en-us/download/dotnet/thank-you/runtime-desktop-6.0.7-windows-x64-installer and is not helped , the same message. This my control panel: image

danies8 commented 2 years ago

I installed also https://dotnet.microsoft.com/en-us/download/dotnet-framework/thank-you/net48-web-installer and is not helped , the same message.

danies8 commented 2 years ago

I take those installations from :https://docs.microsoft.com/en-us/windows/msix/msix-server-2019

MagicAndre1981 commented 2 years ago

install latest Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle via powershell:

Add-AppxProvisionedPackage -Online -PackagePath .\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle -LicensePath .\08d8788d59cf47ed9bf42c31e31f8efa_License1.xml -Verbose

(XML can be found here: https://github.com/microsoft/winget-cli/releases/download/v1.3.1872/a941c144deac426082dc9f208f729138_License1.xml)

danies8 commented 2 years ago

I got this after running the msix image

MagicAndre1981 commented 2 years ago

ok, you miss the VC++ Desktop framework dependency .

Install the x86 and x64 appx files with Add-AppxPackage

danies8 commented 2 years ago

I tried to install the x86 version without success: image

MagicAndre1981 commented 2 years ago

and what happens with x64 version? Same error?

danies8 commented 2 years ago

Same: image

danies8 commented 2 years ago

I fixed the command to Add-AppxPackage -Path ".\Microsoft.VCLibs.x64.14.00.Desktop.appx" and it work same for x86. But run maui msix i still got error: image

danies8 commented 2 years ago

Any solutions ? I tried the same process on other server 2019 same results!!! Do I need specials installation for MAUI msix on server 2019 or its like on window 10 ?

MagicAndre1981 commented 2 years ago

update VS to 17.3 Preview 4 and try to create an unpacked app that has everything included to run.

danies8 commented 2 years ago
  1. I updated my VS to 17.3 Preview 4.
  2. Does these the two commands i need to create ? I added the diffrerence in bold. Without bold is what i do in msix for window 10. msbuild /t:restore AutomationClient.MAUI.csproj msbuild /t:Publish AutomationClient.MAUI.csproj /p:TargetFramework=net6.0-windows10.0.19041.0 /p:configuration=release /p:GenerateAppxPackageOnBuild=true /p:AppxPackageSigningEnabled=true /p:PackageCertificateThumbprint="c01ba45666762f3615cf6813aeb4dc4b1919541d" /p:PublishSingleFile=true /p:WindowsPackageType=None /p:WindowsAppSDKSelfContained=true /p:SelfContained=true
MagicAndre1981 commented 2 years ago

try this second command and look if this works. Server is not officially supported by MAUI, so try it and look what happens.

danies8 commented 2 years ago

I succeeded to create EXE && it run both on window 10 && server 2019 as exe. The fix is /p:GenerateAppxPackageOnBuild=false Thanks

danies8 commented 2 years ago

Currently NET runtime +NET Framework 3.5 + VCLibs are installed , are they needed when I have exe in server 2019?

MagicAndre1981 commented 2 years ago

I succeeded to create EXE && it run both on window 10 && server 2019 as exe. The fix is /p:GenerateAppxPackageOnBuild=false Thanks

great to hear this 🥳

danies8 commented 2 years ago

Currently NET runtime +NET Framework 3.5 + VCLibs are installed in server 2019, are they needed when I have exe in server 2019?