Skip to content

fix: read server version from assembly metadata instead of hardcoded 1.0.0#409

Merged
jongalloway merged 1 commit intomainfrom
fix/server-version-from-assembly
Mar 18, 2026
Merged

fix: read server version from assembly metadata instead of hardcoded 1.0.0#409
jongalloway merged 1 commit intomainfrom
fix/server-version-from-assembly

Conversation

@jongalloway
Copy link
Copy Markdown
Owner

Problem

The MCP server always reported dotnet-mcp 1.0.0 in the initialize response regardless of the actual NuGet package version, because the version was hardcoded in Program.cs:

\
Server (dotnet-mcp 1.0.0) method 'initialize' request handler called.
\\

Fix

Read AssemblyInformationalVersionAttribute (set by MinVer from git tags) at runtime. The server now correctly reports the actual version:

\
Server (dotnet-mcp 1.1.1+1324b2da...) method 'initialize' request handler called.
\\

Falls back to AssemblyName.Version then 0.0.0 if the attribute is unavailable.

Testing

All 58 conformance + capabilities tests pass.

…1.0.0

The MCP server always reported 'dotnet-mcp 1.0.0' regardless of the
actual package version because the version was hardcoded in Program.cs.
Now reads AssemblyInformationalVersionAttribute set by MinVer from git
tags, so the server correctly reports e.g. 'dotnet-mcp 1.1.1'.
@jongalloway jongalloway merged commit dec77db into main Mar 18, 2026
4 checks passed
@jongalloway jongalloway deleted the fix/server-version-from-assembly branch March 18, 2026 02:13
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.

1 participant