# Installation and Project Setup

## Installation

Find the package manager and type `install-package Perigee`. It's available on [NuGet](https://www.nuget.org/packages/perigee).

![](https://2203366127-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FloJjRj49SSQfSrp7vuw9%2Fuploads%2FaqZ2ZeVNG0ZfJy29b98t%2FInstallPackage.gif?alt=media\&token=24ab90c5-9540-4401-ba25-dd20462d384e)

## License Installation

To install your <mark style="color:purple;">**.license**</mark> file, simply add it to the projects root folder and set it to "Copy Always".

Installation on a deployed application is exactly the same! Make sure the <mark style="color:purple;">**.license**</mark> is in the executable directory.

<figure><img src="https://2203366127-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FloJjRj49SSQfSrp7vuw9%2Fuploads%2Fj2pBdveUjeSe6ahenLf6%2Fimage.png?alt=media&#x26;token=4f6a615f-fafe-4d63-bed4-335d541f0dac" alt=""><figcaption></figcaption></figure>

{% hint style="success" %}

#### <mark style="color:red;">It's very important to set the "Copy to Output Directory" to "Copy Always" under the property inspector - otherwise the build can't see the file!</mark>

![](https://2203366127-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FloJjRj49SSQfSrp7vuw9%2Fuploads%2F7j0Az5XrRGa712uBlEmb%2Fimage.png?alt=media\&token=0dab2602-2f1c-4c17-b928-8df82f95dbbb)
{% endhint %}

## Basic Configuration

To actually use the logging, we need a basic <mark style="color:green;">**appsettings.json**</mark> file in the project.&#x20;

**A) Either drop the included sample configuration into the project**

{% file src="<https://2203366127-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FloJjRj49SSQfSrp7vuw9%2Fuploads%2FxpAc13rTPhOqpXrNFlLv%2Fappsettings.json?alt=media&token=93ad2508-6b53-4cbd-aabc-25f936b7d653>" %}

&#x20;**B) OR - Create the file (**<mark style="color:green;">**appsettings.json**</mark>**) in the root of the project with the code below:** &#x20;

```json
{
  "ConnectionStrings": {
  
  },
  "AppSettings": {
  
  },
  "Perigee": { "HideConsole": false },
  "Serilog": {
    "MinimumLevel": "Debug",
    "WriteTo": [
      { "Name": "Console" }
    ]
  }
}
```

{% hint style="success" %}

#### <mark style="color:red;">It's very important to set the "Copy to Output Directory" to "Copy Always" under the property inspector - otherwise the build can't see the file!</mark>

![](https://2203366127-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FloJjRj49SSQfSrp7vuw9%2Fuploads%2F7j0Az5XrRGa712uBlEmb%2Fimage.png?alt=media\&token=0dab2602-2f1c-4c17-b928-8df82f95dbbb)
{% endhint %}

We will cover additional logging and configuration in [/HelloLogs](https://docs.perigee.software/getting-started/hello-logs) later!

## A quick word on "Using" Statements

Since we use Serilog, you may be inclined to use those namespaces at the top of your code. Typically speaking, we import the `Microsoft.Extensions.Logging` package instead. Since Serilog extends that generic functionality, we can do everything we need to with its inclusion. To get access to the logging functions, put this include at the top of the project:

```csharp
using Microsoft.Extensions.Logging;
using Perigee;
```

You can always click the :bulb:icon or press `ctrl+.` to find missing namespaces:

![](https://2203366127-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FloJjRj49SSQfSrp7vuw9%2Fuploads%2FwQdH5st1yRE3Qap3WsLJ%2FFindUsing.gif?alt=media\&token=ce5983f3-7cc8-45dd-89ce-17f09ee8b298)

That's it! Perigee is installed and ready to go. Head to the next section, let's write our first "Hello Perigee!" application


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.perigee.software/getting-started/installation-and-project-setup.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
