microsoft / WindowsAppSDK

The Windows App SDK empowers all Windows desktop apps with modern Windows UI, APIs, and platform features, including back-compat support, shipped via NuGet.
https://docs.microsoft.com/windows/apps/windows-app-sdk/
MIT License
3.75k stars 311 forks source link

Deployed MAUI app as MSIX on server 2019 not unpackage #3020

Open mattleibow opened 1 year ago

mattleibow commented 1 year ago

Issue moved from dotnet/maui#10363


From @danies8 on Wednesday, September 28, 2022 8:18:34 AM

Description

Deployed MAUI app as MSIX on server 2019 not unpackage

Steps to Reproduce

1.Create MAUI app. 2.Deplayed as msix. 3.Not worked on server 2019.

Link to public reproduction project repository

..

Version with bug

Unknown/Other (please specify)

Last version that worked well

Unknown/Other

Affected platforms

Windows

Affected platform versions

..

Did you find any workaround?

..

Relevant log output

..
mattleibow commented 1 year ago

Issue moved from dotnet/maui#10363


From @msftbot[bot] on Wednesday, September 28, 2022 8:25:28 AM

Hi @danies8. We have added the "s/needs-info" label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.

mattleibow commented 1 year ago

Issue moved from dotnet/maui#10363


From @msftbot[bot] on Wednesday, September 28, 2022 8:25:31 AM

Hi @danies8. We have added the "s/needs-repro" label to this issue, which indicates that we require steps and sample code to reproduce the issue before we can take further action. Please try to create a minimal sample project/solution or code samples which reproduce the issue, ideally as a GitHub repo that we can clone. See more details about creating repros here: https://github.com/dotnet/maui/blob/main/.github/repro.md

This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.

mattleibow commented 1 year ago

Issue moved from dotnet/maui#10363


From @danies8 on Wednesday, September 28, 2022 8:38:34 AM

This the command I used: 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

mattleibow commented 1 year ago

Issue moved from dotnet/maui#10363


From @danies8 on Wednesday, September 28, 2022 8:57:09 AM

Moreover, as a developer must carefully consider everything that normally comes with the MSIX package and ensure they're available in the target environment. Publishing self-contained just means the .NET runtime, it doesn't mean it will automatically check to see if fonts are installed or other things. When unpackaged, we are responsible for making sure all resources, like custom fonts, must be in the operating system environment when that unpackaged app is run. If you are not sure what those things are, you can change ".msix" to ".zip" and extract it to see the contents. Can you also fix these problems?

mattleibow commented 1 year ago

Issue moved from dotnet/maui#10363


From @danies8 on Wednesday, September 28, 2022 1:23:28 PM

1.Put all files in C volume.

2.You will need to have the Desktop Experience installed as well as any dependencies for your app (.Net Framework, Windows App SDK, etc.) that aren't included by default in Server 2019. See https://docs.microsoft.com/en-us/windows/msix/msix-server-2019

  1. NET runtime - See link https://dotnet.microsoft.com/en-us/download/dotnet/thank-you/runtime-desktop-6.0.7-windows-x64-installer
  2. NET Framework - See link https://dotnet.microsoft.com/en-us/download/dotnet-framework/thank-you/net48-web-installer 5.Install latest see link Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle(https://github.com/microsoft/winget-cli/releases/download/v1.3.1872/Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle) via powershell Add-AppxProvisionedPackage -Online -PackagePath C:\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle -LicensePath C:\a941c144deac426082dc9f208f729138_License1.xml -Verbose (XML can be found here in this link: https://github.com/microsoft/winget-cli/releases/download/v1.3.1872/a941c144deac426082dc9f208f729138_License1.xml 6.VCLibs - the files located in this link https://docs.microsoft.com/en-us/troubleshoot/developer/visualstudio/cpp/libraries/c-runtime-packages-desktop-bridge#how-to-install-and-update-desktop-framework-packages. Install the x86 and x64 appx files with Add-AppxPackag(https://docs.microsoft.com/en-us/powershell/module/appx/add-appxpackage?view=windowsserver2019-ps#description=) The commands are: Add-AppxPackage -Path "C:\Microsoft.VCLibs.x64.14.00.Desktop.appx" Add-AppxPackage -Path "C:\Microsoft.VCLibs.x86.14.00.Desktop.appx" The results blank window.
