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.

How to reference different version dependencies for different frameworks

See original GitHub issue

I am using the Microsoft.Owin NuGet package in my solution.

My solution needs to be compiled for .Net 4.0 and .Net 4.5. I am doing this by having two .csproj files in the same folder. Both of the .csproj files reference all of the same source files but target different .Net framework versions and specify different output folders.

This works great with NuGet, but I can not see how to make this work with Paket because projects compiled for .Net 4.0 must reference Microsoft.Owin version 2.1.0 and projects compiled for .Net 4.5 must reference Microsoft.Owin version 3.0.1 and I can only have one paket.references file in my project folder.

You can see my source code here

Is this possible with Paket?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:15 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
Bikeman868commented, Aug 14, 2019

When I opened this ticket I included a link to an open source project that demonstrates this problem.

Whilst waiting for a bug fix I am manually maintaining project references but it’s a real pain.

I recently started using Visual Studio 2019 and it’s Nuget Package Manager is considerably better than in earlier versions so I am considering abandoning Paket.

On Aug 12, 2019, at 8:30 AM, Jim Hume notifications@github.com wrote:

@forki This repository is somewhat large and is the result of attempting to merge together a few different repositories into a single solution. I may be able to come up with a small repro, but it may be difficult to do so. I’m mostly looking for information about workarounds and whatnot, as this may be the result of any number of issues that were encountered while attempting to merge said repositories.

I’m not logging a bug against paket, I’m mostly looking to see if the issue was worked around in the past or if there is perhaps some what to accomplish what the original author was trying to do. I don’t want to place the burden on anyone other than myself at this point basically.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

0reactions
JimHumecommented, Aug 12, 2019

@forki This repository is somewhat large and is the result of attempting to merge together a few different repositories into a single solution. I may be able to come up with a small repro, but it may be difficult to do so. I’m mostly looking for information about workarounds and whatnot, as this may be the result of any number of issues that were encountered while attempting to merge said repositories.

I’m not logging a bug against paket, I’m mostly looking to see if the issue was worked around in the past or if there is perhaps some way to accomplish what the original author was trying to do. I don’t want to place the burden on anyone other than myself at this point basically.

Read more comments on GitHub >

github_iconTop Results From Across the Web

c# - How can I specify different dependencies for ...
I'm trying to create a NuGet package which has a dependency on System. Net. Http (need the HttpClient). For framework version 4.5.
Read more >
Multi-targeting for NuGet Packages
Declaring dependencies (Advanced)​​ (Version 2.0+) You can declare package dependencies in the . nuspec corresponding to the target framework of ...
Read more >
PackageReference in project files - NuGet
In this article. Package references, using <PackageReference> MSBuild items, specify NuGet package dependencies directly within project files, ...
Read more >
Dependency Management in Visual Studio: NuGet and Beyond
Learn how to manage NuGet package dependencies for your .NET projects using Visual Studio.
Read more >
How to resolve .NET reference and NuGet package version ...
The best solution is to remove the need for different reference versions. Sometimes it's as easy as going to NuGet manager and changing...
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