uno.extensions
uno.extensions copied to clipboard
[Windows - Packaged][MauiEmbedding] Project doesn't know how to run the profile with name 'NameOfTheApp (WinAppSDK Packaged)' and command 'MsixPackage'
Current behavior
Error popup when running Windows as Packaged for a blank Maui Embedding sample app
Expected behavior
Being able to run Windows as Packaged for a blank Maui Embedding sample app
How to reproduce it (as minimally and precisely as possible)
- Create a blank maui embedding sample app with latest template 5.3.0-dev.19.
dotnet new unoapp -preset blank -maui -o MauiEmbeddingApp
- Try to run Windows as Packaged for the Maui Embedding sample app
- Notice the Error popup
- Try to update the Uno packages to latest
- Still noticing the Error popup
Sample app used for the tests: MauiEmbeddingBlankApp.zip
Environment
"Uno.Sdk": "5.3.0-dev.168"
<UnoExtensionsVersion>4.2.0-dev.13</UnoExtensionsVersion>
<UnoToolkitVersion>6.1.0-dev.7</UnoToolkitVersion>
<UnoThemesVersion>5.1.0-dev.8</UnoThemesVersion>
<UnoCSharpMarkupVersion>5.3.0-dev.11</UnoCSharpMarkupVersion>
Microsoft.WindowsAppSDK: 1.5.240311000
Microsoft.Windows.SDK.BuildTools: 10.0.22621.3233
MauiVersion: 8.0.6
Affected platform(s):
- [ ] iOS
- [ ] macOS (AppKit)
- [ ] Mac Catalyst
- [ ] Android
- [ ] WebAssembly
- [X] Windows (Packaged)
- [ ] Skia (WPF)
- [ ] Skia (GTK on Linux/macOS/Windows)
- [ ] Skia (Linux Framebuffer)
- [ ] Build tasks
Visual Studio:
- [ ] 2019 (version: )
- [X] 2022 (version: 17.9.6)
- [ ] Visual Studio Code (version: )
- [ ] Rider Windows (version: )
- [ ] Rider macOS (version: )
Additional info
[!IMPORTANT] No issues for default blank or recommended apps with latest template 5.3.0-dev.19 when testing Windows Packaged.
This is a single project issue, it may be a caused by the main project not being set as startup when VS starts. A newer update, most likely from https://github.com/unoplatform/uno/pull/16203 will fix that.
A workaround is to set the windows tfm first in the list.
A workaround is to set windows tfm first in the list.
@jeromelaban I tried to set windows tfm first in the list in the csproj, but still getting the error popup even after properly closing+reopening VS.
Am I missing something?
@agneszitte You have to restart VS for the change to apply.
@agneszitte You have to restart VS for the change to apply.
It was already the case @jeromelaban
I just restarted one last time right now to make sure and still getting the error popup
Should be fixed by https://github.com/unoplatform/uno/pull/16203.
@Darsh0307 can you help test this issue with latest stable / dev packages now that https://github.com/unoplatform/uno/pull/16203 is merged please
Hey @agneszitte I will check with latest 5.2 templates and let you know :)
Edit :-
Both 5.2 and 5.3 have the same error. The erorr are mentioned at the bottom.
Uno.Templates.5.2.15.nupkg "Uno.Sdk": "5.2.42"
Uno.Templates.5.3.0-dev.31.nupkg "Uno.Sdk": "5.3.0-dev.315"
This was the error which i was getting
I also made sure that configuration manager is updated properly
When building i also saw an error in deployment.
The comment given on the same issue.
It is still the same error which i am getting
Uno.Templates.5.2.28 Uno VISX:- 5.2.33 "Uno.Sdk": "5.2.83"
@Darsh0307 if you can do a test with latest version please
The application was created using CLI dotnet new unoapp -preset blank -maui -o MauiEmbeddingApp
Uno.Sdk: 5.3.0-dev.1901
Uno.Templates:- 5.3.0-dev.1901
VS version:- 17.10.1
Build
DEP0700: Registration of the app failed. [0x80080204] error 0xC00CE015: App manifest validation error: The app manifest must be valid as per schema: Line 31, Column 85, Reason: The attribute '{http://schemas.microsoft.com/appx/manifest/foundation/windows10}MaxVersionTested' on the element '{http://schemas.microsoft.com/appx/manifest/foundation/windows10}TargetDeviceFamily' is not defined in the DTD/Schema.
========== Build: 2 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
========== Build completed at 4:38 PM and took 18.311 seconds ==========
========== Deploy: 1 succeeded, 0 failed, 0 skipped ==========
========== Deploy completed at 4:38 PM and took 18.311 seconds =========
Deployment
Registering the application to run from layout...
DEP0700: Registration of the app failed. [0x80080204] error 0xC00CE015: App manifest validation error: The app manifest must be valid as per schema: Line 31, Column 85, Reason: The attribute '{http://schemas.microsoft.com/appx/manifest/foundation/windows10}MaxVersionTested' on the element '{http://schemas.microsoft.com/appx/manifest/foundation/windows10}TargetDeviceFamily' is not defined in the DTD/Schema.
DeploymentSucceeded = False
DeploymentError = Err_Deploy_Register
DeploymentUserError = False
DeploymentHRESULT = -2146958844
HasSharedCode = False
Target.Id = 256
ProjectGuid = {4779d8f3-b1d2-4140-909e-9371e82b0e5a
This was the error which i was getting
I also made sure that configuration manager is updated properly.
This needs to be tested again after https://github.com/unoplatform/uno.templates/pull/743.
This needs to be tested again after unoplatform/uno.templates#743.
@Darsh0307 https://github.com/unoplatform/uno.templates/pull/743 is merged, can you retest it again please
Templates version:- 5.3.2 The app was created using the above cli.
But when trying to run windows packaged then i was getting this error.
\MauiEmbeddingApp.MauiControls.dll
1>MauiEmbeddingApp.MauiControls -> F:\source\1916\MauiEmbeddingApp\MauiEmbeddingApp.MauiControls\bin\Debug\net8.0-android\MauiEmbeddingApp.MauiControls.dll
2>------ Build started: Project: MauiEmbeddingApp, Configuration: Debug Any CPU ------
2>Skipping analyzers to speed up the build. You can execute 'Build' or 'Rebuild' command to run analyzers.
2>MauiEmbeddingApp -> F:\source\1916\MauiEmbeddingApp\MauiEmbeddingApp\bin\Debug\net8.0-windows10.0.19041\MauiEmbeddingApp.dll
2>C:\Users\DarshPatel\.nuget\packages\microsoft.windowsappsdk\1.5.240607001\buildTransitive\Microsoft.Build.Msix.Packaging.targets(921,5): error APPX0002: Task 'WinAppSdkGenerateAppxManifest' failed. Object reference not set to an instance of an object.
2>C:\Users\DarshPatel\.nuget\packages\microsoft.windowsappsdk\1.5.240607001\buildTransitive\Microsoft.Build.Msix.Packaging.targets(921,5): error APPX0002:
2>C:\Users\DarshPatel\.nuget\packages\microsoft.windowsappsdk\1.5.240607001\buildTransitive\Microsoft.Build.Msix.Packaging.targets(921,5): error MSB4018: The "WinAppSdkGenerateAppxManifest" task failed unexpectedly.
2>C:\Users\DarshPatel\.nuget\packages\microsoft.windowsappsdk\1.5.240607001\buildTransitive\Microsoft.Build.Msix.Packaging.targets(921,5): error MSB4018: System.NullReferenceException: Object reference not set to an instance of an object.
2>C:\Users\DarshPatel\.nuget\packages\microsoft.windowsappsdk\1.5.240607001\buildTransitive\Microsoft.Build.Msix.Packaging.targets(921,5): error MSB4018: at Microsoft.Build.Msix.AppxManifest.WinAppSdkGenerateAppxManifest.ProcessDocument()
2>C:\Users\DarshPatel\.nuget\packages\microsoft.windowsappsdk\1.5.240607001\buildTransitive\Microsoft.Build.Msix.Packaging.targets(921,5): error MSB4018: at Microsoft.Build.Msix.AppxManifest.WinAppSdkGenerateAppxManifest.ExecuteImplementation()
2>C:\Users\DarshPatel\.nuget\packages\microsoft.windowsappsdk\1.5.240607001\buildTransitive\Microsoft.Build.Msix.Packaging.targets(921,5): error MSB4018: at Microsoft.Build.Msix.AppxPackagingTaskHelper.Execute(String file)
2>C:\Users\DarshPatel\.nuget\packages\microsoft.windowsappsdk\1.5.240607001\buildTransitive\Microsoft.Build.Msix.Packaging.targets(921,5): error MSB4018: at Microsoft.Build.Msix.AppxManifest.WinAppSdkGenerateAppxManifest.Execute()
2>C:\Users\DarshPatel\.nuget\packages\microsoft.windowsappsdk\1.5.240607001\buildTransitive\Microsoft.Build.Msix.Packaging.targets(921,5): error MSB4018: at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
2>C:\Users\DarshPatel\.nuget\packages\microsoft.windowsappsdk\1.5.240607001\buildTransitive\Microsoft.Build.Msix.Packaging.targets(921,5): error MSB4018: at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext()
2>Done building project "MauiEmbeddingApp.csproj" -- FAILED.
========== Build: 1 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
========== Build completed at 6:15 PM and took 15.728 seconds ==========
========== Deploy: 0 succeeded, 0 failed, 0 skipped ==========
========== Deploy completed at 6:15 PM and took 15.728 seconds ==========
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
This is fixed in latest vsix 5.3.8. @Darsh0307 could you test again?
Hello @jeromelaban
Well the issue is still available
Uno vsix:- 5.3.8.8 Uno templates:- 5.3.4
Copying files: Total 103 mb to layout...
Registering the application to run from layout...
DEP0700: Registration of the app failed. [0x80080204] error 0xC00CE015: App manifest validation error: The app manifest must be valid as per schema: Line 31, Column 85, Reason: The attribute '{http://schemas.microsoft.com/appx/manifest/foundation/windows10}MaxVersionTested' on the element '{http://schemas.microsoft.com/appx/manifest/foundation/windows10}TargetDeviceFamily' is not defined in the DTD/Schema.
========== Build: 1 succeeded, 0 failed, 1 up-to-date, 0 skipped ==========
========== Build completed at 2:59 PM and took 01.611 seconds ==========
========== Deploy: 1 succeeded, 0 failed, 0 skipped ==========
========== Deploy completed at 2:59 PM and took 01.611 seconds ==========
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++ Please consider donating to VSColorOutput +++
+++ https://mike-ward.net/donate/ +++
+++ (this message can be turned off in the settings panel) +++
+++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++++++
@Darsh0307 I'm not able to reproduce. Can you run dotnet new uninstall
(without parameters) and paste the result here?
Its working fine
Tested using uno templates:- 5.3.5