1. The directory where the Nuget.config file is located: C:\Users\xxx\AppData\Roaming\NuGet
2. Put nupkg as the end of the file in the project's packages directory. (Note that the package directory is the same as the Web. config peer)
3. Visit: Http://localhost:53862/nuget/Packages can see which Packages
4. Add a source inside the tool-"NUGET Package management Tool-" package source
Name free
Source Address: Http://localhost:53862/nuget Save
4. Note that modifying the Web. config
<add key= "Packagespath" value= "D:\project\new_lpm\nugetserver\nugetserver\Packages"/>
5. Register Https://www.nuget.org/account Get Apikey
6. Modify the Web. config
<add key= "ApiKey" value= "Your ApiKey"/>
7. Download NnGet.exe
I've put it in \\192.168.1.19\Development\Casino\Temp\Sunny Li.
8. Add the directory where the NnGet.exe is located to the environment variable
8. Open the command line in the directory where the NnGet.exe is located:
Nuget.exe Setapikey [Your API key]-source https://www.nuget.org Set your Apikey
9. The nupkg file to be push is placed in a directory, for example, in the directory with UnGet.exe:
Nuget Push {Package file}-s {localhost} {Apikey}
Nuget Push jquery.1.5.1.nupkg-s http://192.168.191.80:60102 B3055B84-05E1-4BC9-B074-76F3B9F122CA
Nuget Push autofac.4.6.0.nupkg-s http://192.168.191.80:60102 B3055B84-05E1-4BC9-B074-76F3B9F122CA
Copy xx%userprofile%\appdata\roaming\nuget
11. Generate the Nuspec file: Enter the directory where the. csproj file is located, run the NuGet spec command, and the. nuspec file will be generated
12: Enter the directory where the. csproj file is located, run the NuGet Pack xxxx.nuspec command, generate the. nupkg file or use dotnet pack xxx (ClassLibrary for example) in the directory
dotnet Pack [--output] [--no-build] [--build-base-path] [--configuration] [--version-suffix] [<project>]
Build a local NuGet Server under the window System