mirror of
https://github.com/qmlnet/qmlnet.git
synced 2026-05-16 14:15:57 -06:00
[GH-ISSUE #76] Can't get it to work with .NET Framework/Mono #49
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#49
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 @akbcode on GitHub (Oct 10, 2018).
Original GitHub issue: https://github.com/qmlnet/qmlnet/issues/76
I created a small program to test
But it throws an exception on the line
var app = new QGuiApplication(args)I'm using version 0.6.2 targeting .NET 4.6.1. Tested on both Windows and Mac.
@pauldotknopf commented on GitHub (Oct 10, 2018):
Can you try this project?
https://github.com/qmlnet/qmlnet-examples
Also, did you add a reference to the native packages?
@akbcode commented on GitHub (Oct 10, 2018):
Yes, I did add the native packages.
The qmlnet-examples project works fine. But only when targeting .NET Core.
@pauldotknopf commented on GitHub (Oct 10, 2018):
I see, I will check it this evening.
@TripleWhy commented on GitHub (Apr 7, 2019):
@pauldotknopf I would like to see support for .NET Framework as well. Any hints on where to start if I were to add this myself?
@pauldotknopf commented on GitHub (Apr 14, 2019):
So, it seems that
DllImportisn't finding the native binaries on .NET Fullframework.Add a reference to
Qml.Net.WindowsBinaries.This will throw a "dll not found error". It works on Core.
If anybody has any ideas, I'd love to hear them.
@pauldotknopf commented on GitHub (Apr 14, 2019):
I've posed the question on SO here. I will let you guys know if I hear anything back.
@kshanafelt commented on GitHub (Dec 9, 2019):
I found a bit of a workaround for this issue.
It seems to have some to do with how .net framework pulls in native dlls, I noticed that when publishing a publish profile for net472 set to win-x64 (see below), that the native
QmlNet.dllgets pulled in.So I tried creating a x64 platform configuration (since only native x64 is supported anyway), and the build for that pulled the native
QmlNet.dllas well. I guess in .net frameworkAnyCpuit can't figure out what bitness of native dlls to pull in, until you tell it with a publish.While this got me past the error noted on this issue, it brought a new one:
Though I cannot articulate how, I had a eureka while reading this issue: Native assets are not copied to bin for net472 app if any referenced package uses netstandard2.0, but since their workaround didn't work in my case, you should probably regard as a red herring.