ci(inspectcode): move to windows-latest to resolve .NET Framework references - #202
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Updates the ReSharper InspectCode GitHub Actions job to run reliably for repositories that include .NET Framework target projects by moving the job to a Windows runner and adjusting related scripting to be Windows-friendly.
Changes:
- Moved
inspectcodejob fromubuntu-latesttowindows-latestand setdefaults.run.shell: bashfor consistent scripting. - Simplified build to a repo-root
dotnet restore+dotnet build -c Releaseon Windows (dropping the previous Linux compatibility exclusions). - Replaced SARIF gating logic from
jqto PowerShell (ConvertFrom-Json) for error-level result counting.
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7 | ||
| uses: actions/checkout@v7 |
|
|
||
| - name: Setup .NET | ||
| uses: actions/setup-dotnet@26b0ec14cb23fa6904739307f278c14f94c95bf1 # v5 | ||
| uses: actions/setup-dotnet@v5 |
Comment on lines
1397
to
1400
| - name: Upload SARIF to Code Scanning | ||
| uses: github/codeql-action/upload-sarif@v4 | ||
| with: | ||
| sarif_file: inspect.sarif |
Comment on lines
+1382
to
+1385
| SLN=$(ls *.slnx 2>/dev/null | head -n1) | ||
| if [ -z "$SLN" ]; then | ||
| SLN=$(ls *.sln 2>/dev/null | head -n1) | ||
| fi |
Comment on lines
+1320
to
+1324
| "Directory.Build.props" | ||
| "Directory.Build.targets" | ||
| "BannedSymbols.txt" | ||
| "*.globalconfig" | ||
| "*.ruleset" |
…ry-Pattern #250 fix)
# Conflicts: # .github/workflows/pr.yaml
This was referenced Jul 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fan-out of Try-Pattern PR #248. Three changes to the
inspectcode:job in.github/workflows/pr.yaml:runs-on: ubuntu-latest→windows-latest. On Ubuntu, InspectCode failed with 60+ MSB3245 assembly-resolution errors on repos with .NET Framework example projects — the reference assemblies (System,System.Xml.Linq, etc.) aren't present without mono. Windows has them bundled atC:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.jq→pwsh+ConvertFrom-Json. No dependency on preinstalled utilities beyond PowerShell (native on windows-latest).dotnet restore && dotnet build -c Releaseis sufficient.Protected file
This PR only touches
.github/workflows/pr.yaml. Detect .NET Projects will fail as expected → admin-bypass required.Related
chore/add-inspectcodefleet PRs before they land, so they don't need this follow-up.🤖 Generated with Claude Code