<?xml version="1.0" encoding="utf-8"?>
<!-- Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license. See the LICENSE.md file in the project root for more information. -->
<Rule Name="PackageReference"
      Description="Package Reference Properties"
      DisplayName="Package Reference"
      PageTemplate="generic"
      xmlns="http://schemas.microsoft.com/build/2009/properties">
  <Rule.DataSource>
    <DataSource HasConfigurationCondition="False"
                ItemType="PackageReference"
                Persistence="ProjectFile"
                SourceOfDefaultValue="AfterContext" />
  </Rule.DataSource>

  <StringListProperty Name="Aliases"
                      Description="A comma-delimited list of aliases to assembly references contained in this package."
                      DisplayName="Aliases"
                      Separator="," />

  <StringProperty Name="ExcludeAssets"
                  Description="Assets to exclude from this reference."
                  DisplayName="Excluded Assets" />

  <BoolProperty Name="GeneratePathProperty"
                Description="Indicates whether to generate an MSBuild property with the location of the package's root directory. The generated property name is in the form of 'Pkg[PackageID]', where '[PackageID]' is the ID of the package with any periods '.' replaced with underscores '_'."
                DisplayName="Generate Path Property" />

  <StringProperty Name="IncludeAssets"
                  Description="Assets to include from this reference."
                  DisplayName="Included Assets" />

  <StringProperty Name="IsImplicitlyDefined"
                  ReadOnly="True"
                  Visible="False" />

  <StringProperty Name="Name"
                  ReadOnly="True"
                  DisplayName="Name">
    <StringProperty.DataSource>
      <DataSource PersistedName="{}{Identity}"
                  SourceOfDefaultValue="AfterContext" />
    </StringProperty.DataSource>
  </StringProperty>

  <StringProperty Name="NoWarn"
                  Description="Comma-delimited list of warnings that should be suppressed for this package."
                  DisplayName="Suppress Warnings" />

  <!-- NOTE this property will never be populated for unresolved items, but is included to make the UI consistent -->
  <StringProperty Name="Path"
                  Description="Location of the package being referenced."
                  DisplayName="Path"
                  ReadOnly="True" />

  <StringProperty Name="PrivateAssets"
                  Description="Assets that are private in this reference."
                  DisplayName="Private Assets" />

  <StringProperty Name="Version"
                  Description="Version of dependency."
                  DisplayName="Version"
                  ReadOnly="True">
    <StringProperty.DataSource>
      <DataSource PersistenceStyle="Attribute"
                  SourceOfDefaultValue="AfterContext" />
    </StringProperty.DataSource>
  </StringProperty>

  <BoolProperty Name="Visible"
                ReadOnly="True"
                Visible="False" />

  <BoolProperty Name="TreatAsUsed"
                ReadOnly="True"
                Visible="False" />

</Rule>
