nuget / docs.microsoft.com-nuget Goto Github PK
View Code? Open in Web Editor NEWDocumentation for NuGet
Home Page: https://docs.microsoft.com/nuget
License: MIT License
Documentation for NuGet
Home Page: https://docs.microsoft.com/nuget
License: MIT License
Look at the Note and Tip sections
From NuGet/Home#3943
the content in https://docs.microsoft.com/en-us/nuget/schema/msbuild-targets is outdated , and needs to be aligned with the updated version of spec : https://github.com/NuGet/Home/wiki/Adding-nuget-pack-as-a-msbuild-target
for example, https://review.docs.microsoft.com/nuget/create-packages/creating-a-package has a .nuspec file that has no syntax coloring
Transfer from NuGet/Home#2905.
From customer feedback:
In order to use nuget outside the context of visual studio, you can use the CLI and manual modification of packages.config. However, there is no documentation for the schema of packages.config.
The Project.json Reference indicates that project.json is meant to replace packages.config in NuGet 3.x for certain types of projects. But unless I am confused, my reading of this indicates that for other projects (or those of an unclassifiable nature), one must still use packages.config.
As an example of my use case, I am working on a database project in SQL Server Management Studio, and would like to use NuGet to pull down some build and development tools from the NuGet Gallery and a private feed. My project doesn't have a runtime or any frameworks; it produces SQL scripts that will be run on a database.
From customer feedback:
Add a beginner how-to execute nuget commands
I couldn't find a way to replace a dll on my nuget server.
Expand on details or give additional usage/concepts. You mention CLI will not perform some functions what are they? It would also be nice if comments/questions could be answered or acknowledged.
How can you update specific packages based on a wildcard/regex pattern? I notice CLI reference ignores expressions such as (nuget.exe update a.sln | where Id -like “DefinitelyTyped” | foreach { update-package $_.Id -reinstall }) [Comment on docs page]
pack Version 2.7+ Creates a NuGet package based on the specified .nuspec or project file. Note that the pack command requires MSBuild and will not work on Linux systems. But i'm working with .net core web apps and i can use this command on Linux and it works
Apologies if this is already documented, but I couldn't find it.
It would be good to document how the build/
and buildMultiTargeting/
folders work in a nuget package and how MSBuild imports them.
build/<tfm>?/<packageId>.props
build/<tfm>?/<packageId>.targets
buildMultiTargeting/<tfm>?/<packageId>.props
buildMultiTargeting/<tfm>?/<packageId>.targets
? = optional folder
cc @emgarten
See https://docs.microsoft.com/en-us/nuget/api/nuget-exe-credential-providers#comments-container. Comment claims the content isn't accurate. Needs to be checked and updated.
Needs a regular CLI guide, not just PM Console.
Needs 3.x handling of versions.
Hey,
I want to control my dependencies in an interop (C++/CLI) package. Like described here
https://docs.microsoft.com/en-us/nuget/schema/nuspec#dependencies
https://docs.microsoft.com/en-us/nuget/create-packages/native-packages
On this page the the term, "native Framework" is used, but if you check the article and the use of group those dependecies to used framework the listing (https://docs.microsoft.com/en-us/nuget/schema/target-frameworks) is used.
That again not mentioning a "native" framework. Sure i could try on my own and will sure enough, but I miss some clarity in the use of common term.
Basically i wish it would working even if not documented that it should :)
If native is a not supported framework, then please don't call it a "native" framework, or if it is a supported framework, take it into the targetFramework list. If it is only supported in another sense, clarify the use of term framework.
CLI on OSX and Linux options are to use dotnet.exe or to use nuget.exe with Mono.
Need to document:
For example, restore in dotnet.exe doesn’t presently support packages.config, but restore in NuGet.exe supports everything.
From https://docs.microsoft.com/en-us/nuget/guides/create-net-standard-packages-vs2017#comments-container:
a. How to include additional files?
b. How to use semantic versioning for suffixes?
From https://docs.microsoft.com/en-us/nuget/consume-packages/package-references-in-project-files#comments-container
a. When I try to reference a .NET Standard library with PackageReference to any NuGet package from a classic .NET application it compiles normally but throws FileNotFoundException at runtime. Does it mean that it is not possible to mix .NET Core and classic .NET in the same solution? Or is it a bug?
Customer comment: "How to add library not as reference?"
Source Code transformations (MyClass.cs.pp) seem to be applied during upgrade. I'm trying to include a sample class file, but I don't want it to be added back to the project every time the end-user updates the package. Is there a way around this?
Information in the existing topic is sketchy, and there are questions, see https://docs.microsoft.com/en-us/nuget/create-packages/native-packages#comments-container.
Request: "Needs more details of what package structures need to be and links to other reference material. "
Older issues:
NuGet/Home#1508
NuGet/Home#3027
Additional customer feedback:
From customer feedback
Create topic on setting up builds, testing, and deployment (to a feed, including nuget.org), for a package on Visual Studio Team Services.
See dotnet/docs#1730
Navigate to any page for the docs in a way that you can see the Breadcrumbs bar. Mouse over the Nuget hyperlink
Observed: The entire page content shifts
Do this anywhere that Net Standard 1.6 is mentioned.
Demonstrate the CI/CD workflow for NuGet packages, including build, test, and deploy to nuget.org or another feed.
The main page for Package Restore should be updated to reflect new 4.x MSBuild integration.
Describe when to use MSBuild /t:Restore
versus Nuget.exe restore
.
Instructions to acquire the recommended NuGet.exe
version for VS2017 projects.
I read the Explicit assembly references documentation and I found this last paragraph a bit misleading:
Similarly, explicit references can be used for unit test frameworks, such as XUnit, which needs its tools assemblies located next to the runtime assemblies, but does not need them included as project references.
If I read this, I expect the tools assemblies located next to the runtime assemblies. However, if I look at the output folder (the only place I would search for the runtime assemblies), these explicit assembly references are not there. I understand that this is by design, the text is just not that clear about it.
Check with Unni on what is needed here, exactly.
Adding scoped API keys for end-user security. This will be visible to developers at some point.
As it was recently announced in v4.0.0+ default location for the machine-wide NuGet.config has changed from %ProgramData%\NuGet\Config
to %ProgramFiles(x86)%\NuGet\Config
.
This breaking change should be reflected in the docs page Configuring NuGet Behavior.
Add note to finding and choosing packages about searching for TFMs when this is enabled.
To match the style of other references, such as dotnet. In the process, make the top-level page of the reference more clear on what command apply to what scenarios (consume, create, publish).
From https://docs.microsoft.com/en-us/nuget/create-packages/dependency-versions#comments-container
This document does not mention how to use the *
for floating version numbers.
Also, "It seems strange that the Notation 1.0 is inclusive and exclusive at the same time. Is this correct?"
From customer feedback:
http://docs.microsoft.com/en-us/nuget/consume-packages/package-restore, "The migration from "MsBuild-integrated restore" to "Automatic Restore" just causes automated MsBuild-Builds to fail, not restoring anything automatically."
Section titled "MSBuild-integrated restore" concludes with loading the solution in VS and then building it. The title promised that I could run using MSBuild without VS.
It does really make sense to write down few lines of code and explains how to create in XAML workflow an "Invoke Process" task which run the Nuget.exe restore and also how to use the NugetRestore MsBuild Activity task available for TFS 2012/2013 because it is not documented (in sidenote)
The link cannot be followed.
The page itself (https://docs.microsoft.com/en-us/nuget/schema/nuspec) is fine.
The list of Pack Target inputs now contains "DevelopmentDependency" . List has been updated here:
https://github.com/NuGet/Home/wiki/Adding-nuget-pack-as-a-msbuild-target
When this is added, build out documentation for setting this up and what it means for workflows.
From customer feedback:
PM Console
Package Manager UI
Step 2 results in “The V2 feed ... returned an unexpected status code '404 Not Found'” on my machine.
Would like to see information about updating the version of the nuget executable that gets added to the project when you enable nuget package restore
I can find no information on how to remove a source
I have a c++\cli project which I want to use this for, but when I try to use the NuGet package manager to install this, it fails. It seems to be unable to detect what .net framework version I'm using.
Need to clarify how to configure the UI to use only specific feeds through NuGet.Config files. See last comment on the page.
Does this bypass my virus scanner?
Looks like its not evident just from nuget version for the customer to find out that the nugetdefaults.config file has changed for VS 2017. We should make the doc more clear.
The link to NuGet Get Nearest Framework Tool is https://aka.ms/s2m3th but it's broken and yields a 403.
Transferring from NuGet/Home#4551.
Spec is on https://github.com/NuGet/Home/wiki/%5BSpec%5D-Managing-dependency-package-assets.
Also address NuGet/Home#4099 with pre-release versions.
A customer question also asks about conditionally creating pre-release versions. "The article only describes changing the element, which hardcodes a pre-release version until the project is updated again. I was hoping to find some information on using command-line parameters to pass in the pre-release suffix to MSBuild, but this functionality appears not to exist yet." But he's also asking specifically about doing it with PackageReference and MSBuild. It would mean being able to dynamically control the package ID, because that's ultimately where pre-release versions are set.
From old docs issues list:
NuGet/Home#358 (Targeting)
NuGet/Home#720 (PCLs)
NuGet/Home#1160 (multi-targeting)
NuGet/Home#4331 (.NET compact)
From customer feedback:
What is the equivalent of the deprecated packages? when I create a .netcore library it import dnxcore50 which is deprecated? Should I replace it with netcoreapp1.0 or netcore50?
Need some examples
NuGet/Home#2107 requests an overhaul. Includes breaking out each command into its own reference page to match other references.
Feedback we got for article https://docs.microsoft.com/en-us/nuget/schema/nuget-config-file
globalPackagesFolder applies only to projects using project.json.
So that should probably be amended (now that project.json projects are a thing of the past).
nuget.org will be adding checkmarks to verified/certified packages to help prevent spoofing. Will need a document on what it means to be verified, explaining the policy for the checkmark, package signing, and how to get verified.
When to packages.config, project.json, and PackageReference apply? Can't make PackageReference the default yet. UWP is an easy project because it's project.json to PackageReference, but other projects still use packages.config, etc. Need to clarify when these are used.
Per conversation with Karan, opening to track. We do need to add a button to docs.microsoft.com so users can navigate to docs.microsoft.com/nuget from the home page for Docs.
https://docs.microsoft.com/en-us/nuget/schema/msbuild-targets
Project to project references are considered by default as nuget package references," - yes, it seems that the nuget package references are derived directly from the referenced project name in the "Include" on the . However, if the referenced project uses the property to override the name used for the NuGet package, this reference will be incorrect. This seems to assume that the name of the project is always exactly equal to the package id, which is not the case. Is there a way to override this?
The PackageTargetFallback section is not very instructive if you don't know what msbuild "Imports" does. At the very least link to a description of "Imports", or (much better) actually explain what the purpose of PackageTargetFallback actually is.
The notes "New $(Version) property from MSBuild", I am having trouble finding any documentation on this new property for the v15 version of MSBuild. Can you update it to make that point to a link to the property documentation?
From https://docs.microsoft.com/en-us/nuget/create-packages/creating-a-package#comments-container
Feedback comment: Missing install.ps1, update.ps1 and init.ps1
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.