Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Operation is not supported on this platform Errors in .Net Standard 2.1 or Greater #132

Open
youst03 opened this issue Jan 27, 2022 · 4 comments

Comments

@youst03
Copy link

youst03 commented Jan 27, 2022

I believe the following needs to be updated as "NETSTANDARD2_0_OR_GREATER || NET35 " to handle projects of .net standard > 2.0

#if NET20 || NET35

@XySoftNeil
Copy link

BeginInvoke is the "not supported operation" if you are trying to use .NET 6 - Refactor to replace it with Invoke where needed. I would be willing to do a pull request but there are 3 sitting there and I'm not sure this is a living project.

@mmjc23
Copy link

mmjc23 commented Aug 8, 2022

I get the same error with the MonitorDeviceEvents property and the Core 3.1 framework

@radop
Copy link

radop commented Jan 5, 2023

I have problem with hidlibrary

i create a Form windows desktop application in c#

_device.MonitorDeviceEvents=true

that command throws exception: PlatformNotSupportedException

i use MS visual studio 2022 c#, and Windows home 11, 64.bit

By console program workt all ok

@emaiutto
Copy link

emaiutto commented Mar 4, 2023

You need to change the code for this: Here it is working perfectly and faster. The code for this project needs a major cleanup. Replacing "invokes" and removing "delegates" is critical. Using TASK you don't need any of that!

    public async Task<HidReport> ReadReportAsync()
    {
        return await Task.Run(() => ReadReport());
    }

to consume it you just have to do this:

        ReportDevice = Task.Run(async () => await Device?.ReadReportAsync());

        ReportDevice.ContinueWith(t => OnReport(ReportDevice.Result));

I will upload the modifications when they are ready and clean. In my case it works perfectly with a Saitek Radio Panel for my flight simulator. (Read / Features)

greetings to all
Esteban

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants