aspnetcore icon indicating copy to clipboard operation
aspnetcore copied to clipboard

Fix up packaging for Extensions.ApiDescription.Server

Open captainsafia opened this issue 3 years ago • 4 comments

Description

This change fixes up the package of dependencies for the dotnet-getdocument tool to enable changes that were made to support minimal APIs in .NET 7.

  • Publish GetDocument.Insider dependency for all .NET Core TFMs
  • Use targeted referenced to shared runtime dependencies in GetDocument.Insider
  • Add .NET 7 outputs to ApiDescription.Server package.

Fixes https://github.com/dotnet/aspnetcore/issues/44119

Customer Impact

Without this bug fix, customers are not able to leverage client generation for ASP.NET apps in Visual Studio for .NET 7 applications. There are no accessible workarounds for this bug.

Regression?

  • [X] Yes
  • [ ] No

Regression from .NET 7 RC 1. The bug is present in .NET 7 RC 2 and this PR is targeting .NET 7 RC2.

Risk

  • [ ] High
  • [ ] Medium
  • [X] Low

Change is localized to Extensions.ApiDescription.Server.

Verification

  • [X] Manual (required)

Manual validation was completed by adding a reference to the local package output directory aspnetcore\artifacts\packages\Debug\Shipping and using the 7.0.0-dev version of the Microsoft.Extensions.ApiDescription.Server package in a sample project.

<Project Sdk="Microsoft.NET.Sdk.Web">

  <PropertyGroup>
    <TargetFramework>net7.0</TargetFramework>
    <Nullable>enable</Nullable>
    <ImplicitUsings>enable</ImplicitUsings>
    <OpenApiGenerateDocumentsOnBuild>true</OpenApiGenerateDocumentsOnBuild>
  </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="Swashbuckle.AspNetCore" Version="6.4.0" />
    <PackageReference Include="Microsoft.Extensions.ApiDescription.Server" Version="7.0.0-dev" PrivateAssets="all" />
    <PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="7.0.0-*" PrivateAssets="all" />
  </ItemGroup>

</Project>

  • [ ] Automated

Packaging changes reviewed?

  • [X] Yes
  • [ ] No
  • [ ] N/A

captainsafia avatar Sep 22 '22 23:09 captainsafia

Hi @captainsafia. Please make sure you've updated the PR description to use the Shiproom Template. Also, make sure this PR is not marked as a draft and is ready-to-merge.

To learn more about how to prepare a servicing PR click here.

ghost avatar Sep 22 '22 23:09 ghost

This has been approved for RC2. @dougbu, @mmitche I'll let you decide if you want to wait till all the checks pass, or merge it without waiting - to save time.

mkArtakMSFT avatar Sep 23 '22 00:09 mkArtakMSFT

I'll let you decide if you want to wait till all the checks pass, or merge it without waiting - to save time.

@mmitche, because the tests don't really cover this change, I'm 🆗 w/ merging when only the "Helix x64" job is going as long as @captainsafia has confirmed the ApiDescription.Server package contains the right bits when building this branch or the equivalent release/7.0 change. @captainsafia❔

dougbu avatar Sep 23 '22 00:09 dougbu

I'll let you decide if you want to wait till all the checks pass, or merge it without waiting - to save time.

@mmitche, because the tests don't really cover this change, I'm 🆗 w/ merging when only the "Helix x64" job is going as long as @captainsafia has confirmed the ApiDescription.Server package contains the right bits when building this branch or the equivalent release/7.0 change. @captainsafia❔

Yep, I verified the package contents out of a dev build as described in the manual validation section above.

captainsafia avatar Sep 23 '22 01:09 captainsafia

Template tests have failed again, so I've requested a re-run of failed jobs. @mmitche based on what @captainsafia said above, I'd suggest we take this without waiting for the build.

mkArtakMSFT avatar Sep 23 '22 01:09 mkArtakMSFT

@mmitche shows as away. I'm going to merge this at this point, given that tactics approved it.

mkArtakMSFT avatar Sep 23 '22 02:09 mkArtakMSFT