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 with multi-targeted project only creates first framework specified

See original GitHub issue

Description

using paket pack on a project with multiple TargetFrameworks creates a nupkg with only the first specified framework. ie. if the declaration is <TargetFrameworks>netstandard2.0;net472</TargetFrameworks>, then the nupkg has just the netstandard2.0 contents. If they’re swapped round: <TargetFrameworks>net472;netstandard2.0</TargetFrameworks>, then the nupkg has just the net472 contents.

Repro steps

Get this repo: https://github.com/ozwaldDunlop/paket-multitarget-bug

  1. Run .paket\paket.exe install
  2. Build in Debug mode
  3. Run .paket\paket.exe pack . --build-config Debug
  4. Open the resulting nupkg in 7zip or Nuget Package Explorer

Expected behavior

You should see netstandard2.0 and net472 folders in the nupkg as you do when you run dotnet pack: image

Actual behavior

You only see one lib folder: image

Known workarounds

Use dotnet pack instead of paket pack

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
jam40jeffcommented, Mar 29, 2019

@forki I believe PR #3534 should be ready to go and will fix this.

0reactions
jam40jeffcommented, Mar 26, 2019

@forki The problem is that dotnet pack doesn’t support many of the settings that paket pack does. Namely, I need --interproject-references fix.

I think we need to make paket pack work. It is still a valid replacement for dotnet pack just as it was for nuget pack.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Multi-targeting for NuGet Packages
Description of the various methods to target multiple .NET Framework versions from within a single NuGet package.
Read more >
Support multiple .NET Framework versions in your project file
Description of the various methods to target multiple .NET Framework versions from within a single NuGet package in your project file.
Read more >
paket pack
The first command (without the --lock-dependencies parameter) creates the version requirements as specified in your paket.dependencies file. The second command ...
Read more >
release-notes
Paket now clones git dependencies as bare repositories and configures clones under paket-files differently. Because of these incompatible changes, it is ...
Read more >
Multiple target framework project: different versions of the ...
I've put together a .Net 5 for Windows application, using among other things EntityFramework 5.0.13. Now we're trying to run it on a...
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