mirror of
https://github.com/qmlnet/qmlnet.git
synced 2026-05-15 14:15:54 -06:00
[GH-ISSUE #244] .NET Framework x.x doesnt work. #157
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#157
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 @sethsource on GitHub (May 31, 2022).
Original GitHub issue: https://github.com/qmlnet/qmlnet/issues/244
I've tried using this with every version of .NET framework starting from .net 35 all the way to .net 48 and none of them work.
I just receive "unsupported target" in my stack trace. I've only had luck using .net core 5 or 6. I've tried transferring the runtimes and I cant get it to run with .net framework x.x
@sethsource commented on GitHub (May 31, 2022):
`Unhandled Exception: System.Exception: Unsupported target
at Qml.Net.Runtimes.RuntimeManager.RuntimeTargetToString(RuntimeTarget target)
at Qml.Net.Runtimes.RuntimeManager.FindQtRuntime(String[] runtimeDirectories, String qtVersion, RuntimeTarget target)
at Qml.Net.Runtimes.RuntimeManager.FindSuitableQtRuntime(RuntimeSearchLocation runtimeSearchLocation)
at Qml.Net.Runtimes.RuntimeManager.DiscoverOrDownloadSuitableQtRuntime(RuntimeSearchLocation runtimeSearchLocation)
at emailqml.Runner.Main(String[] args) in C:\Users\seth\RiderProjects\emailqml4.8\emailqml4.8\Runner.cs:line 12
Process finished with exit code -532,462,766.
`
@sethsource commented on GitHub (May 31, 2022):
`using Qml.Net;
using Qml.Net.Runtimes;
using System;
namespace emailqml
{
internal static class Runner
{
[STAThread]
static int Main(string[] args)
{
RuntimeManager.DiscoverOrDownloadSuitableQtRuntime();
QmlNetConfig.ShouldEnsureUIThread = false;
QQuickStyle.SetStyle("Universal");
using (QGuiApplication application = new QGuiApplication(args))
{
using (QQmlApplicationEngine qmlEngine = new QQmlApplicationEngine())
{
Qml.Net.Qml.RegisterType("email", 1, 1);
qmlEngine.Load("main.qml");
return application.Exec();
}
}
}
}
}`