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

Remove XProj pack from XPlat #3904

Closed
emgarten opened this issue Nov 8, 2016 · 13 comments
Closed

Remove XProj pack from XPlat #3904

emgarten opened this issue Nov 8, 2016 · 13 comments
Assignees
Milestone

Comments

@emgarten
Copy link
Member

emgarten commented Nov 8, 2016

dotnet nuget pack contains a legacy implementation of pack for xproj. This should be removed to avoid confusion with dotnet pack which is actually msbuild /t:Pack

https://github.com/NuGet/NuGet.Client/blob/6f3ae2d59140f5ea97eb7573535de1c286d6d336/src/NuGet.Core/NuGet.CommandLine.XPlat/Program.cs#L76

@natemcmaster
Copy link

Instead of removing completely, could dotnet-nuget-pack pivot to only supporting nuspec files?

dotnet-pack is meant for packing MSBuild projects. If users only have a nuspec file, it seems unnecessary to require adding an MSBuild file in order to call PackNuspecTask. And furthermore, it is much harder to discover available parameters for an MSBuild task than to run dotnet nuget pack --help.

@emgarten
Copy link
Member Author

Instead of removing completely, could dotnet-nuget-pack pivot to only supporting nuspec files?

Good point on packing nuspecs, we should support that xplat if possible. I would expect dotnet pack to be the entry point for this. What you are seeing with dotnet nuget pack is the old entry point from preview2. It isn't going to be supported going forward.

it is much harder to discover available parameters for an MSBuild task than to run dotnet nuget pack --help

This sounds like an issue with the top level dotnet pack command, it should have the same optional parameters that can be converted into msbuild properties.

//cc @rohit21agrawal

@natemcmaster
Copy link

Yes, definitely in favor of dropping the 'pack project.json' piece of this. It's the packing a nuspec w/o MSBuild scenario I'm most interested in.

I'm not sure dotnet-pack is the right place for this as its current implementation is designed to always invoke MSBuild...hence the requirement to add an MSBuild project in order to pack a nuspec. cc @piotrpMSFT @blackdwarf

@blackdwarf
Copy link

blackdwarf commented Dec 17, 2016

@natemcmaster @emgarten why is there a difference between these two commands in terms of inputs? Sorry if this is slightly off-topic, but since we are talking about potential changes to dotnet nuget pack it seems like a good place/situation to ask.

When we were doing the UX labs on the MVP summit, for example, most of the people we talked to were confused with the fact that dotnet pack and dotnet nuget pack work on different inputs.

I would think that both of them would allow using the nuspec and the csproj file as inputs to produce nupkgs.

Thoughts?

@emgarten
Copy link
Member Author

why is there a difference between these two commands in terms of inputs?

There shouldn't be. The plan is to remove dotnet nuget pack, it is confusing to have both. The old preview2 entry point within nuget just hasn't been deleted yet.

@blackdwarf
Copy link

@emgarten oh. OK then. 😄 That makes sense.

@gulbanana
Copy link

I'm currently using dotnet nuget pack as a way to get access to the non-Core packing capabilities of nuget.exe but using the version of nuget which comes with an sdk so that it can process p2p references to Core projects. Is there a better way to do this? For the foreseeable future we're going to need support for situations like this:

  • Solution contains two projects
  • Project 1 - .NET Standard csproj producing a nuget package. Uses the new project system and can be built with dotnet pack.
  • Project 2 - .NET Desktop csproj producing a nuget package. Depends on project 1, and the package soguld depend on project 1's package. Can not (ever?) use the new project system as it contains e.g. WPF XAML and must be built with nuget pack.

@rohit21agrawal rohit21agrawal self-assigned this Dec 19, 2016
@rohit21agrawal
Copy link
Contributor

@gulbanana for your Project 2, you should just use nuget.exe, which you can download from nuget.org/downloads .

@gulbanana
Copy link

OK, I'm trying that. Unfortunately it doesn't work right now - see the comments here #4054

@rohit21agrawal
Copy link
Contributor

@gulbanana - use nuget.exe for non netcore projects and dotnet.exe for netcore projects

@gulbanana
Copy link

That is what I am doing, but nuget.exe does not work to pack a noncore project which depends on a core/netstandard project.

@emgarten
Copy link
Member Author

@gulbanana would you open a new issue to track packing projects with non-core/netstandard mixed dependencies? This will need to work from the same command.

@rohit21agrawal
Copy link
Contributor

There is already one open : #4054

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

No branches or pull requests

6 participants