Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 18, 2026

The ProjectReference MSBuild item was undocumented despite having the same Aliases attribute support as the Reference item. This adds complete documentation for ProjectReference including its Aliases metadata.

Changes

  • Added ProjectReference section to MSBuild items documentation
  • Documented Aliases metadata for setting extern aliases on project references
  • Added XML and C# examples showing multi-version library references

Example Usage

<ItemGroup>
  <ProjectReference Include="..\MyLibraryV1\MyLibrary.csproj" Aliases="LibV1" />
  <ProjectReference Include="..\MyLibraryV2\MyLibrary.csproj" Aliases="LibV2" />
</ItemGroup>
extern alias LibV1;
extern alias LibV2;

var instanceV1 = new LibV1::MyNamespace.MyClass();
var instanceV2 = new LibV2::MyNamespace.MyClass();

The documentation follows the existing pattern used for PackageReference and FrameworkReference items.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • learn.microsoft.com
    • Triggering command: /usr/bin/curl curl -s REDACTED ./docs/framework/data/adonet/sql/linq/find-the-maximum-value-in-a-numeric-sequence.md ./docs/framework/data/adonet/sql/linq/how-to-return-rowsets.md ./docs/framework/data/adonet/sql/linq/eliminate-duplicate-elements-from-a-sequence.md ethod.md ./docs/framework/data/adonet/sql/linq/how-to-generate-the-object-model-in-visual-basic-or-csharp.md -method.md ntertype-method.md (dns block)
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node /home/REDACTED/work/_temp/ghcca-node/node/bin/node --enable-source-maps /home/REDACTED/work/_temp/copilot-developer-action-main/dist/index.js (dns block)

If you need me to access, download, or install something from one of these locations, you can either:


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: agocke <515774+agocke@users.noreply.github.com>
Co-authored-by: agocke <515774+agocke@users.noreply.github.com>
Copilot AI changed the title [WIP] Add documentation for Aliases attribute in ProjectReference Add ProjectReference documentation with Aliases attribute Jan 18, 2026
Copilot AI requested a review from agocke January 18, 2026 02:30
@agocke
Copy link
Member

agocke commented Jan 21, 2026

Copy link
Contributor Author

Copilot AI commented Jan 21, 2026

@copilot the file I'd like to update is https://learn.microsoft.com/en-us/visualstudio/msbuild/common-msbuild-project-items?view=visualstudio

The file you mentioned is in a different repository (MicrosoftDocs/visualstudio-docs), not in this dotnet/docs repository. The current PR updates the .NET SDK MSBuild documentation at /docs/core/project-sdk/msbuild-props.md.

To update the Visual Studio MSBuild documentation at https://github.com/MicrosoftDocs/visualstudio-docs/blob/main/docs/msbuild/common-msbuild-project-items.md, I would need access to that repository. Should I create a separate PR in the visualstudio-docs repository, or would you like me to modify a different file in this repository?

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.

2 participants