Open sfoslund opened 3 years ago
Issue moved from dotnet/sdk#18031
From @dotnet-issue-labeler[bot] on Wednesday, June 2, 2021 6:26:23 AM
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.
Issue moved from dotnet/sdk#18031
From @sfoslund on Wednesday, June 2, 2021 10:13:20 PM
The first issue appears to have been fixed by https://github.com/dotnet/sdk/pull/17737, which may not have been released yet. The other issues seem to be related to https://github.com/microsoft/MSIX-PackageSupportFramework so I'm going to transfer this issue there, thanks.
Hey @sfoslund. I understand the frustration of multiple error messages that all make no sense.
The Visual Studio team released a fix on 06/16 with VS version 16.10.2. I was able to use the Desktop Bridge to package a WPF application with AnyCPU.
Can you please try your example again, but with the newest VS version?
Issue moved from dotnet/sdk#18031
From @lennartb- on Wednesday, June 2, 2021 6:26:20 AM
Hello,
I hope this is the correct project for this problem. We're observing several issues when trying to package a .NET 5 application with a Windows Packaging project. I have build a minimal repro solution which can be found here: https://github.com/lennartb-/WpfMsixDemo
We're using Visual Studio 2019 16.10.0.
The first issues are a warning and and error right off the bat:
This is apparently the same as #17711.
The other error is stranger:
There are no references at all to 4.5.1, especially since the .wapproj doesn't have a target framework.
When trying to package the WPF project via right click on MsixProject -> Publish -> Create App Packages, and then "Sideloading", skipping signing, and these (default) settings:
We're getting:
Which seems to be the same as https://github.com/microsoft/MSIX-PackageSupportFramework/issues/151
If I add
<RuntimeIdentifiers>win-x64;win-x86</RuntimeIdentifiers>
to the WPF project and try to re-publish, I'm getting a different error:Okay, this may have something to do with the fact that .NET5 apparently doesn't have the notion of AnyCPU? So we try to publish explicitly as Debug (x86), this time with a self-signed certificate created in the signing step earlier - this works now as expected. I can install the package via the generated
Add-AppDevPackage.ps1
and run the app successfully.In our actual project, the only configuration that we could run was Release (x86), other architectures would install but not start. In The event log, there were these errors:
Is packaging a .NET 5 WPF app this way currently supported, or did we try something not yet completely ready?