---
title: "Choose the Right Nuget Package Manager and Set It Up with IIS"
description: "Discover the best Nuget package manager for your needs and learn how to set it up with IIS."
canonical: "https://adamtheautomator.com/nuget-package-manager/"
---

# Choose the Right Nuget Package Manager and Set It Up with IIS

> Discover the best Nuget package manager for your needs and learn how to set it up with IIS.

Source: https://adamtheautomator.com/nuget-package-manager/

---

ATA Learning

Tap to hide

[

ATA Learning

](/)

*   [Home](/)
*   [Tutorials](/tutorials/)
*   [Instructors](/author/)
*   [Advertising](/advertising/)
*   [Recommended Resources](/resources/)
*   [About Adam](/about-adam/)

Search for:  

*   [](https://twitter.com/adbertram)
*   [](https://github.com/Adam-the-Automator)
*   [](https://www.linkedin.com/company/adam-the-automator-llc)
*   [](/feed/)

![Choose the Right Nuget Package Manager and Set It Up with IIS](https://adamtheautomator.com/wp-content/uploads/2019/09/chocolate-524749_1280.jpg)

# Choose the Right Nuget Package Manager and Set It Up with IIS

[![](https://secure.gravatar.com/avatar/592cc421b96f8a3f79f030a608d24047fcc0ec05ba59b5b9110af4804a6774b8?s=192&d=mm&r=g)Tyler Muir](https://adamtheautomator.com/author/tyler/)19 September 201911 min. read

Categories: [DevOps](/category/devops/)

Tags:[IIS](/tag/iis/)[NuGet](/tag/nuget/)[PowerShell](/tag/powershell/)

Table of Contents

*   [Setting up a NuGet.Server Wrapper](#setting-up-a-nuget-server-wrapper-on-iis)
*   [Prerequisites](#prerequisites-1)
*   [Installing the Web Server Service](#installing-the-web-server-service)
*   [Customizing the Web Server](#customizing-the-web-server)
*   [Setting up BaGet on IIS](#setting-up-baget-on-iis)
*   [Prerequisites](#prerequisites-2)
*   [Installing Web Server Prerequisites](#installing-web-server-prerequisites)
*   [Install IIS](#install-iis)
*   [Install .NET Core](#install-net-core)
*   [Configuring the Web Server Application](#configuring-the-web-server-application)
*   [Creating the BaGet IIS Application Pool](#creating-the-baget-iis-application-pool)
*   [Creating the BaGet Website](#creating-the-baget-website)
*   [Customizing the BaGet Web Server](#customizing-the-baget-web-server)
*   [BaGet API Key](#baget-api-key)
*   [Understanding BaGet Forks (LiGet)](#understanding-baget-forks-liget-)
*   [LiGet’s Hashed API Key](#liget-s-hashed-api-key)
*   [Setting up ProGet on IIS](#setting-up-proget-on-iis)
*   [Prerequisites](#prerequisites-3)
*   [Installing ProGet](#installing-proget)
*   [Configuring a PSRepository on ProGet](#configuring-a-psrepository-on-proget)
*   [Adding an API Key](#adding-an-api-key)
*   [Searching Packages with ProGet](#searching-packages-with-proget)
*   [Updating ProGet](#updating-proget)
*   [NuGet Package Manager Comparison](#nuget-tool-comparison)
*   [BaGet vs. LiGet](#baget-vs-liget)
*   [BaGet vs ProGet](#baget-vs-proget)
*   [Summary](#summary)

You’ve built an application or perhaps even a set of important scripts and need to package it up and deploy it. Look no further than NuGet and the various NuGet package manager you have available.

Not a reader? Watch this related video tutorial!

**_Not seeing the video? Make sure your ad blocker is disabled._**

In this article, you’re going to learn how to get various NuGet package managers set up for the first time so you can start using them immediately.

**_Related: [Setting up NuGet Server on Windows (Complete Walkthrough)](https://adamtheautomator.com/nuget-server/)_**

## Setting up a NuGet.Server Wrapper

While setting up a NuGet.Server from scratch is not too involved, it can take a while for someone new to Visual Studio and IIS. A way to speed up the setup and update process is with a wrapper. One of the most popular wrappers, called _nuget-server_,  is one written by [svenkle](https://github.com/svenkle) and can be found on their [Github page](https://github.com/svenkle/nuget-server/).

One of the major differences with using this wrapper instead of manually installing the web server is that it uses IIS Express. You can read more about the differences on [Microsoft’s website](https://docs.microsoft.com/en-us/iis/extensions/introduction-to-iis-express/iis-express-overview#iis-express-and-iis).

There are two important differences between setting up a vanilla NuGet.Server and with this wrapper are:

*   you must create a Windows service to start the web server
*   you cannot use the IIS Manager for the configuration

> _The primary downside to using a wrapper to install NuGet.Server is that you cannot easily update the version until the wrapper is updated._

### **Prerequisites**

If you’d like to learn how to set up this NuGet.Server wrapper, you’ll first need to ensure you’ve got the following:

*   [Installer for svenkle’s NuGet.Server wrapper](https://github.com/svenkle/nuget-server/releases)
*   [Windows Server](https://www.microsoft.com/en-us/evalcenter/evaluate-windows-server-2019) – Any currently supported version of Windows Server version will work, but all of the screenshots have been taken on Windows Server 2019 Standard

### **Installing the Web Server Service**

The first step is creating a new Windows service. Since this NuGet.Server wrapper doesn’t use IIS, you can’t piggyback onto IIS.

With the [NuGetServer.zip file downloaded from the releases page](https://github.com/svenkle/nuget-server/releases), unzip the file to your directory of choice on the web server. Once unzipped, create the Windows service to automatically start the web page when you start the server. Below you will find a PowerShell command to do that for you.

```powershell
New-Service -Name NuGetServer -BinaryPathName '<UnzipPath>\Svenkle.NuGetServer.Service.exe' -StartupType Automatic
Start-Service -Name NuGetServer
```

### **Customizing the Web Server**

Now that you have the NuGet.Server installed from the wrapper and the service is created and started, it’s time to customize the _web.config file_. You can make the same changes that you would make to the _web.config_ file with the manual deployment if you wish.

The _web.config_ file is located in the _<UnzipPath>\\Host\\Website_ folder. The major difference with this deployment is it uses port 8080 instead of the default HTTP port 80. This means that anywhere where you would have used the web URL, you have to append _:8080_, such as when going to the web page it would be _http://localhost:8080/nuget_.

All done. That was a lot easier than using Visual Studio!

## Setting up BaGet on IIS

While you have been looking at only stock versions of NuGet.Server so far, there are plenty of other available versions out there. One popular NuGet package manager is an open-source project called BaGet.

Let’s see what it takes to get BaGet installed and running on a Windows Server with IIS.

### **Prerequisites**

Before you get started, ensure you meet a few prerequisites.

*   [BaGet.zip](https://github.com/loic-sharma/BaGet/releases) – At the time of writing this the project is still in pre-release and I am using v0.1.77
*   [.NET Core Runtime & Hosting Bundle](https://dotnet.microsoft.com/download/thank-you/dotnet-runtime-2.2.6-windows-hosting-bundle-installer) – This will need to be downloaded and available on the web server for later.
*   [Windows Server](https://www.microsoft.com/en-us/evalcenter/evaluate-windows-server-2019) – Any currently supported version of Windows Server version will work, but all of the screenshots have been taken on Windows Server 2019 Standard

### **Installing Web Server Prerequisites**

While the below steps can be run on Linux with .NET Core or in a Docker image, these instructions will be used to install BaGet on a Windows server. This way you can take advantage of IIS to start and stop your server.

#### Install IIS

Since BaGet runs on .NET Core, there aren’t as many requirements as the basic NuGet.Server that you installed IIS for before. You only need a default IIS web server and the IIS manager. To install these, open a PowerShell session on your web server and run:

```powershell
Install-WindowsFeature Web-Server -IncludeManagementTools
```

#### Install .NET Core

Next, install the .NET Core bundle on the web server. To do this, run the exe file you downloaded earlier. You can leave all of the options as default for this install.

> _The .NET Core bundle must be installed after IIS is installed. If this does not happen in the correct order, you will have to rerun the installer for the .NET Core bundle and select repair to add the missing requirements for a web app._

Now that you have the web server components ready, unzip the _BaGet.zip_ file downloaded earlier and place it in the _C:\\inetpub\\wwwroot_ folder on your web server.

### **Configuring the Web Server Application**

Similar to NuGet.Server, you’ll need to set up a few IIS components to get NuGet package manager BaGet up and running.

#### Creating the BaGet IIS Application Pool

Open _IIS Manager_ on the web server and go to the _Application Pools_. Create a new application pool for BaGet since it will not be using .NET managed code. You can name it what you would like. Below is how it should look.

![Creating a BaGet application pool](/wp-content/uploads/2019/09/baget-iis-application-pool.png)

Creating a BaGet application pool

#### Creating the BaGet Website

Once the application pool is created, create the website. Since BeGet uses a non-standard HTTP port and non-default app pool, it is easiest to create a separate website from the _Default Web Site_. To do this,  right-click on the _Sites_ folder in _IIS manager_ and select _Add Website_.

Below are the settings you need to configure BaGet.

![Creating a BaGet IIS Website](/wp-content/uploads/2019/09/baget-iis-website.png)

Creating a BaGet IIS Website

Once you have the site configured it should start automatically. You can take a look at it by going to [_http://localhost:5000/_](http://localhost:5000/) from your server.

![BaGet packages web page](/wp-content/uploads/2019/09/baget-web-interface.png)

BaGet packages web page

You will notice that there is more of a user interface on the BaGet webpage compared to the standard NuGet.Server webpage. In BaGet, you can easily search for packages that have been uploaded and it also provides the commands on how to upload in a variety of ways instead of using the NuGet command-line options.

### **Customizing the BaGet Web Server**

Recall that you were able to customize your NuGet.Server server using the _web.config_ file. But the NuGet package manager BaGet does not use the _web.config_ file. Instead, since BaGet can also used on Linux, the developers opted for a more cross-platform format with a JSON file called _appsettings.json._ It is located in the _C:\\inetpub\\wwwroot\\BaGet_ folder.

> _Note that because BaGet uses .NET Core for cross-platform functionality, all paths use forward slashes._

For example, if you wanted to have your package path at _C:\\Packages_ on your server, you ‘d need to have what is shown below in the _appsettings.json_ file.

```json
"Storage": {
    "Type": "FileSystem",
    "Path": "C://Packages"
}
```

#### BaGet API Key

To protect your NuGet server from unauthorized users from publishing or deleting package, you will still want to set an API key. The API key setting is also located in the _appsettings.json_, so you can set it while you are there.

Since I’m using PowerShell to manage my NuGet packages, I again can register a PSRepository. For BaGet, navigate to the webpage that you created. The webpage will give you the command to run in your PowerShell session. For example:

```powershell
Register-PSRepository -Name "BaGet" -SourceLocation "http://<WebServer>:5000/v3/index.json" -PublishLocation "http://<WebServer>:5000/api/v2/package" -InstallationPolicy "Trusted"
```

## Understanding BaGet Forks (LiGet)

While BaGet does provide many options for use, there are other forks of BaGet that have been created to specialize in other areas of NuGet. One of the most popular forks is LiGet. LiGet is different because it specializes with a Linux-first point of view.

[LiGet](https://github.com/ai-traders/liget) is a NuGet package manager fork off of the original project for BaGet. There were a few reasons the developers decided to do this, but primarily it was done to focus on some specific features of NuGet including the v3 feed support. V3 feed support does not affect the use case with PowerShell. But if you are going to be hosting a NuGet server for other use cases, you may enjoy the added functionality.

### LiGet’s Hashed API Key

One major difference with LiGet vs. BaGet is the use of a hashed API key instead of plain text. With a plain text key someone with access to the _web.config_ file on NuGet.Server or the _appsettings.json_ on BaGet could publish to the server. This couldn’t happen with LiGet.

To get LiGet up and running, you’ll need to create a hashed API key and place it into the _appsettings.json_ file in the _C:\\inetpub\\wwwroot\\LiGet_ folder_._

To create the hash, you can use PowerShell or any other hashing method you’re comfortable with. Below is an example of what you would run on your workstation to create a hash.

```powershell
([System.Security.Cryptography.HashAlgorithm]::Create('SHA256').ComputeHash([System.Text.Encoding]::UTF8.GetBytes(<apikey>)) | 
Foreach-Object { $_.ToString('x2')}) -join ''
```

You can also use an [online hash generator](https://passwordsgenerator.net/sha256-hash-generator/) to create the hash.

> _The drawback of this approach is if you forget the API key, you must create a new hash and replace in since the hash is not reversible._

## Setting up ProGet on IIS

All of the options that have been covered so far are free and do not have many moving parts once set up. While this is good for trying NuGet out, if you want to integrate with other tools or if you require vendor support for a system in the workplace, a better option may be the NuGet package manager ProGet.

### **Prerequisites**

To set up ProGet, you’ll need some common prereqs you’re probably used to by now but with the additional of an optional SQL database.

*   [Windows Server](https://www.microsoft.com/en-us/evalcenter/evaluate-windows-server-2019) – Any currently supported version of Windows Server version will work, but all of the screenshots have been taken on Windows Server 2019 Standard
*   [ProGet Installer](https://inedo.com/proget/download) – The version of ProGet I am using is 5.2.9.
*   [SQL Instance](https://www.microsoft.com/en-us/sql-server/sql-server-editions-express) – This is optional since ProGet has an option to install SQL Express from the installer, although this does require an internet connection from your server to do the initial download

### Installing ProGet

From your web server run the ProGet installer. Since you’re setting up IIS, select the _IIS web server_ option when installing ProGet. If you do not already have IIS installed, it will handle the installation during the install of ProGet.

The rest of the options you can leave as the default unless you want to host the ProGet database on a separate SQL server. In that case, you will need to specify the SQL instance to use.

If you leave the _SQL Server_ option as _Install Inedo instance_ it will install SQL Express server for you.

![Installing ProGet](/wp-content/uploads/2019/09/proget-setup.png)

Installing ProGet

Once the installation finishes, launch the website when prompted and you should see a webpage come up that looks like the below screenshot.

![ProGet Home](/wp-content/uploads/2019/09/proget-web-interface.png)

ProGet Home

### Configuring a PSRepository on ProGet

At this point, ProGet is installed. It’s pretty easy. Since we’re using PowerShell to work with NuGet packages, we’ll need to set up a PSRepository as we’ve previously done.

To set ProGet up for a PSRepository, navigate to the _Feeds_ tab and create a new feed. You can name the feed anything you’d like. Then select _Third-party package format_ and _PowerShell_ as shown below.

![Creating a ProGet PSRepository feed](/wp-content/uploads/2019/09/proget-create-feed.png)

Creating a ProGet PSRepository feed

Once you’ve created the feed, go back to the _Feeds_ tab, select your new feed and it will show the URL used for publishing. This is what you would need to run in PowerShell on a device to publish to or download from this PSRepository.

Below is what was shown with the example from above:

```powershell
Register-PSRepository -Name ProGet -SourceLocation http://<WebServer>:8624/nuget/PSRepository/ -PublishLocation http://<WebServer>:8624/nuget/PSRepository/ -InstallationPolicy Trusted
```

### Adding an API Key

Like the other options, you need to generate an API key. To do this, click on the gear icon in the top right corner and then select _API Keys_ from the left toolbar. Here you can see existing API keys and you can create new ones. You will immediately see a main difference between the open-source and enterprise ProGet. With ProGet, you can have many API keys.

![ProGet API Keys](/wp-content/uploads/2019/09/proget-api-key.png)

ProGet API Keys

On the _API Keys_ screen, click _Create API Key_. From here check the box for _Feed API_ and click _Save API Key_.

![Creating a ProGet API Key](/wp-content/uploads/2019/09/proget-create-api-key.png)

Creating a ProGet API Key

Once the API key is created it will take you back to the _API keys_ page. From here, you can use the API key that you see to publish packages to your feed.

### Searching Packages with ProGet

ProGet also includes a web page that allows you to search all NuGet packages in the feed, see their download count, the name of the PowerShell modules, which feed a package was uploaded into and other similar package stats from the _Packages_ page as shown below.

![Viewing NuGet packages in ProGet](/wp-content/uploads/2019/09/proget-packages.png)

Viewing NuGet packages in ProGet

Alternatively, you can go to the _Feeds_ page and select a feed to see only the packages for that feed. There you can drill down to individual packages to see the stats and other details about the packages as shown below.

![Viewing individual ProGet packages](/wp-content/uploads/2019/09/proget-package.png)

Viewing individual ProGet packages

## Updating ProGet

One of the nice parts about using a product that has positioned for an enterprise is that some of the more time-consuming administrative tasks are much faster. An example of this is updating ProGet.

To update ProGet to the newest version, simply open the Inedo Installer on your web server. This was installed when you first installed ProGet. Click on the _Upgrade_ button and shown below and the installer will do the rest for you.

![Updating ProGet](/wp-content/uploads/2019/09/update-proget.png)

Updating ProGet

## NuGet Package Manager Comparison

You’ve learned a lot about various NuGet tools in this article. If you’re still shopping around for which one to try out, in this section, you’ll get a glimpse into what makes each one different.

### BaGet vs. LiGet

Since LiGet is a fork of BaGet, they share many similarities, including most of the setup process. In fact, you can follow the exact same setup procedure as BaGet.

Once installed, LiGet and BaGet do share some features but differ in other ways.

| Feature | BaGet | LiGet |
| --- | --- | --- |
| Web Port | 5000 | 9011 |
| Source URL | /v3/index.json | /api/v3/index.json |
| NuGet Search API | v2 | v3 |
| API Key | Plain Text | SHA256 hash |
| Web Interface | Can see list of packages and commands to upload | No web interface |

While most of these differences do not affect use with PowerShell, the setup does change slightly due to using a hashed API key.

Both BaGet and LiGet are built on .NET Core which makes them cross-platform and usable on Linux operating systems. as well as Windows. Both also have Docker images available that, if you are already using a container service, can make the setup much faster and portable.

With the few differences between LiGet and BaGet, either one is a great option for an open-source, container-friendly, NuGet server. Both options allow for dipping your toe into a NuGet server on Windows while allowing yourself to move to Linux or a Docker image in the future without too much extra work.

### BaGet vs ProGet

If you’d prefer not to roll your own to some degree and take the easy route, there’s always ProGet. There are downsides though. ProGet is not open source and not free by any means. But, it’s easier to set up and work with.

There are a few major differences between ProGet and BaGet.

| Feature | ProGet | BaGet |
| --- | --- | --- |
| Cost | ProGet Free: Free, ProGet Basic: $1995/yr, ProGet Enterprise: $9995+/year | Free |
| Platform | Windows | Windows, Linux, Docker |
| Database | SQL | Internal |
| Support | ProGet Free: Email and Slack support, ProGet Basic and Enterprise: Defined SLAs with Email, Slack and Phone support | Community based through GitHub issues |

Inedo also has a breakdown all the [feature differences](https://docs.inedo.com/docs/proget/administration/license) between versions of ProGet.

## **Summary**

In this article, you learned a ton about various NuGet tools and technologies. If you were on the fence about which NuGet server to use, you should now have a lot more knowledge to help you make that decision.

You learned about how to get each NuGet tool set up to work with Windows and we covered many of the features of each

Share this article

[Share on X](https://twitter.com/intent/tweet?url=https%3A%2F%2Fadamtheautomator.com%2Fnuget-package-manager%2F&text=Choose%20the%20Right%20Nuget%20Package%20Manager%20and%20Set%20It%20Up%20with%20IIS)[Share on Facebook](https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fadamtheautomator.com%2Fnuget-package-manager%2F)[Share on LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fadamtheautomator.com%2Fnuget-package-manager%2F)

## Related Posts

![](https://adamtheautomator.com/wp-content/uploads/2026/06/featured_image-20.png)

### [Deploy Enterprise PowerShell Modules Using Azure Artifacts](/deploy-enterprise-powershell-modules-using-azure/)

Build a private PowerShell repository using Azure Artifacts with automated CI/CD publishing, semantic versioning, code signing, and JEA integration for secure enterprise module distribution.

![](https://adamtheautomator.com/wp-content/uploads/2025/01/featured-image-5.webp)

### [Build a Scalable PowerShell Pester Testing Framework](/powershell-pester-testing-framework/)

Learn how to create a maintainable and organized Pester testing framework for PowerShell that scales with your needs. Perfect for large test suites.

![](https://adamtheautomator.com/wp-content/uploads/2021/10/How-to-Edit-Files-with-a-Real-PowerShell-Text-Editor.jpg)

### [How to Edit Files with a Real PowerShell Text Editor](/powershell-text-editor/)

Tired of switching between PowerShell and the text editor windows? Why not use a PowerShell text editor instead? Learn how in this step-by-step tutorial

## Categories

*   [IT Ops](/category/it-ops/)
*   [Cloud](/category/cloud/)
*   [DevOps](/category/devops/)
*   [Home Ops](/category/home-ops/)
*   [Information Security](/category/infosec/)
*   [Software Development](/category/software-development/)

## Site

*   [Home](/)
*   [Tutorials](/tutorials/)
*   [Instructors](/author/)
*   [Advertising](/advertising/)
*   [Recommended Resources](/resources/)
*   [About Adam](/about-adam/)

Copyright 2026© ATA Learning | [Privacy Policy](/privacy/)
