How to reference different version dependencies for different frameworks
See original GitHub issueI 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:
- Created 5 years ago
- Comments:15 (12 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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.
@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.