Skip to content

Fix: the version switch reached dotnet letter by letter - #3

Merged
fcspcs merged 1 commit into
mainfrom
claude/overlay-tooltip-logout-warning-81ymzb
Aug 4, 2026
Merged

Fix: the version switch reached dotnet letter by letter#3
fcspcs merged 1 commit into
mainfrom
claude/overlay-tooltip-logout-warning-81ymzb

Conversation

@fcspcs

@fcspcs fcspcs commented Aug 4, 2026

Copy link
Copy Markdown
Owner

The first release run died in the first build:

MSBUILD : error MSB1001: Unknown switch.
    Full command line: '... --nologo ...Monkey.Service.csproj - p : V e r s i o n = 1 . 1 . 0 -restore'

$versionArgs = if ($Version) { @("-p:Version=$Version") } else { @() } looks like it produces a list, but PowerShell unrolls a single-entry array on its way out of an if expression — so the variable held a string, and splatting a string spreads it one character at a time. The list is declared as one and filled entry by entry now.

The ordinary build never hit this: without -Version the branch is empty and nothing gets passed.

Also in here, from watching the run: 1.1 was typed into the version field, and the tags are called v1.0, v1.1 — the download link hangs on that spelling. A missing v is added now. The normalised name travels on as RELEASE_TAG, deliberately not under the name it arrived in, because entries in env: take precedence over anything a step writes to GITHUB_ENV.

Once this is in, the run for v1.1 can go again — 1.1 in the field would work as well now.

Testing

The YAML parses; PowerShell can't be run in this environment, so the next run is the check. The failure mode was visible in the log line above, and the fix is the standard remedy for it.


Generated by Claude Code

The result of an if expression with a single entry comes out of PowerShell as a
string, not as a one-element array - and splatting a string spreads it one
character at a time. dotnet was handed "- p : V e r s i o n = 1 . 1 . 0" and
MSBuild refused it, so the first release run died in the first build.

The list is now declared as one and filled entry by entry.

While in there: a version typed without the leading v gets one, because the
tags are called v1.0, v1.1, and the download link in the README hangs on that
spelling. The normalised name travels as RELEASE_TAG - deliberately not under
the name it came in as, since entries in env: take precedence over anything a
step writes.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TLEChwrQa1sywq2ctaj3MF
@fcspcs
fcspcs merged commit 61b91ab into main Aug 4, 2026
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