Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

paket pack with multi-targeted project only creates first framework specified #3494

Closed
ozwaldDunlop opened this issue Jan 28, 2019 · 7 comments · Fixed by #3534
Closed

paket pack with multi-targeted project only creates first framework specified #3494

ozwaldDunlop opened this issue Jan 28, 2019 · 7 comments · Fixed by #3534

Comments

@ozwaldDunlop
Copy link

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

@generik0
Copy link

generik0 commented Jan 30, 2019

I am also interested in this, very much.
dotnet pack is not working for me. dotnet pack is doing something very weird and generating a long path for the nuspec it created. NuGet/Home#3324

@fjoppe
Copy link

fjoppe commented Feb 2, 2019

Swapping the frameworks around gives the above behavior, even without rebuild.

I've even tried to "paket pack" the stuff in the netstandard2.0 folder, it even then came with a net45 folder in the nupkg.

@forki
Copy link
Member

forki commented Feb 3, 2019 via email

@fjoppe
Copy link

fjoppe commented Feb 3, 2019

Yes, I was experimenting with that. The result appeared good. However, my question (for me) is, what is the best choice now, to put in my FAKE5 build script? Dotnet pack or paket pack? I don't know at this point. I o like the Paket integration in FAKE.

@forki
Copy link
Member

forki commented Feb 3, 2019 via email

@jam40jeff
Copy link
Contributor

jam40jeff commented 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.

jam40jeff added a commit to jam40jeff/Paket that referenced this issue Mar 27, 2019
jam40jeff added a commit to jam40jeff/Paket that referenced this issue Mar 27, 2019
@jam40jeff
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants