Skip to content

Conversation

@ViktorHofer
Copy link
Member

@dotnet-policy-service
Copy link
Contributor

Tagging subscribers to this area: @dotnet/runtime-infrastructure
See info in area-owners.md if you want to be subscribed.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR resolves file locking issues with MSBuild tasks by adopting TaskHostFactory and simplifies the tasks build process by removing .NET Framework support and custom incremental build logic.

  • Removes complex incremental build logic that used synthetic inputs/outputs to avoid file locks
  • Standardizes all MSBuild task invocations to use TaskHostFactory with Runtime="NET"
  • Simplifies task projects to only target .NET Core (removing .NET Framework multi-targeting)
  • Removes the RegenerateDownloadTable task and associated infrastructure which was no longer needed

Reviewed changes

Copilot reviewed 18 out of 18 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/tasks/tasks.proj Removed the BuildIncrementally target and GetTasksSrc logic that implemented custom incremental build behavior
src/tasks/installer.tasks/installer.tasks.csproj Changed to target only NetCoreAppToolCurrent, reverted NuGet.Packaging to use PackageDownloadAndReference for net8.0
src/tasks/installer.tasks/RegenerateDownloadTable.cs Deleted entire RegenerateDownloadTable task class (198 lines)
src/tasks/WasmAppBuilder/WasmAppBuilder.csproj Updated to target only NetCoreAppToolCurrent, changed UsingTask to use $(TargetPath) and added Runtime="NET" with TaskHostFactory
src/tasks/Directory.Build.targets Added condition to exclude 'tasks' project from package references, reordered condition clauses
src/tasks/Crossgen2Tasks/Crossgen2Tasks.csproj Reverted from PackageReference to PackageDownloadAndReference for NuGet packages targeting net8.0
src/native/libs/build-native.proj Changed from Traversal to NoTargets SDK, added AndroidAppBuilder project reference, updated UsingTask with TaskHostFactory and DependsOnTargets
src/mono/sample/Directory.Build.targets Added Runtime="NET" attribute to GenerateRunScript UsingTask
src/libraries/pretest.proj Added installer.tasks project reference and Runtime="NET" TaskFactory="TaskHostFactory" to two UsingTask declarations
src/libraries/Microsoft.NETCore.Platforms/src/Microsoft.NETCore.Platforms.csproj Changed to single TargetFramework, simplified package references, updated UsingTask to use $(TargetPath) with Runtime="NET" TaskHostFactory
eng/testing/tests.targets Added Runtime="NET" TaskFactory="TaskHostFactory" to GenerateRunScript UsingTask
eng/testing/bump-chrome-version.proj Converted to NoTargets SDK with project reference and proper target dependencies, added TaskHostFactory
eng/regenerate-third-party-notices.proj Added installer.tasks project reference, added Runtime="NET" TaskFactory="TaskHostFactory" and DependsOnTargets
eng/regenerate-download-table.proj Deleted entire project file (44 lines) for regenerating the download table
eng/Subsets.props Removed 'regeneratedownloadtable' from AllSubsetsExpansion and removed the entire RegenerateDownloadTable subset definition and ProjectToBuild section
docs/project/dogfooding.md Removed the "Daily builds table" section with all platform download links (220 lines)
Directory.Build.props Simplified InstallerTasksAssemblyPath to single line targeting only NetCoreAppToolCurrent
Build.proj Moved tasks.proj to always build as ProjectReference, removed BuildLocalTasks target with custom MSBuild invocation

ViktorHofer and others added 2 commits December 13, 2025 13:48
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

<PropertyGroup>
<TargetFrameworks>$(NetCoreAppToolCurrent);$(NetFrameworkToolCurrent)</TargetFrameworks>
<TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we apply the same change in Microsoft.NET.HostModel.csproj (for net11.0), or is it too early?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only when Microsoft.NET.Build.Tasks switched to be core only. We are investigating the perf impact of that.

</AndroidLibBuilderTask>
</Target>

<Target Name="BinPlaceNative" AfterTargets="BuildNativeUnix;BuildNativeWindows">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should it be named GetBinPlaceItems (referenced in arcade)?

Suggested change
<Target Name="BinPlaceNative" AfterTargets="BuildNativeUnix;BuildNativeWindows">
<Target Name="GetBinPlaceItems" AfterTargets="BuildNativeUnix;BuildNativeWindows">

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

runtime repo fails to build inside the VMR locally on Windows

5 participants