[Question]Multi-Targeting how to specify which group to use
Nobody has claimed this yet.
- Dominant language
- F#
- Stars
- 2.1k
- Forks
- 528
- Avg merge
- 1d 12m
- Merged PRs (30d)
- 54
Description
Hi,
so I want to multi-target netstandard2.0 and net462.
I have a dependency on Microsoft.Extensions.Logging. For NET standard, I can use the latest (2.2). But for NET 4.6.2 I need to use 1.1.2 and I need Microsoft.Extensions.Logging.Abstractions, too.
So my first attempt was this:
// paket.dependencies:
framework: netstandard2.0, netcoreapp2.2, net462
source https://api.nuget.org/v3/index.json
nuget Microsoft.Extensions.Logging ~> 2.2
group Net462:
framework: net462
source: ...
nuget Microsoft.Extensions.Logging 1.1.2 framework:net462
nuget Microsoft.Extensions.Logging.Abstractions 1.1.2 framework:net462
// paket.references:
Microsoft.Extensions.Logging
Microsoft.Extensions.Logging.Abstractions
But the output of this is that
- netstandard gets all it needs
- net462 gets
Microsoft.Extensions.Logging 2.2and noMicrosoft.Extensions.Logging.Abstractionsat all
Next attempt:
// same paket.dependencies as above
// paket.references:
group Net462 framework:Net462
Same result.
So, obviously I am misunderstanding something about how to use framework as a conditional element.
Any help, please?
Thx,
Max
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
Start by reproducing the dependency resolution with the shown paket.dependencies and paket.references files, then inspect the generated dependencies for netstandard2.0 and net462. Done means netstandard2.0 resolves Microsoft.Extensions.Logging 2.2, while net462 resolves version 1.1.2 and includes Microsoft.Extensions.Logging.Abstractions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- fsharp
- Domain
- build-system, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100