Duplicated library references in 5.151.1
Nobody has claimed this yet.
- Dominant language
- F#
- Stars
- 2.1k
- Forks
- 528
- Avg merge
- 1d 12m
- Merged PRs (30d)
- 54
Description
Description
After patching Paket to 5.151.1 (from 5.150.0) resolution behavior changed for some reason for package System.Net.Http - it is now referenced through Paket, even though it should not be.
Repro steps
-
Create .Net Framework 4.6 project.
-
(potentially optional) Make sure, that System.Net.Http is in packet.lock file (as a depedency to something else, for example .NetStandard 2.0. Make sure that System.Net.Http is NOT inside paket.dependencies or paket.reference
-
Reference System.Net.Http through assemblies project reference (reference .net framework library version 4.0.0).
-
run paket.exe install
Expected behavior
Only 1 reference, through <Reference Include="System.Net.Http" /> should be present in *.csproj file - this basically references System.Net.Http 4.0.0 from .Net Framework.
Actual behavior
Reference in expected behavior exists, however, additional one is added from packages in form of:
<Choose>
<When Condition="$(TargetFrameworkIdentifier) == '.NETFramework' And $(TargetFrameworkVersion) == 'v4.6'">
<ItemGroup>
<Reference Include="System.Net.Http">
<HintPath>..\packages\System.Net.Http\lib\net46\System.Net.Http.dll</HintPath>
<Private>True</Private>
<Paket>True</Paket>
</Reference>
</ItemGroup>
</When>
</Choose>
References version is slightly newer, so compilation fails because 2 libraries with same types are references.
Known workarounds
Downgrade to packet version 5.150.0.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue with the .NET Framework 4.6 project, the relevant entry in packet.lock, and the existing System.Net.Http project reference, then run paket.exe install. Inspect the generated *.csproj and confirm whether both the framework reference and a Paket reference are present; done means only the expected framework reference remains.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- fsharp
- Domain
- build-system, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100