Repository navigation
Skip VS preview SDK setup when using dotnet MSBuild - #10704
Merged
akoeplinger merged 1 commit intoNov 4, 2026
Merged
Conversation
Avoid unnecessary writes to Visual Studio sdk.txt from the F# and Roslyn build scripts when the selected engine is dotnet. Preserve existing behavior for Visual Studio builds and standalone preview SDK setup. Co-authored-by: Copilot <[email protected]> Copilot-Session: 94493bfb-271a-49e3-b741-92f0337d8f59
|
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. |
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are reported for the change that skips preview-SDK setup when using dotnet MSBuild.
No open issues 🎉
What changed in this PR
Skips Visual Studio preview-SDK setup when F# and Roslyn use dotnet MSBuild, avoiding unnecessary writes to the shared sdk.txt file that can race with concurrent builds.
Changes:
- Adds a dotnet-engine early return to both
EnablePreviewSdkshelpers. - Preserves Visual Studio behavior, F#’s cached-MSBuild guard, and standalone Roslyn preview-SDK setup.
| File | Description |
|---|---|
src/roslyn/eng/build-utils.ps1 |
Returns before Visual Studio discovery when using dotnet MSBuild. |
src/fsharp/eng/Build.ps1 |
Extends the existing early-return guard to cover dotnet MSBuild. |
Review effort: Balanced
ViktorHofer
approved these changes
Nov 4, 2026
akoeplinger
enabled auto-merge (squash)
November 4, 2026 12:08
akoeplinger
added a commit
that referenced
this pull request
Nov 4, 2026
Co-authored-by: Copilot <[email protected]> Copilot-Session: 94493bfb-271a-49e3-b741-92f0337d8f59 (cherry picked from commit b625658)
This was referenced Nov 6, 2026
This was referenced Nov 14, 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.
Skip EnablePreviewSdks in the F# and Roslyn build scripts when the selected MSBuild engine is dotnet. Preserve the existing behavior for Visual Studio builds and the standalone Roslyn preview-SDK setup script.
Both scripts currently write Visual Studio’s shared sdk.txt even when building with dotnet MSBuild. These unnecessary writes can race with concurrent repo builds. In build 1662411, Roslyn failed with a sharing violation during Set-Content despite being passed -msbuildEngine dotnet. Related context: dotnet/fsharp#18432.
Validated the actual helper bodies with mocked VS discovery and file writes: all 14 cases pass, including dotnet, VS, unspecified-engine, missing-VS, and cached-MSBuild scenarios. Both original helpers fail the dotnet regression check. Windows execution remains for CI.