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

Unable to load DLL 'Microsoft.ui.xaml.dll' or one of its dependencies #502

Open
2 tasks done
GuildOfCalamity opened this issue Apr 9, 2023 · 6 comments
Open
2 tasks done
Labels
kind/bug Something isn't working triage/untriaged Indicates an issue requires triaging or verification.

Comments

@GuildOfCalamity
Copy link

Upon startup App.cs generates the following exception:
System.DllNotFoundException: 'Unable to load DLL 'Microsoft.ui.xaml.dll' or one of its dependencies: The specified module could not be found. (0x8007007E)'

How to reproduce it (as minimally and precisely as possible)

Cloned the ToDo sample and attempted to run on Windows 10. The build process has no issues.

Environment

Affected platform(s):

  • Windows 10

Visual Studio:

  • 2022 (version: 17.6.0 Preview 2.0)
@GuildOfCalamity GuildOfCalamity added kind/bug Something isn't working triage/untriaged Indicates an issue requires triaging or verification. labels Apr 9, 2023
@davidbuckleyni
Copy link

Have the same issue ten years on simple code clones dont work for uno this is a poor advertisement for a platform that meant to be mature.

@jeromelaban
Copy link
Member

@davidbuckleyni Thanks for the feedback. This is an issue that is unfortunately commonly found in WinAppSDK, and we're working with Microsoft to get this resolved in a more consistent manner in an updated version of the WinAppSDK package.

In the meantime, see this thread: microsoft/microsoft-ui-xaml#6377 (comment)

@GuildOfCalamity
Copy link
Author

GuildOfCalamity commented May 13, 2023

@jeromelaban I have already tried the package/unpackaged trick, but after changing the project to unpackaged it just throws another error. I have no problems changing my own WinUI3 projects to unpacked and they work great, but with Uno it does not.
Can you put a link to a Uno project that does work on a Win10 machine using VS2022?

@nickrandolph
Copy link
Contributor

If you're trying to run as unpackaged. Try setting WindowsAppSDKSelfContained to true - this ensures the win app SDK libraries are deployed with the app for debugging. Otherwise you need to have the matching runtime installed.

@davidbuckleyni
Copy link

@nickrandolph that makes no since then its still self containted more or less same as packaged !

@nickrandolph
Copy link
Contributor

Not really, since the difference is that you don't install an unpackaged app. The other alternative is to install the runtime, much like you would for a .net framework app.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working triage/untriaged Indicates an issue requires triaging or verification.
Projects
None yet
Development

No branches or pull requests

4 participants