Tag: C#

Publishing a Nuget package to an internal server

Make sure you have Nuget installed. If you don’t have it, you can download it from https://www.nuget.org/downloads.


Create package: nuget.exe pack [path to csproj file]

Publish package: nuget.exe push [path to nupkg file] -source [nuget server uri] -ApiKey [key]

Example of nuspec file:

<?xml version="1.0"?>
<package xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <metadata xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
        [description of your library]
    <tags>[tag1] [tag2]</tags>

Replace [name], [company], [description of your library] and tags accordingly.