uno: Attempting to open Package.appxmanifest in the latest Uno Platform project in Visual Studio results in an error, as does attempting to change the file's “Generate Action” property.
Current behavior
In any Uno Platform Application project, when trying to open the Package.appxmanifest file, it throws an error:
and an error occurs when trying to change the file’s “Generate Action” property:
(This issue is only reproduced successfully for image files.)
This issue has been reproduced in both physical and sandbox environments.
Expected behavior
When trying to open the Package.appxmanifest file, the file should open normally.
When trying to change the “Generate Action” property of an image file, the property is successfully applied without error.
How to reproduce it (as minimally and precisely as possible)
The problem can be reproduced by simply creating a new Uno Platform Application project, double-clicking on the Package.appxmanifest file or changing the “Generate Action” property of the image file.
I used this command to create the project in the testbed:
dotnet new unoapp -o TestApp -platforms "maccatalyst" -platforms "windows" -platforms "desktop" -ci "github" -presentation "mvvm" -di -log "serilog" -tests "unit" -theme-service -pub "TestApp"
And, I installed an additional Visual Studio Builder 2022 (with the “C++ Desktop Development” workload checked).
Workaround
No response
Works on UWP/WinUI
No
Environment
Uno.WinUI / Uno.WinUI.WebAssembly / Uno.WinUI.Skia
NuGet package version(s)
Uno.WinUI: 5.6.30
Affected platforms
Windows (WinAppSDK)
IDE
Visual Studio 2022
IDE version
17.12.4
Relevant plugins
Uno Platform:5.6.15.19
Anything else we need to know?
1, Visual Studio Builder 2022 is installed on both test platforms (with “Desktop development in C++” checked).
2, I think someone mentioned a similar issue and it was fixed, but it still occurs in the new version: https://developercommunity.visualstudio.com/t/Double-clicking-on-a-PackageAppxmanifes/10658683
3, you can use the code from my repository to assist in fixing the bug, but note that you must switch to the Backup branch: https://github.com/BadBC-Studio/BadMC_Launcher/tree/Backup
4, only Uno Platform projects have this problem and it is certain that it is not a Visual Studio corruption, as I tried deleting all the files and reinstalling the system in order to fix the two bugs, but the problem still occurs, but projects using the Windows App SDK don’t have these two bugs.
5, I participated in this bug feedback because I encountered the same problem as him: https://developercommunity.visualstudio.com/t/Error-HRESULT-e_fail-has-been-returned/10819926 I hope what’s in here will help you guys to solve this bug.
6, The issue uses translation software to translate it into English, which may contain grammatical errors.
I hope Uno Platform can solve these two bugs, they cause me to not be able to debug WinAppSDK (Packaged) and not be able to apply image file generation operations correctly, thanks!🤗
Addendum: It looks like the bug has nothing to do with Visual Studio Generator Tool 2022, because I tried opening a new sandbox and installing only Visual Studio, and the bug is still there.
And a picture that might be useful:
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 1
- Comments: 17 (8 by maintainers)
It looks like Microsoft to fix this issue and ready to release, I will retry to open the Package.appxmanifest file after the new version is released and if there are no errors, I will close this issue, thanks! 😉
For the original issue, indeed, this is not fixed even if this issue says so. This issue that was opened can be tracked instead, as it shows the same behavior.
For the second issue, let’s track in https://github.com/unoplatform/uno/issues/15863 and we do not have a fix for it yet.
@jeromelaban I do not find that discussion/issue again I did to that file at this past time, but I asked about the possibility of changing the default content of this file for uno projects or add the minimal required contents by the wizard which might help with some warnings on building to win target also I seen that past time, telling some properties are not filled as it liked them to be.
Is there some answer/possibility to update this files? I researched in the uno.templates and uno.sdk repos but did not find the files we are getting on e.g. recommended or this file mentioned here.
Edit: Additional Information to this solution idea: compared Uno Package.appxmanifest and the one coming from the WinUI3 in VS 2022
WinUIManifestfile.zip
UnoManifestfile.zip the WinUI one can be opened with the App-Manifest-Designer, the Uno Platform one not, there the message from below is happening.
The reason I was thinking of it might be same issue, is: First time I used uno I was also not able to open this file. It was opt 1 opening that designer unusable in my opinion for uno projects e.g. Opt 2 telling it could not open this file, but that has been in November last year so i dont remember the error message.
What I did to resolve it for me:
! Not the one with “with coding”(in german its named “wmit Codierung”) that has not been working!
Set this one to be standard and never had any issues again with this => I could double click and open it as much as I like, working as it should do.
Maybe someone of you who is having this issue from above would like to check this steps?
Hi, here’s the new screenshot:
Thank you for your help.😀
Absolutely, please give me some time to download the language pack.