Build a local NuGet Server under the window System

Source: Internet
Author: User
Tags dotnet

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.