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

Regarding including dependencies in the section about creating a .nuspec file from a Visual Studio project #1135

Closed
carlos-quintero opened this issue Nov 4, 2018 — with docs.microsoft.com · 2 comments

Comments

Copy link

@carlos-quintero carlos-quintero commented Nov 4, 2018 — with docs.microsoft.com

Regarding the section about creating a .nuspec file from a Visual Studio project, specifically this phrase:

"Creating a .nuspec from a .csproj or .vbproj file is convenient because other packages that have been installed into those project are automatically referenced as dependencies."

At the time of this comment (Nov 4, 2018), if you have a .NET Framework myproject.csproj that references a NuGet package, and using nuget.exe 4.7.1.5393, then:

  1. If myproject.csproj uses PackageReference:

1.1) nuget.exe spec myproject.csproj generates a .nuspec file that does NOT include dependencies.

1.2) nuget.exe pack myproject.csproj generates a .nupkg file that includes inside a .nuspec file that does NOT include dependencies.

  1. If myproject.csproj uses packages.config file:

2.1) nuget.exe spec myproject.csproj generates a .nuspec file that does NOT include dependencies.

2.2) nuget.exe pack myproject.csproj generates a .nupkg file that includes inside a .nuspec file that DOES include dependencies.

Only case 2.2 works as expected and documented.

Needless to say, this NuGet/dependencies stuff is a nightmare and time-consuming. At the very least, the documentation is wrong. And nuget.exe could do a better job in cases 1.1, 1.2 and 2.1.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

@carlos-quintero carlos-quintero changed the title Regarding the section about creating a .nuspec file from a Visual Studio project Regarding including dependencies in the section about creating a .nuspec file from a Visual Studio project Nov 4, 2018
@zivkan zivkan added the Client label Nov 5, 2018
@zivkan zivkan added Team:Client and removed Client labels Dec 6, 2018
@Mikejo5000
Copy link
Contributor

@Mikejo5000 Mikejo5000 commented Aug 8, 2019

This doc is limited now to nuget.exe with packages.config, so some issues described here go away.
However, the issue with nuget.exe spec not generating a .nuspec with dependencies looks like a doc bug.

Loading

@Mikejo5000
Copy link
Contributor

@Mikejo5000 Mikejo5000 commented Aug 8, 2019

Updating doc

Loading

@Mikejo5000 Mikejo5000 closed this in 4747713 Aug 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants