Skip to content

Use eng/common/dotnet.sh for VMR license scan instead of manual SDK install - #8063

Merged
nagilson merged 1 commit into
release/10.0.1xxfrom
nagilson/license-scan-use-dotnet-sh
Jul 30, 2026
Merged

nagilson merged 1 commit into
release/10.0.1xxfrom
nagilson/license-scan-use-dotnet-sh

Conversation

@nagilson

Copy link
Copy Markdown
Member

Follow-up to #8012.

#8012 fixed the VMR license scan exit 155 failure (the shared source-build test container ships a newer .NET 10 SDK than this branch's global.json pins, so the container's system dotnet couldn't run the tests) by installing the global.json-matched SDK via eng/common/tools.sh and invoking it through $(DotNetPath)/dotnet.

Per @ViktorHofer's review feedback (#8012 (comment)), eng/common/dotnet.sh already acquires the correct SDK (it sources tools.sh, runs InitializeDotNetCli true, then invokes the acquired dotnet), so this replaces the manual install step with a direct ./eng/common/dotnet.sh test invocation. The Run Tests step already runs with workingDirectory: $(Build.SourcesDirectory), so the relative path resolves.

Related to dotnet/source-build#5623

…nstall

Follow-up to #8012. That change worked around an SDK-resolution regression by
installing the global.json-matched SDK via eng/common/tools.sh and invoking it
through $(DotNetPath)/dotnet. Per review feedback, eng/common/dotnet.sh already
acquires the correct SDK and invokes it, so use it directly and drop the manual
install step.

Related to dotnet/source-build#5623

Co-authored-by: Copilot <[email protected]>
Copilot-Session: e7257ff7-f19d-4b7c-ba41-cdac231893fb
@nagilson
nagilson requested review from a team as code owners July 30, 2026 16:43
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).
1 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

@nagilson

Copy link
Copy Markdown
Member Author

Not merging this until I can try to rerun the license scan off this branch to confirm it doesn't regress anything

@nagilson

Copy link
Copy Markdown
Member Author

Validation: I pushed this branch to the dnceng/internal dotnet-dotnet mirror (the public→internal mirror doesn't pick up arbitrary PR branches) and queued the source-build-license-scan pipeline (1301) off it:

⚠️ Do not merge this PR until that run completes and the license scan passes — this validates that switching to ./eng/common/dotnet.sh test still acquires the global.json-matched SDK and produces a clean scan (no exit 155). I'll update here with the result.

@nagilson
nagilson merged commit 0548849 into release/10.0.1xx Jul 30, 2026
11 checks passed
@nagilson
nagilson deleted the nagilson/license-scan-use-dotnet-sh branch July 30, 2026 21:47
@nagilson

Copy link
Copy Markdown
Member Author

✅ Validation passed. The license-scan run off this branch completed Succeeded:

Switching to ./eng/common/dotnet.sh test acquires the global.json-matched SDK and produces a clean scan (no exit 155). This PR is clear to merge from a validation standpoint.

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.

3 participants