Skip to content

Changes needed to microsoft.extensions.apidescription.client targets and props files to work in Visual Studio #10789

Closed
@BillHiebert

Description

@BillHiebert

Describe the bug

  1. Add AvailableItemName Items for OpenApiReference and OpenApiReferenceProject. Without these CPS doesn’t allow me to add items with this type. I manually modified the Microsoft.Extensions.ApiDescription.Client.props file with:
 <!--
    Well-known metadata of the code generator item groups.
  -->
  <ItemGroup>
    <AvailableItemName Include="OpenApiReference" />
    <AvailableItemName Include="OpenApiProjectReference" />
  </ItemGroup>
  1. We really need xaml rules defined for these item types. This provides a mechamism to be notified when a property on one of these items changes, and provides F4 (property grid) support for defined properties. CPS auto-generates properties from the rules files and makes them available in the property gird – this allows the customer to change values we don’t specifically have UI for. I created a placeholder file to test it out and wired it in by add a “tools” target file (see attached files, renamed with .txt). I imported the “tools” targets from the *.client.targets as follows:
  <!-- OpenApiProjectReference support. -->

  <Import Project ="$(MSBuildThisFileDirectory)Microsoft.Extensions.ApiDescription.Client.Tools.targets" Condition="Exists('$(MSBuildThisFileDirectory)Microsoft.Extensions.ApiDescription.Client.Tools.targets')" />
  <ItemGroup>
    <!--

Microsoft.Extensions.ApiDescription.Client.Tools.targets.txt
OpenApiItemsSchema.xaml.txt

Metadata

Metadata

Assignees

Labels

DoneThis issue has been fixedarea-mvcIncludes: MVC, Actions and Controllers, Localization, CORS, most templatestask

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions