Skip to content

Refit dependency is added when the dependency is already met in a Transient package reference #941

Open
@dammitjanet

Description

@dammitjanet

Describe the bug
I have a project where I already have Refit 7.0.0 as a transient package reference from including Refit.HttpClientFactory (although almost nay other package or project could theoretically also bring Refit into the transient dependency list), but every time I regenerate the code from the .refitter file, Refit is re-added and there is no need to.

Support Key: ecbee24

To Reproduce
Steps to reproduce the behavior:

  1. Create a project
  2. Add Refit.HttpClientFactory as a package reference
  3. Add a refitter file and generate
  4. remove the Refit 7.0.0 package reference
  5. Right click the .refitter file and 'Generate Refitter output'

Expected behavior
The tool to recognise that the Refit dependency is already met and not add it explicitly

Screenshots
n/a

Visual Studio Extension (please complete the following information):

  • Visual Studio Version: 2022, 17.10.2
  • REST API Client Code Generator: 1.10.3

Additional context
This is quite a low priority issue, but I expect it can also happen with any of the other code generators not just Refit.

Metadata

Metadata

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions