Closed jvecc closed 2 months ago
Hi I'm an AI powered bot that finds similar issues based off the issue title.
Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one. Thank you!
Note: You can give me feedback by thumbs upping or thumbs downing this comment.
I also tried several options and builds. The strange thing that unpackaged app in release mode works fine.
Only packaged output causes these issues.
The same behavior i noticed in .Net Maui (Windows) which caused me to use the win10-x64 runtime with -p:UseRidGraph=true
build parameter.
In WinUI this trick didn't help, but something is wrong for a while now.
@jvecc have you tried this ? https://github.com/microsoft/microsoft-ui-xaml/issues/9675#issuecomment-2183960887
@ghostidentity unfortunately, I cannot review your document as it is not publicly accessible. Could please make it accessible to everyone ? Thanks
@ghostidentity unfortunately, I cannot review your document as it is not publicly accessible. Could please make it accessible to everyone ? Thanks
done try again https://drive.google.com/file/d/1XTKQTb6-pbjYkf6yX8FKS00ZpTwgy1ze/view?usp=sharing
@ghostidentity - I tried to update my project and it worked as you mentioned. But working on such a newer version of Windows would not be possible for me. Therefore I tried to go with something a little lower :
<TargetPlatformVersion>10.0.20348.0</TargetPlatformVersion>
<TargetPlatformMinVersion>10.0.19041.0</TargetPlatformMinVersion>
And it also worked ! 😃
Although, based on the MS Documentation:
WinUI 3 works downlevel to Windows 10 October 2018 Update (Version 1809, OS build 17763).
Is there something that should be done, either on the documentation or else?
@jvecc Thanks for your report. Unfortunately, I cannot repro this issue, based on the instructions provided. If you're seeing it as well with Debug configuration, that would rule out any trimming-related problems (such as https://github.com/microsoft/microsoft-ui-xaml/issues/9675).
The event log includes this error: Exception Info: System.DllNotFoundException: Unable to load DLL 'Microsoft.ui.xaml.dll' or one of its dependencies: The specified module could not be found. (0x8007007E) This is not a trimming-related issue, as Microsoft.ui.xaml.dll is a native DLL. Instead it indicates that Install.ps1 was unable to install ".\Dependencies\x64\Microsoft.WindowsAppRuntime.1.5.msix". Do you see any errors when you run Install.ps1? If so, you could attempt to directly install (via double-click) first the WindowsAppRuntime framework package msix, and then the app msix.
If none of this helps root cause, please provide a repro project.
Hi @Scottj1s - apologies for the delay in responding to your last comment.
AFAIK, the issue was related to the version of the Win App SDK I was using in my project.
Basically, the problem still stands when I start from a blank application (Blank App, Packaged with WAP), try to build a side-loading app (in Debug), and try to start it. Per your suggestion, I put a project together that you can find here : https://github.com/jvecc/gh-issue-9740-repro
This is where I get the same issue :
Hi @jvecc, thanks for your patience. I was able to repro with your project.
The issue is indeed related to trimming, and the recommendations are the same as reported here: https://github.com/microsoft/microsoft-ui-xaml/issues/9675:
The reason this also affects Debug configurations, is due to another issue. Conditional expressions in publish profiles (pubxml files) are not supported across project references. This surfaces when a solution has a wapproj referencing the app project. In this situation, the last assignment of PublishTrimmed in the pubxml applies, regardless of the condition:
<PublishTrimmed Condition="'$(Configuration)' != 'Debug'">True</PublishTrimmed>
The workaround for this is to move all such conditional assignments from the pubxml to the app's csproj files. The Windows App SDK templates have been fixed to address this and will be included in Visual Studio 17.12.
Closing with suggested workarounds - please reopen if these aren't effective
Describe the bug
The Visual Studio Template "Blank App, Packaged with Windows Application Packaging Project (WinUI 3 in Desktop)" does not build a proper msix package when using the WapProject to do so. Whether in Debug or Release, when trying to run a package built by this template (as a separated project), it never starts.
When looking at the EventViewer >Windows Logs > Application: We can see a sequence of errors and informations related to the App.
I attached the details for those 5 Event Logs. EventLog.txt
I would assume this could be related to #9675 - but I do not want to make the wrong assumptions as I tried the suggested workaround mentioned here - without success.
Steps to reproduce the bug
Expected behavior
The App1 application embedded within the package starts properly (in our case, the basic default UI)
Screenshots
No response
NuGet package version
WinUI 3 - Windows App SDK 1.5.4: 1.5.240607001
Windows version
Windows Insider Build (xxxxx)
Additional context
Windows Insider Build version: 26120.961 Microsoft.Windows.SDK.BuildTools: 1.5.240607001 Microsoft.WindowsAppSDK: 1.5.240607001 DotNet Sdk used to build: 8.0.301
Visual Studio Version : 17.11.0 Preview 1.1
Target Frameworks / Platforms App1
App1 (Package)