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

Microsoft.Azure.Devices.Client incorrectly determines .NET Standard support #1592

Closed
terrajobst opened this issue Oct 2, 2020 · 7 comments
Closed
Assignees
Labels
bug Something isn't working. fix-checked-in Fix checked into main or preview, but not yet released. IoTSDK Tracks all IoT SDK issues across the board

Comments

@terrajobst
Copy link

This issue was reported by a customer.

  1. Use .NET 5 preview.
  2. Install Microsoft.Azure.Devices.Client

Expectation

Stuff works.

Actuality

The customer gets an exception:

Unhandled exception. System.NotSupportedException: Specified method is not supported.
   at Microsoft.Azure.Devices.Client.Common.ReadOnlyMergeDictionary`2.System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair>.get_Count()

It seems the root cause is a fragile check in the MSBuild targets:

  <PropertyGroup>
    <SupportsNetStandard20AndAbove Condition="'$(TargetFramework)' == 'netstandard2.1' Or '$(TargetFramework)' == 'netstandard2.0' Or '$(TargetFramework)' == 'net472'">true</SupportsNetStandard20AndAbove>
  </PropertyGroup>

What are you trying to achieve by this method?

@terrajobst terrajobst added the bug Something isn't working. label Oct 2, 2020
@github-actions github-actions bot added the IoTSDK Tracks all IoT SDK issues across the board label Oct 2, 2020
@azabbasi azabbasi self-assigned this Oct 2, 2020
@azabbasi
Copy link
Contributor

azabbasi commented Oct 2, 2020

We are working on the fix. Will update the issue once the fix is released with a new version.

@abhipsaMisra
Copy link
Member

abhipsaMisra commented Oct 2, 2020

Duplicate of #1562

@abhipsaMisra abhipsaMisra marked this as a duplicate of #1562 Oct 2, 2020
@az-iot-builder-01
Copy link
Contributor

@terrajobst, @azabbasi, @abhipsaMisra, thank you for your contribution to our open-sourced project! Please help us improve by filling out this 2-minute customer satisfaction survey

@azabbasi azabbasi reopened this Oct 3, 2020
@azabbasi
Copy link
Contributor

azabbasi commented Oct 3, 2020

Fix has been checked in. We will update the issue when a release is published.

@azabbasi azabbasi added the fix-checked-in Fix checked into main or preview, but not yet released. label Oct 3, 2020
@terrajobst
Copy link
Author

@azabbasi

Fix has been checked in. We will update the issue when a release is published.

Thanks for reopening this to keep me posted. I have posed a question here: #1562 (comment)

@azabbasi
Copy link
Contributor

azabbasi commented Oct 12, 2020

@terrajobst Azure IoT SDK team has released a new version of the SDK that include fixes for this issue.
2020-10-8

Please confirm and we will close the Issue afterwards.

@abhipsaMisra
Copy link
Member

Closing this since this has now been released.

timstewartm pushed a commit to timstewartm/azure-iot-sdk-csharp that referenced this issue May 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working. fix-checked-in Fix checked into main or preview, but not yet released. IoTSDK Tracks all IoT SDK issues across the board
Projects
None yet
Development

No branches or pull requests

4 participants