[GH-ISSUE #244] .NET Framework x.x doesnt work. #157

Closed
opened 2026-05-05 11:07:08 -06:00 by gitea-mirror · 2 comments
Owner

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

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
Author
Owner

@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.

`

<!-- gh-comment-id:1142361300 --> @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. `
Author
Owner

@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();
}
}
}
}
}`

<!-- gh-comment-id:1142364335 --> @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>("email", 1, 1); qmlEngine.Load("main.qml"); return application.Exec(); } } } } }`
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#157
No description provided.