question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Paket.pack: add support for nuget dependencies conditional on target framework

See original GitHub issue

As of Nuget 2.0, support for package dependencies that that are bound to specific target frameworks has been included. For instance:

<dependencies> 
   <group>
      <dependency id="RouteMagic" version="1.1.0" />
   </group>

   <group targetFramework="net40">
      <dependency id="jQuery" />
      <dependency id="WebActivator" />
   </group>

   <group targetFramework="sl30">
   </group>
</dependencies>

I’m not entirely sure how this feature would fit in with the design philosophy of paket, but I’d be interested to see having something like this added to the paket.template syntax.

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Reactions:6
  • Comments:9 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
cdrnetcommented, Sep 10, 2016

I have a need for this as well. But I’ll also have to specify empty groups to be able to end up with the following:

<dependencies>
    <group targetFramework=".NETFramework3.5">
        <dependency id="TaskParallelLibrary" version="1.0.2856" />
    </group>
    <group targetFramework=".NETFramework4.0" />
</dependencies>

Maybe this could then become:

dependencies targetFramework=net35
    TaskParallelLibrary >= 1.0.2856
dependencies targetFramework=net40
0reactions
matthidcommented, Sep 3, 2017

@seanamosw Please open a new issue if this is still the case.

Read more comments on GitHub >

github_iconTop Results From Across the Web

PackageReference in project files - NuGet
Package references, using <PackageReference> MSBuild items, specify NuGet package dependencies directly within project files, as opposed to ...
Read more >
How do I specify conditional dependencies based on target ...
I am building a NuGet package that references the Microsoft CommonServiceLocator assembly. There are two versions of the Microsoft ...
Read more >
FAQ — Frequently Asked Questions
If you install NuGet packages into your project then these packages can have dependencies on other NuGet packages. Paket calls these dependencies "transitive"....
Read more >
Managing Dependencies in .NET: .csproj, .packages.config ...
Packages can be conditionally included by adding conditions in the corresponding line in the section. .NET developers typically find components ...
Read more >
Paket 7.2.1
A dependency manager for .NET with support for NuGet packages and git repositories.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found