paket pack with multi-targeted project only creates first framework specified
See original GitHub issueDescription
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
- Run
.paket\paket.exe install
- Build in Debug mode
- Run
.paket\paket.exe pack . --build-config Debug
- 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
:
Actual behavior
You only see one lib folder:
Known workarounds
Use dotnet pack
instead of paket pack
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:7 (4 by maintainers)
Top 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 >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
@forki I believe PR #3534 should be ready to go and will fix this.
@forki The problem is that
dotnet pack
doesn’t support many of the settings thatpaket pack
does. Namely, I need--interproject-references fix
.I think we need to make
paket pack
work. It is still a valid replacement fordotnet pack
just as it was fornuget pack
.