Use TaskHostFactory to resolve file lock issues and simplify tasks build#122525
Merged
ViktorHofer merged 5 commits intomainfrom Dec 14, 2025
Merged
Use TaskHostFactory to resolve file lock issues and simplify tasks build#122525ViktorHofer merged 5 commits intomainfrom
ViktorHofer merged 5 commits intomainfrom
Conversation
Contributor
|
Tagging subscribers to this area: @dotnet/runtime-infrastructure |
Contributor
There was a problem hiding this comment.
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 |
Co-authored-by: Copilot <[email protected]>
hoyosjs
approved these changes
Dec 13, 2025
This was referenced Dec 13, 2025
am11
reviewed
Dec 13, 2025
src/libraries/Microsoft.NETCore.Platforms/src/Microsoft.NETCore.Platforms.csproj
Show resolved
Hide resolved
steveisok
approved these changes
Dec 13, 2025
am11
reviewed
Dec 13, 2025
Member
Author
|
/ba-g slow mac |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Fixes dotnet/dotnet#3875