From a66b38c2e558148d996f6decb7e10588d988f441 Mon Sep 17 00:00:00 2001 From: Forgind <12969783+Forgind@users.noreply.github.com> Date: Mon, 3 Apr 2023 14:25:01 -0700 Subject: [PATCH 1/2] Clarify what .default means .default (in MSBuild code) followed an earlier spec that referred to it as and omitted some details. This clarifies the meaning of .default. --- documentation/specs/static-graph.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/documentation/specs/static-graph.md b/documentation/specs/static-graph.md index 99bceac17ab..242adae886c 100644 --- a/documentation/specs/static-graph.md +++ b/documentation/specs/static-graph.md @@ -223,11 +223,13 @@ A project reference protocol may contain multiple targets, for example `A -> B, The common project reference protocols (Build, Rebuild, Restore, Clean) will be specified by the common props and targets file in the msbuild repository. Other SDKs can implement their own protocols (e.g. ASPNET implementing Publish). +For this section and the remainder of this spec, a project's default target(s) (what it would execute if no other targets are specified, so often Build but configurable via DefaultTargets) will be referred to as ``. In MSBuild code, since angle brackets are difficult to use, it will instead use `.default` to indicate the default target. + Here are the rules for the common protocols: `Build -> GetTargetFrameworks, , GetNativeManifest, GetCopyToOutputDirectoryItems` -The default target (represented in this spec's pseudo protocol representation as ``) is resolved for each project. +`` is resolved for each project. `Clean -> GetTargetFrameworks, Clean` From 7d9213c5f96a630e7f805d8650174cd09f343ada Mon Sep 17 00:00:00 2001 From: Forgind <12969783+Forgind@users.noreply.github.com> Date: Mon, 3 Apr 2023 14:29:45 -0700 Subject: [PATCH 2/2] Replace with .default --- documentation/specs/static-graph.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/documentation/specs/static-graph.md b/documentation/specs/static-graph.md index 242adae886c..1ad0c954695 100644 --- a/documentation/specs/static-graph.md +++ b/documentation/specs/static-graph.md @@ -223,17 +223,17 @@ A project reference protocol may contain multiple targets, for example `A -> B, The common project reference protocols (Build, Rebuild, Restore, Clean) will be specified by the common props and targets file in the msbuild repository. Other SDKs can implement their own protocols (e.g. ASPNET implementing Publish). -For this section and the remainder of this spec, a project's default target(s) (what it would execute if no other targets are specified, so often Build but configurable via DefaultTargets) will be referred to as ``. In MSBuild code, since angle brackets are difficult to use, it will instead use `.default` to indicate the default target. +For this section and the remainder of this spec, a project's default target(s) (what it would execute if no other targets are specified, so often Build but configurable via DefaultTargets) will be referred to as `.default`. That is also how it is used in MSBuild code. Here are the rules for the common protocols: -`Build -> GetTargetFrameworks, , GetNativeManifest, GetCopyToOutputDirectoryItems` +`Build -> GetTargetFrameworks, .default, GetNativeManifest, GetCopyToOutputDirectoryItems` -`` is resolved for each project. +`.default` is resolved for each project. `Clean -> GetTargetFrameworks, Clean` -`Rebuild -> GetTargetFrameworks, Clean, , GetNativeManifest, GetCopyToOutputDirectoryItems` +`Rebuild -> GetTargetFrameworks, Clean, .default, GetNativeManifest, GetCopyToOutputDirectoryItems` `Rebuild` actually calls `Clean` and `Build`, which in turn uses the concatenation of the `Clean` and `Build` mappings. `GetTargetFrameworks` is repeated so only the first call to it remains in the final target list.