Ask or search…
K
Links
Comment on page

Installation and Project Setup

Installation

Find the package manager and type install-package Perigee. It's available on NuGet.

License Installation

To install your .license 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 .license is in the executable directory.

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!

Basic Configuration

To actually use the logging, we need a basic appsettings.json file in the project.
A) Either drop the included sample configuration into the project
appsettings.json
223B
Code
B) OR - Create the file (appsettings.json) in the root of the project with the code below:
{
"ConnectionStrings": {
},
"AppSettings": {
},
"Perigee": { "HideConsole": false },
"Serilog": {
"MinimumLevel": "Debug",
"WriteTo": [
{ "Name": "Console" }
]
}
}

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!

We will cover additional logging and configuration in /HelloLogs 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:
using Microsoft.Extensions.Logging;
using Perigee;
You can always click the
💡
icon or press ctrl+. to find missing namespaces:
That's it! Perigee is installed and ready to go. Head to the next section, let's write our first "Hello Perigee!" application