[GH-ISSUE #120] Couldn't find the native Qml.Net library. #69

Closed
opened 2026-05-05 11:03:24 -06:00 by gitea-mirror · 4 comments
Owner

Originally created by @MaxMommersteeg on GitHub (Apr 16, 2019).
Original GitHub issue: https://github.com/qmlnet/qmlnet/issues/120

I updated my apps using Qml.Net to the latest package versions (0.9.0):

Both wouldn't work on version 0.8.0 and 0.9.0 since I did not specify following line before using Qml.Net:

RuntimeManager.DiscoverOrDownloadSuitableQtRuntime();

Exception:

System.TypeInitializationException: 'The type initializer for 'Qml.Net.Internal.Interop' threw an exception.'

Inner Exception:

Exception: Couldn't find the native Qml.Net library.

Would be a nice add to the wiki pages imho.

Originally created by @MaxMommersteeg on GitHub (Apr 16, 2019). Original GitHub issue: https://github.com/qmlnet/qmlnet/issues/120 I updated my apps using Qml.Net to the latest package versions (0.9.0): - https://github.com/MaxMommersteeg/Qml.Net.TodoApp - https://github.com/MaxMommersteeg/Qml.Net.Chat Both wouldn't work on version 0.8.0 and 0.9.0 since I did not specify following line before using Qml.Net: ```csharp RuntimeManager.DiscoverOrDownloadSuitableQtRuntime(); ``` Exception: > System.TypeInitializationException: 'The type initializer for 'Qml.Net.Internal.Interop' threw an exception.' Inner Exception: > Exception: Couldn't find the native Qml.Net library. Would be a nice add to the wiki pages imho.
Author
Owner

@pauldotknopf commented on GitHub (Apr 16, 2019):

Yeah, that isn't a good experience.

Maybe we should write to stdout a warning that a suitable runtime couldn't be found.

<!-- gh-comment-id:483768918 --> @pauldotknopf commented on GitHub (Apr 16, 2019): Yeah, that isn't a good experience. Maybe we should write to stdout a warning that a suitable runtime couldn't be found.
Author
Owner

@MaxMommersteeg commented on GitHub (Apr 16, 2019):

That would defenitely help the developer.

Is it required to call that method or are there other ways that it could work without?

<!-- gh-comment-id:483809803 --> @MaxMommersteeg commented on GitHub (Apr 16, 2019): That would defenitely help the developer. Is it required to call that method or are there other ways that it could work without?
Author
Owner

@pauldotknopf commented on GitHub (Apr 16, 2019):

It has to be called. Automatically downloading tars for the web inside of a static initializer is a bad idea IMO.

Also, some people using Qml.Net may want to use the runtime properly located in /usr/lib.

<!-- gh-comment-id:483814379 --> @pauldotknopf commented on GitHub (Apr 16, 2019): It has to be called. Automatically downloading tars for the web inside of a static initializer is a bad idea IMO. Also, some people using Qml.Net may want to use the runtime properly located in /usr/lib.
Author
Owner

@SwiTool commented on GitHub (Sep 16, 2019):

Yea indeed, calling RuntimeManager.DiscoverOrDownloadSuitableQtRuntime() solved my issue.
I followed this but no clue of that method here.

Thanks

<!-- gh-comment-id:531946721 --> @SwiTool commented on GitHub (Sep 16, 2019): Yea indeed, calling `RuntimeManager.DiscoverOrDownloadSuitableQtRuntime()` solved my issue. I followed [this](https://qmlnet.github.io/setup/managed-hosting/) but no clue of that method here. Thanks
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/qmlnet#69
No description provided.