Azure-Samples / cognitive-services-speech-sdk

Sample code for the Microsoft Cognitive Services Speech SDK
MIT License
2.69k stars 1.79k forks source link

[.NET 8] Warning: "Found version-specific or distribution-specific runtime identifiers" #2244

Open ladenedge opened 5 months ago

ladenedge commented 5 months ago

Describe the bug

Including the Microsoft.CognitiveServices.Speech NuGet package yields a build warning.

C:\Program Files\dotnet\sdk\8.0.100\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.targets(284,5):
   warning NETSDK1206: Found version-specific or distribution-specific runtime identifier(s): centos7-x64.
   Affected libraries: Microsoft.CognitiveServices.Speech. In .NET 8.0 and higher, assets for version-specific
   and distribution-specific runtime identifiers will not be found by default.

Note this is similar (but not identical) to #2170. As I mentioned over there, instead of listing many RIDs, I am now only seeing centos7-x64.

To Reproduce

  1. Create an empty .NET 8 Console App.
  2. Install the Microsoft.CognitiveServices.Speech NuGet package.
  3. Build the solution.

Expected behavior

No warnings!

Version of the Cognitive Services Speech SDK

Microsoft.CognitiveServices.Speech v1.34.1.

Platform, Operating System, and Programming Language

Thanks for your time!

github-actions[bot] commented 4 months ago

This item has been open without activity for 19 days. Provide a comment on status and remove "update needed" label.

ladenedge commented 4 months ago

Still present in 1.35.0.

These are the only warnings in my solution. :(

image

Would a PR make sense? (I'm not sure if this project accepts them from randos like me..?)

pankopon commented 4 months ago

This appears due to RHEL/CentOS 7 specific binaries under runtimes\centos7-x64 that we have to keep around at least until the CentOS 7 EOL or so. As documented for this breaking change in .NET 8, one workaround is to set UseRidGraph true in the project file.

ladenedge commented 4 months ago

Okay, thank you for the update!

exedor commented 4 months ago

I'm running into the same thing with a fairly large project with many thousands of lines of code. It's the only warning I have in the project :) Are there any side-effects to the above mentioned work around?

pankopon commented 3 months ago

@exedor The linked .NET 8 documentation does mention that

The long-term goal is to stop updating the RID graph, stop reading it, and eventually remove it.

but the workaround should be good at least for the .NET 8 lifetime, and hopefully by the end of it we will have removed the binaries that trigger the warning.

github-actions[bot] commented 3 months ago

This item has been open without activity for 19 days. Provide a comment on status and remove "update needed" label.

pankopon commented 2 months ago

Internal work item ref. 6718573. A possible target is soon after the CentOS 7 EOL on June 30.

github-actions[bot] commented 2 months ago

This item has been open without activity for 19 days. Provide a comment on status and remove "update needed" label.