Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
danies8 opened this issue Sep 28, 2022 · 14 comments
Closed

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

danies8 opened this issue Sep 28, 2022 · 14 comments
Labels
external partner/winui WinUI / Project Reunion platform/windows 🪟 s/needs-attention Issue has more information and needs another look t/bug Something isn't working

Comments

@danies8
Copy link

danies8 commented Sep 28, 2022

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

..

VS bug #1814061

@danies8 danies8 added the t/bug Something isn't working label Sep 28, 2022
@jfversluis jfversluis added s/needs-info Issue needs more info from the author s/needs-repro Attach a solution or code which reproduces the issue labels Sep 28, 2022
@ghost
Copy link

ghost commented Sep 28, 2022

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.

@ghost
Copy link

ghost commented Sep 28, 2022

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.

@danies8
Copy link
Author

danies8 commented Sep 28, 2022

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

@ghost ghost added s/needs-attention Issue has more information and needs another look and removed s/needs-info Issue needs more info from the author s/needs-repro Attach a solution or code which reproduces the issue labels Sep 28, 2022
@danies8
Copy link
Author

danies8 commented Sep 28, 2022

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?

@danies8
Copy link
Author

danies8 commented Sep 28, 2022

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
3. NET runtime - See link https://dotnet.microsoft.com/en-us/download/dotnet/thank-you/runtime-desktop-6.0.7-windows-x64-installer
4. 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.

@PureWeen
Copy link
Member

@danies8 does this look related?

microsoft/WindowsAppSDK#2829

@PureWeen PureWeen added platform/windows 🪟 s/needs-info Issue needs more info from the author and removed s/needs-attention Issue has more information and needs another look labels Sep 28, 2022
@ghost
Copy link

ghost commented Sep 28, 2022

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.

@danies8
Copy link
Author

danies8 commented Sep 28, 2022

@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 ?

@ghost ghost added s/needs-attention Issue has more information and needs another look and removed s/needs-info Issue needs more info from the author labels Sep 28, 2022
@danies8
Copy link
Author

danies8 commented Sep 28, 2022

@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
Copy link
Member

mattleibow commented Sep 29, 2022

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 mattleibow added partner/winui WinUI / Project Reunion s/needs-info Issue needs more info from the author and removed s/needs-attention Issue has more information and needs another look labels Sep 29, 2022
@ghost
Copy link

ghost commented Sep 29, 2022

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.

@danies8
Copy link
Author

danies8 commented Oct 2, 2022

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

@ghost ghost added s/needs-attention Issue has more information and needs another look and removed s/needs-info Issue needs more info from the author labels Oct 2, 2022
@danies8
Copy link
Author

danies8 commented Oct 4, 2022

@mattleibow can you please say what to do?

@mattleibow
Copy link
Member

This issue was moved to microsoft/WindowsAppSDK#3020

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
external partner/winui WinUI / Project Reunion platform/windows 🪟 s/needs-attention Issue has more information and needs another look t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants