Skip to content

[release/10.0.3xx] Source code updates from dotnet/msbuild#5204

Merged
dotnet-maestro[bot] merged 17 commits intorelease/10.0.3xxfrom
darc-release/10.0.3xx-bcec7156-08b3-48ce-bc2a-26f2e72cde5f
Mar 9, 2026
Merged

[release/10.0.3xx] Source code updates from dotnet/msbuild#5204
dotnet-maestro[bot] merged 17 commits intorelease/10.0.3xxfrom
darc-release/10.0.3xx-bcec7156-08b3-48ce-bc2a-26f2e72cde5f

Conversation

@dotnet-maestro
Copy link
Copy Markdown
Contributor

@dotnet-maestro dotnet-maestro bot commented Mar 3, 2026

Note

This is a codeflow update. It may contain both source code changes from
the source repo
as well as dependency updates. Learn more here.

This pull request brings the following source code changes

From https://github.com/dotnet/msbuild

Diff the source with this PR branch
darc vmr diff --name-only https://github.com/dotnet/msbuild:6500dd278aed2749db445942790934e3c0d8c729..https://github.com/dotnet/dotnet:darc-release/10.0.3xx-bcec7156-08b3-48ce-bc2a-26f2e72cde5f

@dotnet-maestro
Copy link
Copy Markdown
Contributor Author

dotnet-maestro bot commented Mar 3, 2026

Note

PRs from original repository included in this codeflow update:

💡 You may consult the FAQ for more information or tag @dotnet/prodconsvcs for assistance.

