Illustrates a server set up and use NuGet

 

Listen to the voice
  • Views: 0
  • |
  • Updated: 2017-10-31 09:13
  • |
  • Tags: server 
  • Illustrates a server set up and use NuGet 1
  • Illustrates a server set up and use NuGet 2
  • Illustrates a server set up and use NuGet 3
  • Illustrates a server set up and use NuGet 4
  • Illustrates a server set up and use NuGet 5
  • Illustrates a server set up and use NuGet 6
  • Illustrates a server set up and use NuGet 7
Read the step by step

Benpian experience will step NuGet server and introduce network build, we want to work and study help!

NuGet Website Builder

 
  1. 1

    Create an empty ASNET website, as shown below:

    Note: The Framework is set to 4.6 or more, NuGet.Server library requires .net framework version is 4.6.

    Illustrates a server set up and use NuGet
  2. 2

     

    With NuGet installation "NuGet.Server" library NuGetServer.

    After successful installation, your Solution will become such a structure. And you do not need to write any code or change any configuration, it has been run. Run this site, if you see the following welcome screen, then the site has been constructed completed, as shown below:

    Note: Packages only one readme.txt, this directory is used to put NuGet package, click here connected, you can view the existing package.

    Illustrates a server set up and use NuGet
  3. 3

    The deployment site, and deploy it exactly like any ASP.NET website, here not elaborate.

    END

Code is packaged as packets NuGet

 
  1. 1

    Go Nuget official website to download nuget command line tool, download address: www.nuget.org/downloads.

  2. 2

    Packaged with Nuget

    There are two ways Nuget package, the first one is directly through the pack dll project file:

    Create a class library, and then compile under. The file you just downloaded nuget.exe copied to the project file in the same folder, as shown below:

    Illustrates a server set up and use NuGet
  3. 3

    Nuget line to create the command packet: nuget.exe pack, as shown below:

    Illustrates a server set up and use NuGet
  4. 4

    The second method is to use nuget the spec file is packaged.

    Also to be packaged DLL with NuGet.exe placed under a directory, create a file with nuspec nuget spec command, as shown below:

    Illustrates a server set up and use NuGet
  5. 5

    Package.nuspec open the file, you can customize some configuration.

    Note: $ description $ AssemblyDescriptionAttribute use of replacement value, before generating the package, be sure to remember to compile the project, otherwise it will prompt error $ description $ found.

  6. 6

    Nuget baling NuGet pack into packets, as shown below:

    Illustrates a server set up and use NuGet
  7. 7

    So far package is completed.

  8. 8

    The NuGet package uploaded to the server

    The packaged .nupkg files are copied to the first step in a good frame Nuget under Package directory server. Nuget service can write a file upload capabilities to reduce cumbersome copy.

    END

Configuring Visual Studio

 
  1.  

    Nuget service has been set up successfully, the next step is to configure NuGet source VS, let other projects can use our NuGet server.

    Select the Tools -> Nuget Package Manager -> package management console, click on the icon configuration, as shown below:

     

    Add, set the local NuGet source name and address. Note: source finally / nuget  

     

    Upon completion, we can install the VS NuGet package from the PW.

    Illustrates a server set up and use NuGet
  2.  

    Use in other projects 

    So far NuGet server has been configured, packaged class libraries and DLL files are also introductions, then how do we reference NuGet intranet server package in the project do the following steps:

    NuGetTest a new project, and Tools -> Nuget Package Manager -> package management console, the command line: install-package IKSDK, as shown below:

    Illustrates a server set up and use NuGet
  3.  

    Finally, to see the effect, as shown below:

    So far, the network set up NuGet server process is introduced over.

    Illustrates a server set up and use NuGet
  4.  

Guess you like

Origin www.cnblogs.com/Justsoso-WYH/p/11232470.html