Skip to content

Conversation

@YuliiaKovalova
Copy link
Member

No description provided.

Copilot AI review requested due to automatic review settings November 12, 2025 09:20
@YuliiaKovalova YuliiaKovalova requested review from a team and vijayrkn as code owners November 12, 2025 09:20
Copilot finished reviewing on behalf of YuliiaKovalova November 12, 2025 09:22
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 adds the Runtime="NET" attribute to all <UsingTask> elements across the SDK's MSBuild target and props files to explicitly specify that these tasks should run on the .NET runtime rather than .NET Framework.

  • Systematically adds Runtime="NET" to all UsingTask declarations across ~50 files
  • Maintains consistent formatting by keeping single-line declarations on one line and multi-line declarations properly indented
  • Minor whitespace fixes in a few files to ensure consistent indentation

Reviewed Changes

Copilot reviewed 50 out of 50 changed files in this pull request and generated no comments.

Show a summary per file
File Description
test/xunit-runner/XUnitRunner.targets Added Runtime="NET" to XUnit test runner tasks
src/WebSdk/Publish/Targets/TransformTargets/Microsoft.NET.Sdk.Publish.TransformFiles.targets Added Runtime="NET" to web publish transform tasks
src/WebSdk/Publish/Targets/PublishTargets/Microsoft.NET.Sdk.Publish.ZipDeploy.targets Added Runtime="NET" to ZIP deployment tasks
src/WebSdk/Publish/Targets/PublishTargets/Microsoft.NET.Sdk.Publish.OneDeploy.targets Added Runtime="NET" to OneDeploy tasks
src/WebSdk/Publish/Targets/PublishTargets/Microsoft.NET.Sdk.Publish.MSDeployPackage.targets Added Runtime="NET" to MSDeploy package tasks
src/WebSdk/Publish/Targets/PublishTargets/Microsoft.NET.Sdk.Publish.MSDeploy.targets Added Runtime="NET" to MSDeploy tasks
src/WebSdk/Publish/Targets/PublishTargets/Microsoft.NET.Sdk.Publish.Kudu.targets Added Runtime="NET" to Kudu deployment tasks
src/Tasks/sdk-tasks/sdk-tasks.InTree.targets Added Runtime="NET" to SDK build tasks
src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.PackageDependencyResolution.targets Added Runtime="NET" to package resolution tasks
src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Windows.targets Added Runtime="NET" to Windows-specific tasks
src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.TargetFrameworkInference.targets Added Runtime="NET" to framework inference tasks
src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.targets Added Runtime="NET" to core SDK tasks including Roslyn compiler tasks
src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.ImportWorkloads.targets Added Runtime="NET" to workload tasks
src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.FrameworkReferenceResolution.targets Added Runtime="NET" to framework reference resolution tasks
src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.DefaultItems.Shared.targets Added Runtime="NET" to default item processing tasks
src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.Common.targets Added Runtime="NET" to common SDK tasks
src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.RuntimeIdentifierInference.targets Added Runtime="NET" to RID inference tasks
src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Publish.targets Added Runtime="NET" to publish-related tasks
src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.PreserveCompilationContext.targets Added Runtime="NET" to compilation context tasks
src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.PackTool.targets Added Runtime="NET" to pack tool tasks
src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.PackProjectTool.props Added Runtime="NET" to project tool tasks
src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.GenerateSupportedRuntime.targets Added Runtime="NET" to runtime generation tasks
src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.GenerateGlobalUsings.targets Added Runtime="NET" to global usings generation tasks
src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.CrossGen.targets Added Runtime="NET" to ReadyToRun compilation tasks
src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.ConflictResolution.targets Added Runtime="NET" to conflict resolution tasks
src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.ComposeStore.targets Added Runtime="NET" to runtime store composition tasks
src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.ApiCompat.Common.targets Added Runtime="NET" to API compatibility tasks
src/Tasks/Microsoft.NET.Build.Extensions.Tasks/msbuildExtensions/Microsoft/Microsoft.NET.Build.Extensions/Microsoft.NET.Build.Extensions.NETFramework.targets Added Runtime="NET" to .NET Framework extension tasks
src/Tasks/Microsoft.NET.Build.Extensions.Tasks/msbuildExtensions/Microsoft/Microsoft.NET.Build.Extensions/Microsoft.NET.Build.Extensions.ConflictResolution.targets Added Runtime="NET" to extension conflict resolution tasks
src/StaticWebAssetsSdk/Targets/Microsoft.NET.Sdk.StaticWebAssets.targets Added Runtime="NET" to static web assets tasks
src/StaticWebAssetsSdk/Targets/Microsoft.NET.Sdk.StaticWebAssets.ServiceWorker.targets Added Runtime="NET" to service worker tasks
src/StaticWebAssetsSdk/Targets/Microsoft.NET.Sdk.StaticWebAssets.ScopedCss.targets Added Runtime="NET" to scoped CSS tasks
src/StaticWebAssetsSdk/Targets/Microsoft.NET.Sdk.StaticWebAssets.ScopedCss.5_0.targets Added Runtime="NET" to 5.0 scoped CSS tasks, fixed indentation
src/StaticWebAssetsSdk/Targets/Microsoft.NET.Sdk.StaticWebAssets.Pack.targets Added Runtime="NET" to static web assets pack tasks
src/StaticWebAssetsSdk/Targets/Microsoft.NET.Sdk.StaticWebAssets.Pack.CrossTargeting.targets Added Runtime="NET" to cross-targeting pack tasks
src/StaticWebAssetsSdk/Targets/Microsoft.NET.Sdk.StaticWebAssets.JSModules.targets Added Runtime="NET" to JS module tasks
src/StaticWebAssetsSdk/Targets/Microsoft.NET.Sdk.StaticWebAssets.HtmlAssetPlaceholders.targets Added Runtime="NET" to HTML placeholder tasks
src/StaticWebAssetsSdk/Targets/Microsoft.NET.Sdk.StaticWebAssets.Compression.targets Added Runtime="NET" to compression tasks
src/StaticWebAssetsSdk/Targets/Microsoft.NET.Sdk.StaticWebAssets.5_0.targets Added Runtime="NET" to 5.0 static web assets tasks, fixed indentation
src/RazorSdk/Targets/Microsoft.NET.Sdk.Razor.SourceGenerators.targets Added Runtime="NET" to Razor source generator tasks
src/RazorSdk/Targets/Microsoft.NET.Sdk.Razor.MvcApplicationPartsDiscovery.targets Added Runtime="NET" to MVC parts discovery tasks
src/RazorSdk/Targets/Microsoft.NET.Sdk.Razor.CodeGeneration.targets Added Runtime="NET" to Razor code generation tasks
src/Layout/redist/targets/GeneratePackagePruneData.targets Added Runtime="NET" to package prune data tasks
src/Layout/redist/MSBuildImports/Current/Microsoft.Common.CrossTargeting.targets/ImportAfter/Microsoft.TestPlatform.CrossTargeting.targets Added Runtime="NET" to test platform tasks
src/Containers/packaging/build/Microsoft.NET.Build.Containers.props Added Runtime="NET" to container build tasks
src/Compatibility/GenAPI/Microsoft.DotNet.GenAPI.Task/build/Microsoft.DotNet.GenAPI.Task.targets Added Runtime="NET" to GenAPI tasks
src/BuiltInTools/dotnet-watch/Watch/DotNetWatch.targets Added Runtime="NET" to dotnet-watch tasks
src/BlazorWasmSdk/Targets/Microsoft.NET.Sdk.BlazorWebAssembly.ServiceWorkerAssetsManifest.5_0.targets Added Runtime="NET" to Blazor service worker tasks
src/BlazorWasmSdk/Targets/Microsoft.NET.Sdk.BlazorWebAssembly.6_0.targets Added Runtime="NET" to Blazor 6.0 tasks
src/BlazorWasmSdk/Targets/Microsoft.NET.Sdk.BlazorWebAssembly.5_0.targets Added Runtime="NET" to Blazor 5.0 tasks

@ViktorHofer
Copy link
Member

Doesn't this also need the TaskHostFactory attribute so that they are forced to run out-of-proc for desktop msbuild?

@YuliiaKovalova
Copy link
Member Author

Doesn't this also need the TaskHostFactory attribute so that they are forced to run out-of-proc for desktop msbuild?

not anymore, we mitigated it in scope of: dotnet/msbuild#12642

@ViktorHofer
Copy link
Member

nice

@jaredpar
Copy link
Member

What is the impact of this change?

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants