Build solutions with the .NET SDK instead of VS MSBuild - #3
Open
MrBlue wants to merge 1 commit into
Open
Conversation
Co-authored-by: Codesmith <codesmith-bot@users.noreply.github.com>
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.
The
Build Solutionstep fails on any Windows image whose Visual Studio install does not bundle the .NET SDK. On the Blacksmithwindows-2025image (VS 2022 Build Tools, no .NET SDK component)msbuild.exehas noMicrosoft.DotNet.MSBuildSdkResolver, so an SDK-style project cannot be evaluated at all:(Example: Oxide.Rust run 31123440214, which is why the Blacksmith migration in f6fd07c had to be reverted.)
This worked on GitHub's
windows-2022image only because that image ships VS Enterprise with the .NET SDK workload, i.e. the action was implicitly depending on the runner image rather than on anything it installs itself. Instead of patchingMSBuildSDKsPathto graft an SDK onto VS MSBuild (fragile, breaks the workload resolver), the action now installs the SDK it needs and drives the build through it:dotnet msbuildtakes the same targets, properties and-restoresemantics asmsbuild.exe, and the .NET SDK buildsnet48projects on Windows, so the build behaviour is unchanged;microsoft/setup-msbuildis dropped because nothing invokesMSBuild.exeanymore. The SDK version is exposed as an optionaldotnet-versioninput (default8.0.x) for consumers that need to pin it.I could not exercise the Windows path from this branch (pushes here don't trigger workflow runs, and
game-build.ymlonly runs from the consuming repos), so the first real validation will be the nextOxide.*build. With this merged, re-applyingruns-on: blacksmith-4vcpu-windows-2025ingame-build.yml/project-build.ymlshould stick.Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is enabled.