@dotnet-policy-service dotnet-policy-service bot requested a review from a team March 3, 2026 20:53
Adds SDK layout and installer support for the MSBuild apphost,
following the same pattern as the Roslyn apphost changes (#3180).

Changes:
- Define _MSBuildAppHost item in Directory.Build.props
- Add CreateMSBuildAppHost target in GenerateLayout.targets
  (CreateAppHost, COM .tlb copy on Windows, codesign on macOS)
- Add MSBuild apphost chmod in ChmodPublishDir and Crossgen targets
- Add macOS signing config for MSBuild apphost in Signing.props
- Add msbuild-entitlements.plist for macOS codesigning
- Add Microsoft.Build.Framework.tlb binary for Windows COM support
- Allow .tlb in allowed-vmr-binaries.txt

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@YuliiaKovalova YuliiaKovalova requested review from a team as code owners March 4, 2026 09:20
@dotnet-policy-service dotnet-policy-service bot requested a review from a team March 4, 2026 09:20
@YuliiaKovalova
Copy link
Copy Markdown
Member

@dotnet/msbuild this PR contains changes for installer to distribute AppHost, inspired by #3180

@dotnet-policy-service dotnet-policy-service bot requested a review from a team March 4, 2026 14:02
@YuliiaKovalova YuliiaKovalova force-pushed the darc-release/10.0.3xx-bcec7156-08b3-48ce-bc2a-26f2e72cde5f branch 3 times, most recently from 4ce982f to b06eff0 Compare March 4, 2026 16:05
@dotnet-maestro
Copy link
Copy Markdown
Contributor Author

dotnet-maestro bot commented Mar 4, 2026

Note

PRs from original repository included in this codeflow update:

💡 You may consult the FAQ for more information or tag @dotnet/prodconsvcs for assistance.

@ViktorHofer
Copy link
Copy Markdown
Member

ViktorHofer commented Mar 4, 2026

Just as a general note: Never force push into a dependency flow PR. This can cause issues with Maestro.

@JanProvaznik
Copy link
Copy Markdown
Member

JanProvaznik commented Mar 5, 2026

@ViktorHofer The TFM compat warning added in dotnet/msbuild#13187 (eng/packaging.targets) is breaking the SDK build in this codeflow PR on both Linux x64 and Windows x86.

What happens: MSBuild 18.6.0-ci packages now include buildTransitive/netcoreapp2.0/*.targets that emit a <Warning> when consumed by projects targeting <
net10.0 (the LatestDotNetCoreForMSBuild). Three SDK projects multi-target to net8.0 via $(NetToolMinimum) and reference MSBuild packages at compile-time (
ExcludeAssets="Runtime"). Since SDK builds with TreatWarningsAsErrors=True, these warnings become errors:

  • src/sdk/src/Compatibility/ApiCompat/Microsoft.DotNet.ApiCompat.Task.csproj::TargetFramework=net8.0
  • src/sdk/src/Compatibility/GenAPI/Microsoft.DotNet.GenAPI.Task.csproj::TargetFramework=net8.0
  • src/sdk/test/HelixTasks/HelixTasks.csproj::TargetFramework=net8.0

Why main is unaffected: On main, Arcade bumped NetMinimum to net10.0 and removed NetToolMinimum. The SDK projects there use $(NetMinimum) = net10.0, which
matches buildTransitive/net10.0/. — no warning fires. On release/10.0.3xx, Arcade still defines NetToolMinimum = net8.0 for these shipping tooling
packages.

Question: Was this intended to catch a real issue with these packages, or is this a misfire for VMR-intermediate packages? If the latter, the cleanest fix seems to be conditioning the target on '$(DotNetBuild)' != 'true' in packaging.targets (similar to the existing NU5104 suppression in MSBuild's Directory.Build.props), since VMR-produced MSBuild packages are never published to NuGet. Do you think this analysis is relevant and the appropriate path forward?

@ViktorHofer
Copy link
Copy Markdown
Member

I will take a look later today. This is a weird situation due to the dual check-in of msbuild. The warnings are appropriate in 11.0 but in 10.0.3xx, dependencies still target net8.0 which conflict with the minimum supported TFM in the msbuild repo.

@dotnet-maestro
Copy link
Copy Markdown
Contributor Author

dotnet-maestro bot commented Mar 5, 2026

Note

PRs from original repository included in this codeflow update:

💡 You may consult the FAQ for more information or tag @dotnet/prodconsvcs for assistance.

YuliiaKovalova and others added 3 commits March 5, 2026 16:14
TryFromMSBuildAppHost and TryFromAppContextBaseDirectory now check
IsRunningInMSBuildExe before using the MSBuild apphost as the current
MSBuild executable. Without this, worker nodes get launched via the
apphost, changing Environment.ProcessPath to the SDK directory where
dotnet is not present, breaking Process.Start("dotnet") resolution
in tasks like VSTestTask.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
[[ commit created by automation ]]
@dotnet-maestro
Copy link
Copy Markdown
Contributor Author

dotnet-maestro bot commented Mar 5, 2026

Note

PRs from original repository included in this codeflow update:

💡 You may consult the FAQ for more information or tag @dotnet/prodconsvcs for assistance.

@dotnet-maestro
Copy link
Copy Markdown
Contributor Author

dotnet-maestro bot commented Mar 5, 2026

Note

PRs from original repository included in this codeflow update:

💡 You may consult the FAQ for more information or tag @dotnet/prodconsvcs for assistance.

@dotnet-maestro
Copy link
Copy Markdown
Contributor Author

dotnet-maestro bot commented Mar 6, 2026

Note

PRs from original repository included in this codeflow update:

💡 You may consult the FAQ for more information or tag @dotnet/prodconsvcs for assistance.

@dotnet-maestro
Copy link
Copy Markdown
Contributor Author

dotnet-maestro bot commented Mar 6, 2026

Note

PRs from original repository included in this codeflow update:

💡 You may consult the FAQ for more information or tag @dotnet/prodconsvcs for assistance.

YuliiaKovalova and others added 2 commits March 9, 2026 10:51
…ing in binary

- Remove checked-in .tlb binary from sdk Layout; generate at build time
  via tlbexp.exe during net472 build (CreateTypeLib target)
- Unified tlbexp.exe resolution: registry-based lookup with hardcoded
  fallback, works on both desktop and Core MSBuild (no MSBuildRuntimeType branching)
- Generate both x86 and x64 type libraries in all builds
  (the .tlb ships in both Visual Studio and the .NET SDK on Windows)
- Enable CreateTlb in VMR Windows builds (DotNetBuildSourceOnly != true)
- Include .tlb in Microsoft.Build.Framework NuGet package (lib/net472/)
- SDK layout copies .tlb from NuGet package cache with Exists() guard

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…per workaround

VSTestTask: Use DOTNET_HOST_PATH environment variable (set by the SDK) to
resolve the dotnet host path, with PATH search as fallback. This is the
proper fix for the 'dotnet not found' error that occurs when MSBuild runs
via the apphost and Environment.ProcessPath changes to the SDK directory.

BuildEnvironmentHelper: Revert the IsRunningInMSBuildExe guard in
TryFromMSBuildAppHost and the context-aware logic in
TryFromAppContextBaseDirectory. These were workarounds for the same issue
and are no longer needed now that VSTestTask resolves dotnet properly.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@dotnet-policy-service dotnet-policy-service bot requested a review from a team March 9, 2026 09:52
@YuliiaKovalova
Copy link
Copy Markdown
Member

After the final look from @rainersigwald , it's ready to go.

@dotnet-maestro dotnet-maestro bot merged commit 83ebffa into release/10.0.3xx Mar 9, 2026
13 checks passed
@dotnet-maestro dotnet-maestro bot deleted the darc-release/10.0.3xx-bcec7156-08b3-48ce-bc2a-26f2e72cde5f branch March 9, 2026 13:28
@dotnet-policy-service dotnet-policy-service bot requested a review from a team March 9, 2026 13:28
@YuliiaKovalova
Copy link
Copy Markdown
Member

the PR contains installer changes for dotnet/msbuild#12995

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.

4 participants