Skip to content

Commit 653a633

Browse files
committed
Clarify ProjectReference Targets metadata
This metadata influences the way MSBuild's ResolveProjectReferences calls the referenced project, but another system can build referenced projects in other ways--and VS does.
1 parent c9884a7 commit 653a633

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/msbuild/common-msbuild-project-items.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ Represents a reference to another project. `ProjectReference` items are transfor
8181
|SetPlatform|Optional string. Sets the global property `Platform` for the referenced project, for example `Platform=AnyCPU`.|
8282
|SetTargetFramework|Optional string. Sets the global property `TargetFramework` for the referenced project, for example `TargetFramework=netstandard2.0`.|
8383
|SkipGetTargetFrameworkProperties|Optional boolean. If `true`, builds the referenced project without negotiating the most compatible `TargetFramework` value. Defaults to `false`.|
84-
|Targets|Optional `string[]`. Semicolon separated list of targets in the referenced projects that should be built. Default is the value of `$(ProjectReferenceBuildTargets)`, which defaults to empty, indicating the default targets.|
84+
|Targets|Optional `string[]`. Semicolon separated list of targets in the referenced projects that should be built. Default is the value of `$(ProjectReferenceBuildTargets)`, which defaults to empty, indicating the default targets. When building in Visual Studio (as opposed to `MSBuild.exe` or `dotnet build`), specifying this does not prevent Visual Studio from building the default targets of the referenced project.|
8585

8686
> [!NOTE]
8787
> There is a difference between how project references work between .NET Framework and .NET Core (including .NET 5 and later). In .NET Framework projects, project references aren't transitive. That is, if Project1 references Project2, and Project2 references Project3, you can't code against Project3 from Project1. However, in .NET Core (including .NET 5 and later), project references *are* transitive. You can code against Project3 in Project1.

0 commit comments

Comments
 (0)