Skip to content

Conversation

rokenbuzz
Copy link
Contributor

PackageVersion for OpenTelemetry.Instrumentation.Http had trailing space causing error noticed in Visual Studio build

Removed trailing space in Directory.Packages.props for OpenTelemetry.Instrumentation.Http PackageReference

Motivation and Context

Caused me a build error in Visual Studio

How Has This Been Tested?

Yes. The error went away.

Breaking Changes

Types of changes

  • [x ] Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

Additional context

It's a removed space that clearly shouldn't be there.

PackageVersion for OpenTelemetry.Instrumentation.Http had trailing space causing error noticed in Visual Studio build
@stephentoub
Copy link
Contributor

stephentoub commented Jun 30, 2025

had trailing space causing error noticed in Visual Studio build

What was the error?

Removing the space is fine, but I'm surprised this caused an error, and I'm not seeing it locally, nor is it causing CI failures.

Thanks.

@rokenbuzz
Copy link
Contributor Author

What was the error?

I built using Visual Studio, not Visual Code, if that makes a difference.
After scratching my head trying to figure it out, I worked with ChatGPT, which eventually pointed out the space.
For my chat history, I see the error was:

Projects that use central package version management should not define the version on the PackageReference items but on the PackageVersion items: OpenTelemetry.Instrumentation.AspNetCore;OpenTelemetry.Exporter.OpenTelemetryProtocol;OpenTelemetry.Extensions.Hosting;OpenTelemetry.Instrumentation.Http.

@stephentoub stephentoub merged commit fc29342 into modelcontextprotocol:main Jun 30, 2025
4 of 7 checks passed
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

Successfully merging this pull request may close these issues.

2 participants