Installation Guide
Default means to install Wolfringo is through NuGet package.
Wolfringo metapackage will automatically install Wolfringo.Core, Wolfringo.Commands, Wolfringo.Utilities and Wolfringo.Utilities.Interactive.
- Manage NuGet Packages for your bot project.
- Click "Browse" and type "Wolfringo". Note: checking "Include prerelease" allows downloading beta versions.
- Select "Wolfringo" package.
- Press install in the window on the right.
Run following command in VS Package Manager Console:
Install-Package Wolfringo -Version 1.1.1
Run following commands in command line:
dotnet add package Wolfringo --version 1.1.1
dotnet restore
Add following package reference to your .csproj file:
<PackageReference Include="Wolfringo" Version="1.1.1" />
If you need more fine-grained control, you can install these packages individually instead of installing Wolfringo.
Installing for .NET Generic Host/ASP.NET Core
Wolfringo includes support for .NET Generic Host (for example with ASP.NET Core - but not only). To enable it, I recommend installing Wolfringo.Hosting.
Wolfringo.Hosting includes extension methods for IServiceCollection that can be used when registering services (for example, in ASP.NET Core's Startup.cs
). Additionally, this package includes wrappers HostedWolfClient and HostedCommandsService, both of which implement IHostedService to integrate with host lifetime.
- Follow steps to Install Wolfringo.
- Run following command in VS Package Manager Console:
Install-Package Wolfringo.Hosting -Version 1.1.1
- Follow steps to Install Wolfringo.
- Run following commands in command line:
dotnet add package Wolfringo.Hosting --version 1.1.1
dotnet restore
- Follow steps to Install Wolfringo.
- Add following package reference to your .csproj file:
<PackageReference Include="Wolfringo.Hosting" Version="1.1.1" />
Older versions
If you need to install older version (0.1.0 - 0.3.4) of Wolfringo, you need to use GitHub Packages.
Note: versions 0.1.X and 0.2.X are unstable and therefore deprecated. Use at own risk.
The first version that can be considered safe for use is 0.3.1.
- Create a GitHub personal access token (PAT): https://github.com/settings/tokens/new. Make sure you check
read:packages
scope.
- Manage NuGet Packages for your bot project.
- Click "Settings" cog in the top right section of Package Manager window.
- In the window that opens, press add button.
- Once new item appears on the list, on the bottom of the window set Name to "TehGM's GitHub" and Source to "https://nuget.pkg.github.com/TehGM/index.json", then press "Update", and then "OK".
- Select "TehGM's GitHub" package source.
- A window will pop up with prompt for credentials.
For User name, input your GitHub Username.
For Password, input you GitHub PAT created in step 1.
Optionally, check box to remember credentials.
Press OK.
- Select and install any of the Wolfringo Packages.
- Create a GitHub personal access token (PAT): https://github.com/settings/tokens/new. Make sure you check
read:packages
scope.
- Run following commands to authenticate with GitHub Packages, replacing and with your github username and generated PAT, respectively:
dotnet nuget add source https://nuget.pkg.github.com/TehGM/index.json -n "TehGM's GitHub" -u <GithubUsername> -p <GithubToken>
- Install Wolfringo package in your project:
Install-Package Wolfringo -Source "TehGM's GitHub"
- (.NET Generic Host/ASP.NET Core only) Install Wolfringo.Hosting package:
Install-Package Wolfringo.Hosting -Source "TehGM's GitHub"
- Create a GitHub personal access token (PAT): https://github.com/settings/tokens/new. Make sure you check
read:packages
scope.
- Run following commands to authenticate with GitHub Packages, replacing and with your github username and generated PAT, respectively:
dotnet nuget add source https://nuget.pkg.github.com/TehGM/index.json -n "TehGM's GitHub" -u <GithubUsername> -p <GithubToken>
- Install package in your project:
dotnet add package Wolfringo --source "TehGM's GitHub"
- (.NET Generic Host/ASP.NET Core only) Install Wolfringo.Hosting package:
dotnet add package Wolfringo.Hosting --source "TehGM's GitHub"
- Restore packages:
dotnet restore
- Create a GitHub personal access token (PAT): https://github.com/settings/tokens/new. Make sure you check
read:packages
scope.
- Run following commands to authenticate with GitHub Packages, replacing and with your github username and generated PAT, respectively:
dotnet nuget add source https://nuget.pkg.github.com/TehGM/index.json -n "TehGM's GitHub" -u <GithubUsername> -p <GithubToken>
- Add Wolfringo package reference to your .csproj file:
<PackageReference Include="Wolfringo" Version="0.3.4" />
- (.NET Generic Host/ASP.NET Core only) Add Wolfringo.Hosting package reference to your .csproj file:
<PackageReference Include="Wolfringo.Hosting" Version="0.3.3" />
- Restore packages with command line:
dotnet restore
See GitHub Packages for more information about installing GitHub packages.