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

Getting PlatformNotSupportedException on .NET Framework 4.6.1 #3445

Closed
dheerajawale-svg opened this issue Mar 17, 2024 · 3 comments
Closed
Labels
bug Something isn't working.

Comments

@dheerajawale-svg
Copy link

dheerajawale-svg commented Mar 17, 2024

I am trying to use Microsoft.Azure.Devices.Client for a legacy WinForms application (.NET 4.6.1), as I need to use Azure IOT device client to send events from a custom joystick connected to WinForms app.

When trying to create an instance like below with MQTT type, It throws "Operation is not supported on this platform." error.
DeviceClient deviceClient = DeviceClient.CreateFromConnectionString(deviceConnectionString, TransportType.Mqtt, options);

If tried with HTTP then it throws: "Plug and Play is not supported over the HTTP transport."

Please help!

List of packages used:

<package id="Azure.Core" version="1.36.0" targetFramework="net461" />
<package id="Azure.Storage.Blobs" version="12.19.1" targetFramework="net461" />
<package id="Azure.Storage.Common" version="12.18.1" targetFramework="net461" />
<package id="DotNetty.Buffers" version="0.7.5" targetFramework="net461" />
<package id="DotNetty.Codecs" version="0.7.5" targetFramework="net461" />
<package id="DotNetty.Codecs.Mqtt" version="0.7.5" targetFramework="net461" />
<package id="DotNetty.Common" version="0.7.5" targetFramework="net461" />
<package id="DotNetty.Handlers" version="0.7.5" targetFramework="net461" />
<package id="DotNetty.Transport" version="0.7.5" targetFramework="net461" />
<package id="Microsoft.Azure.Amqp" version="2.5.12" targetFramework="net461" />
<package id="Microsoft.Azure.Devices" version="1.39.1" targetFramework="net461" />
<package id="Microsoft.Azure.Devices.Client" version="1.42.2" targetFramework="net461" />
<package id="Microsoft.Azure.Devices.Shared" version="1.30.4" targetFramework="net461" />
<package id="Microsoft.Bcl.AsyncInterfaces" version="5.0.0" targetFramework="net461" />
<package id="Microsoft.CSharp" version="4.7.0" targetFramework="net461" />
<package id="Microsoft.Extensions.DependencyInjection" version="5.0.0" targetFramework="net461" />
<package id="Microsoft.Extensions.DependencyInjection.Abstractions" version="5.0.0" targetFramework="net461" />
<package id="Microsoft.Extensions.Logging" version="5.0.0" targetFramework="net461" />
<package id="Microsoft.Extensions.Logging.Abstractions" version="5.0.0" targetFramework="net461" />
<package id="Microsoft.Extensions.Options" version="5.0.0" targetFramework="net461" />
<package id="Microsoft.Extensions.Primitives" version="5.0.0" targetFramework="net461" />
<package id="Microsoft.Rest.ClientRuntime" version="2.3.24" targetFramework="net461" />
<package id="Microsoft.Win32.Registry" version="4.5.0" targetFramework="net461" />
<package id="MQTTnet" version="4.3.3.952" targetFramework="net461" />
@dheerajawale-svg dheerajawale-svg added the bug Something isn't working. label Mar 17, 2024
@timtay-microsoft
Copy link
Member

Can you provide the stacktrace on the "Operation is not supported on this platform" error?

@timtay-microsoft
Copy link
Member

@dheerajawale-svg ?

@timtay-microsoft
Copy link
Member

Closing due to inactivity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working.
Projects
None yet
Development

No branches or pull requests

2 participants