mattleibow commented 1 year ago

Issue moved from dotnet/maui#10363


From @PureWeen on Wednesday, September 28, 2022 7:22:54 PM

@danies8 does this look related?

https://github.com/microsoft/WindowsAppSDK/issues/2829

mattleibow commented 1 year ago

Issue moved from dotnet/maui#10363


From @msftbot[bot] on Wednesday, September 28, 2022 7:23:15 PM

Hi @danies8. We have added the "s/needs-info" label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.

mattleibow commented 1 year ago

Issue moved from dotnet/maui#10363


From @danies8 on Wednesday, September 28, 2022 7:35:32 PM

@PureWeen I read #2829 I list what I installed in server 2019. Do I need to install something more? If yes please specify link where I can install this ?

mattleibow commented 1 year ago

Issue moved from dotnet/maui#10363


From @danies8 on Wednesday, September 28, 2022 8:30:59 PM

@PureWeen Do I need to install https://learn.microsoft.com/en-us/windows/apps/windows-app-sdk/downloads Version 1.1 3 files c#& c++ extension and x64 installer?

mattleibow commented 1 year ago

Issue moved from dotnet/maui#10363


From @mattleibow on Thursday, September 29, 2022 6:29:59 PM

The story with MSIX is that all the requirements and dependencies should be installed with the app.

If you create a plain WinUI app, does it also have issues?

Also, the publish with /p:PublishSingleFile=true might be an issue as this is not relevant.

And, /p:GenerateAppxPackageOnBuild=true should not be needed when publishing.

Is there a difference when you use dotnet publish -f net6.0-windows10.0.19041.0 -c Release /p:AppxPackageSigningEnabled=true /p:PackageCertificateThumbprint="c01ba45666762f3615cf6813aeb4dc4b1919541d"

mattleibow commented 1 year ago

Issue moved from dotnet/maui#10363


From @msftbot[bot] on Thursday, September 29, 2022 6:32:57 PM

Hi @danies8. We have added the "s/needs-info" label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.

mattleibow commented 1 year ago

Issue moved from dotnet/maui#10363


From @danies8 on Sunday, October 2, 2022 6:59:52 AM

I used tis code: dotnet publish -f net6.0-windows10.0.19041.0 -c Release /p:AppxPackageSigningEnabled=true /p:PackageCertificateThumbprint="c01ba45666762f3615cf6813aeb4dc4b1919541d" and it work on window 10 but not work on server 2019, i get blank window

mattleibow commented 1 year ago

Issue moved from dotnet/maui#10363


From @danies8 on Tuesday, October 4, 2022 7:53:43 AM

@mattleibow can you please say what to do?

danies8 commented 1 year ago

@mattleibow can you please answer, how this issue can be fixed ?

danies8 commented 1 year ago

@mattleibow and @gabbybilka
According to https://learn.microsoft.com/en-us/windows/apps/windows-app-sdk/downloads I tried to install this without success. image See: Capture de12472f48.png) 1.When clicking on WindowsAppRuntimeInstall is open blank window. 2.Both WindowsAppSDK.Cpp.Extension.Dev17.Standalone.vsix + WindowsAppSDK.Cs.Extension.Dev17.Standalone.vsix are not clickable ?

mattleibow commented 1 year ago

You may have to install a separate app to install them...

App Installer https://apps.microsoft.com/store/detail/app-installer/9NBLGGH4NNS1?hl=en-us&gl=us

danies8 commented 1 year ago

@mattleibow sorry I tried to download this app installer without success -(:

DrusTheAxe commented 1 year ago

You can use powershell to install MSIX packages

powershell -c Add-AppxPackage AutomationClient.MAUI_1.0.0.0_x64.msix

If something goes wrong it displays error info and pointers to find more details about the failure