Repository navigation
ci: add GitHub Actions pipeline to build the solution - #9
Merged
Merged
Conversation
Add a Windows build pipeline for MemoryX.sln and fix the one thing that prevented a clean-checkout build from succeeding. - .github/workflows/build.yml: build Debug and Release on windows-latest with MSBuild, restore NuGet packages, and upload the compiled output as artifacts. MSBuild is required because both projects use the legacy non-SDK csproj format, which `dotnet build` does not support. - MemoryXTest.csproj: replace the file reference to ..\MemoryX\bin\Debug\MemoryX.dll with a ProjectReference. The hard-coded Debug path made a clean Release build fail to resolve MemoryX, and it relied on build output that is not present on a fresh checkout. - README.md: add a build status badge. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SKZ2gugmpaYSHPS7LR5Xjg
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
The first pipeline run failed both matrix legs with MSB3644: the reference assemblies for .NETFramework,Version=v4.5.2 were not found. The hosted Windows image now ships Visual Studio 18, which no longer includes the 4.5.2 targeting pack. Download the reference assemblies from NuGet instead and point MSBuild at them via TargetFrameworkRootPath. This keeps both projects on their current v4.5.2 target, makes the build independent of whichever targeting packs a runner image happens to install, and leaves Visual Studio builds untouched. The step locates the .NETFramework\v4.5.2 folder in the downloaded package rather than assuming its internal layout, and fails with a clear message if it is missing. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SKZ2gugmpaYSHPS7LR5Xjg
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
Adds a CI pipeline that builds
MemoryX.slnon Windows, and fixes the two things that stopped a clean-checkout build from succeeding.Both matrix legs are green on
763e1cb.Changes
.github/workflows/build.yml(new)Builds the solution on
windows-latestin aDebug/Releasematrix and uploads the compiled output as artifacts. Triggers on pushes tomaster, pull requests intomaster, and manual dispatch.It uses MSBuild rather than
dotnet buildbecause both projects use the legacy non-SDK.csprojformat, which thedotnetCLI does not support. (The existing CircleCI config runsdotnet build, which is why it cannot work — see Follow-up below.)Reference assemblies. The hosted image now ships Visual Studio 18, which no longer includes the .NET Framework 4.5.2 targeting pack, so MSBuild fails with
MSB3644. The pipeline therefore downloadsMicrosoft.NETFramework.ReferenceAssemblies.net452(pinned to 1.0.3) and points MSBuild at it viaTargetFrameworkRootPath— the property thatGetReferenceAssemblyPaths, the task raisingMSB3644, actually consumes.This was chosen over the alternatives deliberately:
v4.8windows-2022v4.5.2target exactly as-is, works on any runner regardless of installed targeting packs, and does not affect Visual Studio buildsThe step locates the
.NETFramework\v4.5.2folder inside the downloaded package rather than hard-coding its internal layout, and fails with an explicit message if it is absent.MemoryXTest/MemoryXTest.csprojThe test project referenced the library through a hard-coded path to build output:
That file does not exist on a fresh checkout, and in a Release build the library outputs to
bin\Release\instead, so reference resolution fails (MSB3245) and everyMemoryX.Memoryusage inProgram.csfails to compile (CS0246).Replaced with a proper
<ProjectReference>, which resolves per configuration and lets MSBuild handle build ordering. The now-redundantProjectDependenciessection inMemoryX.slnwas left untouched, as it is harmless.README.mdAdds a build status badge.
Testing
The workflow could not be run locally — this project needs Windows MSBuild for .NET Framework 4.5.2 — so CI on this PR is the verification.
The first run failed both legs with
MSB3644, which is what surfaced the missing targeting pack;763e1cbfixes it. The current run confirms the reference assemblies resolve and both projects compile in both configurations:The
MemoryXTestline is the direct confirmation of theProjectReferencefix, since Release is the configuration that would previously have failed.One pre-existing warning is reported and left alone, as it is unrelated to this change:
Follow-up (not in this PR)
.circleci/config.ymlrunsdotnet build, which cannot build these legacy projects — that pipeline is broken and is now redundant. Removing.circleci/in a separate change would be my suggestion, but it is left alone here to keep this PR focused.🤖 Generated with Claude Code
https://claude.ai/code/session_01SKZ2gugmpaYSHPS7LR5Xjg