Skip to content

[Infra] Skip netfx reference assemblies on Windows#4287

Merged
martincostello merged 1 commit intoopen-telemetry:mainfrom
martincostello:conditional-reference
Apr 30, 2026
Merged

[Infra] Skip netfx reference assemblies on Windows#4287
martincostello merged 1 commit intoopen-telemetry:mainfrom
martincostello:conditional-reference

Conversation

@martincostello
Copy link
Copy Markdown
Member

Relates to open-telemetry/opentelemetry-dotnet#7142

Changes

Only reference Microsoft.NETFramework.ReferenceAssemblies on non-Windows OS.

I couldn't replicate the same failure here, but it makes sense to be consistent and skip restoring and referencing a redundant package on Windows.

Merge requirement checklist

  • CONTRIBUTING guidelines followed (license requirements, nullable enabled, static analysis, etc.)
  • Unit tests added/updated
  • Appropriate CHANGELOG.md files updated for non-trivial changes
  • Changes in public API reviewed (if applicable)

Only reference `Microsoft.NETFramework.ReferenceAssemblies` on non-Windows OS.

Based on change in open-telemetry/opentelemetry-dotnet#7142.
@github-actions github-actions Bot added infra Infra work - CI/CD, code coverage, linters dependencies Pull requests that update a dependency file labels Apr 23, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 23, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 74.93%. Comparing base (26e57fd) to head (8665a2d).
⚠️ Report is 55 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #4287      +/-   ##
==========================================
+ Coverage   73.87%   74.93%   +1.06%     
==========================================
  Files         467      467              
  Lines       18435    18435              
==========================================
+ Hits        13618    13815     +197     
+ Misses       4817     4620     -197     
Flag Coverage Δ
unittests-Contrib.Shared.Tests 89.38% <ø> (ø)
unittests-Exporter.Geneva 54.82% <ø> (-0.33%) ⬇️
unittests-Exporter.InfluxDB 95.81% <ø> (ø)
unittests-Exporter.Instana 74.86% <ø> (ø)
unittests-Exporter.OneCollector 94.61% <ø> (ø)
unittests-Extensions 90.78% <ø> (ø)
unittests-Extensions.Enrichment 100.00% <ø> (ø)
unittests-Extensions.Enrichment.AspNetCore 86.27% <ø> (ø)
unittests-Extensions.Enrichment.Http 94.33% <ø> (ø)
unittests-Instrumentation.AWS 83.54% <ø> (ø)
unittests-Instrumentation.AspNet 76.61% <ø> (ø)
unittests-Instrumentation.AspNetCore 70.44% <ø> (ø)
unittests-Instrumentation.Cassandra 86.27% <ø> (+62.74%) ⬆️
unittests-Instrumentation.ConfluentKafka 78.52% <ø> (+31.14%) ⬆️
unittests-Instrumentation.ElasticsearchClient 80.60% <ø> (ø)
unittests-Instrumentation.EntityFrameworkCore 81.39% <ø> (ø)
unittests-Instrumentation.EventCounters 77.27% <ø> (ø)
unittests-Instrumentation.GrpcCore 91.27% <ø> (ø)
unittests-Instrumentation.GrpcNetClient 73.78% <ø> (ø)
unittests-Instrumentation.Hangfire 86.05% <ø> (ø)
unittests-Instrumentation.Http 74.62% <ø> (ø)
unittests-Instrumentation.Owin 88.62% <ø> (ø)
unittests-Instrumentation.Process 100.00% <ø> (ø)
unittests-Instrumentation.Quartz 78.76% <ø> (ø)
unittests-Instrumentation.Remoting 64.28% <ø> (ø)
unittests-Instrumentation.Runtime 100.00% <ø> (ø)
unittests-Instrumentation.ServiceFabricRemoting 40.83% <ø> (ø)
unittests-Instrumentation.SqlClient 84.73% <ø> (ø)
unittests-Instrumentation.StackExchangeRedis 93.63% <ø> (ø)
unittests-Instrumentation.Wcf 80.77% <ø> (ø)
unittests-OpAmp.Client 82.37% <ø> (-0.23%) ⬇️
unittests-PersistentStorage 69.13% <ø> (-1.93%) ⬇️
unittests-Resources.AWS 74.49% <ø> (ø)
unittests-Resources.Azure 88.31% <ø> (ø)
unittests-Resources.Container 67.34% <ø> (ø)
unittests-Resources.Gcp 71.42% <ø> (ø)
unittests-Resources.Host 72.26% <ø> (ø)
unittests-Resources.OperatingSystem 76.98% <ø> (ø)
unittests-Resources.Process 100.00% <ø> (ø)
unittests-Resources.ProcessRuntime 79.59% <ø> (ø)
unittests-Sampler.AWS 94.27% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.
see 21 files with indirect coverage changes

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@martincostello martincostello marked this pull request as ready for review April 23, 2026 09:55
@martincostello martincostello requested a review from a team as a code owner April 23, 2026 09:55
Copilot AI review requested due to automatic review settings April 23, 2026 09:55
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates central package management to avoid restoring Microsoft.NETFramework.ReferenceAssemblies on Windows, aligning reference-assembly usage with OS capabilities and reducing redundant package restore work.

Changes:

  • Add an OS-based condition to only reference Microsoft.NETFramework.ReferenceAssemblies on non-Windows.
  • Reorder attributes on global analyzer package references (no functional change intended).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread Directory.Packages.props
Comment thread Directory.Packages.props
@martincostello martincostello added this pull request to the merge queue Apr 30, 2026
Merged via the queue into open-telemetry:main with commit dc7e36a Apr 30, 2026
320 checks passed
@martincostello martincostello deleted the conditional-reference branch April 30, 2026 10:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file infra Infra work - CI/CD, code coverage, linters

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants