MSBuild ProjectReference item documentation

msbuild projectreference element
copylocallockfileassemblies
comfilereference
csproj reference private
msbuild properties
msbuild reference
csproj copy to output directory
msbuild item metadata

I cannot find documentation about ProjectReference tag in MSBuild projects. Where can I read detailed description of it?

Edit: I have a .vcxproj created by others. It contains ProjectReference item. ProjectReference contains subtags: Private, ReferenceOutputAssembly, CopyLocalSatelliteAssemblies, LinkLibraryDependencies, UseLibraryDependencyInputs. Where I can read about those tags? Which values can they contain? What other subtags can ProjectReference contain?

I have searched in MSDN and Google but have not found documentation pages, only discussions and documentation about other products, not MSBuild.


MSBuild ProjectReference item documentation, Starting from the MSBuild source code links that Jason Pyeron provided in his comment, I learned that when MSBuild prepares build  https://github.com/microsoft/msbuild/blob/master/documentation/ProjectReference-Protocol.md Would be useful to document things such as Targets , ReferenceOutputAssembly , OutputItemType , CopyToOutputDirectory etc.


You will notice that the ProjectReference element is a child of an ItemGroup element.

ItemGroups are a fully documented schema item thankfully. What you will find is that child elements of ItemGroups can by anything. Think of it as the name of a collection. That item within the ItemGroup can have "metadata" values.

For example,

<ItemGroup>
    <WindowsFiles Include="C:\Windows\*">
       <IsSystem>true</IsSystem>
    </WindowsFiles>
</ItemGroup>

This is defining an itemgroup called WindowsFiles. It essentially becomes a collection of files that match the Include attribute. All item group items have metadata built in - such as filename, extension, fullpath, directory, etc. but you can add your own - in this case IsSystem is an additional one.

Referencing item groups is done in one of two ways:

<Message Text="%(WindowsFiles.FullPath)"/>

<Message Text="@(WindowsFiles->'%(FullPath)')"/>

The latter is referred to as a transform which is more advanced. Best stick to the former until you get your head around ItemGroups or transforms just won't go in.

The ProjectReference itemgroup you are interested in will be processed by a targets file somewhere. As itemgroups are fairly arbitrary in what they are called, conceptually they are variables so it's how they get processed by the targets file that defines the usage.

Work your way up the files mentioned in the Import statements to see where the ProjectReference item group gets consumed.

c++ - MSBuild ProjectReference item documentation, Starting from the MSBuild source code links that Jason Pyeron provided in his comment, I learned that when MSBuild prepares build dependencies, it includes​  msbuild documentation: Common Item Types: ProjectReference. Parameter Details; Include (attribute): Path to project file: Project (metadata): Project GUID, in the form {00000000-0000-0000-0000-000000000000}


This web-page on MSDN seems to have some good information:

https://docs.microsoft.com/en-us/visualstudio/msbuild/common-msbuild-project-items?view=vs-2017

documentation/ProjectReference-Protocol.md, A ProjectReference defines a reference to another project. Parameters#. Parameter, Details. Include (attribute), Path to project file. Referenceand ProjectReference seem to be documented under Common MSBuild Project Items: <ProjectReference> Represents a reference to another project. Item Name Description ----- Name Project Package <Reference> Represents an assembly (managed) reference in the project. Item Name Description ----- HintPath Optional string.


msbuild, I cannot find documentation about ProjectReference tag in MSBuild projects. Where can I read detailed description of it? Edit: I have a .vcxproj created by others. You will notice that the ProjectReference element is a child of an ItemGroup element. ItemGroups are a fully documented schema item thankfully. What you will find is that child elements of ItemGroups can by anything. Think of it as the name of a collection. That item within the ItemGroup can have "metadata" values. For example,


MSBuild ProjectReference item documentation, 20 Sep 2012 An MSBuild script is an XML file with a root Project element that has supported in this context MSBuild ProjectReference item documentation This  The MSBuild syntax below will arrange to call that target, and set the NuProj Version property based on the version calculated by your existing target. The VersionDependsOn property is recognized by NuProj as a semicolon-delimited list of targets that must be run before assuming that the Version property has been set.


Msbuild reference element, Add additional metadata to <ProjectReference> items in MSBuild called "​Configuration" and "Platform" that default to the referencing project's  For more information about general project file syntax and reference, see the MSBuild project file documentation. Implicit package references Metapackages are implicitly referenced based on the target framework(s) specified in the <TargetFramework> or <TargetFrameworks> property of your project file.