mirror of
https://github.com/qmlnet/qmlnet.git
synced 2026-05-15 14:15:54 -06:00
[GH-ISSUE #173] Unable to find the native Qml.Net library #108
Labels
No labels
bug
enhancement
help wanted
help wanted
pull-request
question
todo
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/qmlnet#108
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @bountifulellie on GitHub (Nov 18, 2019).
Original GitHub issue: https://github.com/qmlnet/qmlnet/issues/173
I got this error when trying to write up a basic program:
Unable to find the native Qml.Net library. Try calling "RuntimeManager.DiscoverOrDownloadSuitableQtRuntime();" in Program.Main()Here's the code I have:
As you can see, RuntimeManager.DiscoverOrDownloadSuitableQtRuntime() is called before the style is set. However it's still unable to find the native Qml.Net lib. What's going on?
@pauldotknopf commented on GitHub (Nov 18, 2019):
After
DiscoverOrDownloadSuitableQtRuntime, can youConsole.WriteLineevery environment variable?@bountifulellie commented on GitHub (Nov 19, 2019):
Here (variables & values separated by colon):
@pauldotknopf commented on GitHub (Nov 19, 2019):
It looks like it downloaded and loaded the Qt correctly at
C:\Users\lempamo\.qmlnet-qt-runtimes\qt-5.12.2-ad0689c-win-x64.Is this a 64bit machine?
My guess, there is some dependency/lib that Qt depends on that isn't on your machine.
I'd like to see if the .dlls are loaded into your app after running
DiscoverOrDownloadSuitableQtRuntime. Add aConsole.ReadLine()and use Process Hacker to list all the modules loaded in your app.@bountifulellie commented on GitHub (Nov 19, 2019):
Yes, it's 64-bit. Here are the modules that are attached to my app.

@pauldotknopf commented on GitHub (Nov 19, 2019):
What does your csproj look like?
@bountifulellie commented on GitHub (Nov 19, 2019):
@pauldotknopf commented on GitHub (Nov 19, 2019):
Ah. You downloaded the Qt runtime, but you need the native Windows library which glues the runtime to .NET. Add a reference to
Qml.Net.WindowsBinaries.@bountifulellie commented on GitHub (Nov 19, 2019):
Done, now it's fixed! Thanks