-
Notifications
You must be signed in to change notification settings - Fork 13
Open
Labels
featureAdditional or changing functionalityAdditional or changing functionalitylargeMore than a day's effortMore than a day's effort
Description
Steps to reproduce
- Create a project.
- Add a package.
- Modify the project to support multiple frameworks
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks> - Modify the project so that it uses different packages depending on target framework.
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
<PackageReference Include="Microsoft.Net.Http.Headers" Version="8.0.2" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net7.0' Or '$(TargetFramework)' == 'net6.0'">
<PackageReference Include="Microsoft.Net.Http.Headers" Version="2.2.8" />
</ItemGroup>
Expected behavior
I think the best default would be to just check the latest framework. Probably add a command line argument to specify the framework.
Observed behavior
ArgumentException: An item with the same key has already been added. Key: Microsoft.Net.Http.Headers
Metadata
Metadata
Assignees
Labels
featureAdditional or changing functionalityAdditional or changing functionalitylargeMore than a day's effortMore than a day's effort