简体   繁体   中英

How do I create a nuget packages.config file from the command line?

When I run a command like nuget install pdfsharp to add an external library to the project, the library is installed but as mentioned in the nuget documentation the command does not modify the project or packages.config.

Since I'm adding to an empty hello world, how do I create this packages.config file for nuget to later use nuget restore ? I'm not finding in the documentation the format of this file.

nuget install Will add the package but will not modify the project or xml config, See - https://docs.nuget.org/ndocs/tools/nuget.exe-cli-reference

Installs a package into the current project but does not modify the project or packages.config.

Try using the powershell commandlets, See - https://docs.nuget.org/ndocs/tools/powershell-reference#install-package

Install-Package pdfsharp

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM