devdeer.Libraries.AspNetCore.RestApi 16.4.6

There is a newer version of this package available.
See the version list below for details.
dotnet add package devdeer.Libraries.AspNetCore.RestApi --version 16.4.6
                    
NuGet\Install-Package devdeer.Libraries.AspNetCore.RestApi -Version 16.4.6
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="devdeer.Libraries.AspNetCore.RestApi" Version="16.4.6" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="devdeer.Libraries.AspNetCore.RestApi" Version="16.4.6" />
                    
Directory.Packages.props
<PackageReference Include="devdeer.Libraries.AspNetCore.RestApi" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add devdeer.Libraries.AspNetCore.RestApi --version 16.4.6
                    
#r "nuget: devdeer.Libraries.AspNetCore.RestApi, 16.4.6"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package devdeer.Libraries.AspNetCore.RestApi@16.4.6
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=devdeer.Libraries.AspNetCore.RestApi&version=16.4.6
                    
Install as a Cake Addin
#tool nuget:?package=devdeer.Libraries.AspNetCore.RestApi&version=16.4.6
                    
Install as a Cake Tool

devdeer.Libraries.AspNetCore.RestApi

Disclaimer

If you want to use this package you should be aware of some principles and practices we at DEVDEER use. So be aware that this is not backed by a public repository. The purpose here is to give out customers easy access to our logic. Nevertheless you are welcome to use this lib if it provides any advantages.

Summary

This package is used to provide startup logic, base types and other specific logic to ASP.NET Core API projects.

Please keep in mind that this package is not intended to be used in UI web projects!

Usage

One of the main purposes for this packages was the fact, that the initial configuration of ASP.NET APIs can be overwhelming. You need to inject dependencies and app components in the correct order. Also you often want to put configuration of those things to outside stores (appsettings.json in our case). This package now reduces all of this to only some lines of code. You could use this as follows in the Program.cs:

var options = new ConfigurationOptions
{
    // your explicit options and callbacks
};
var builder = WebApplication.CreateBuilder(args);
builder.Host.ConfigureLogging();
builder.Services.ConfigureServices(builder.Configuration, options);
// your additional DI here
var app = builder.Build();
app.ConfigureDefaults(options);
app.Run();

Now it is crucial to unserstand that ConfigureLogging(), ConfigureServices() and ConfigureDefaults() are methods coming from this package. The outcome can be controlled in 2 ways:

  1. Usage of ConfigurationOptions. You can define some of the wanted behavior using this type and pass it in.
  2. Putting elements in your appsettings.*.json.

Some common app settings are:

{
    "AzureAd": {
		"Instance": "https://login.microsoftonline.com/",
		"TenantId": "",
		"Domain": ""
	},
	"Cors": {
		"EnableCors": true,
		"AllowCredentials": false,
		"AllowedHeaders": ["*"],
		"AllowedMethods": ["GET", "POST"]
	},
    "Swagger": {
		"ApiDescription": "",
		"DeprecatedApiMessage": "<p><strong><span style='color:white;background-color:red'>DEPRECATED</span></strong></p>",
		"Contact": {
			"Name": "",
			"Email": ""
		},
		"SupportedVersions": [{
			"Major": 1,
			"Minor": 0
		}],
		"Enable": true
	}
}

Using the syntax above will automatically configure the respective services in the correct order with just two lines of code.

More Details

Swagger

We are automatically referencing Swashbuckle and configuring it if the app is running in Development and the app config tells us to do it. By default we are using versioned APIs meaning that all controllers are expected to expose endpoints using a version.

Authentication

If the AzureAd config option is set we automatically configure authentication to AzureAD or Azure AD B2C.

About DEVDEER

DEVDEER is a company from Magdeburg, Germany which is specialized in consulting, project management and development. We are very focussed on Microsoft Azure as a platform to run our products and solutions in the cloud. So all of our backend components usually runs in this environment and is developed using .NET. In the frontend area we are using react and a huge bunch of packages to build our UIs.

You can find us online:

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
23.0.1 152 12/21/2025
23.0.0 125 12/13/2025
22.4.2 452 12/11/2025
22.4.1 412 12/11/2025
22.4.0 213 12/5/2025
22.3.4 245 11/28/2025
22.3.3 206 11/22/2025
22.3.2 194 11/22/2025
22.3.1 360 11/21/2025
22.3.0 337 11/21/2025
22.2.2 248 11/7/2025
22.2.1 420 10/21/2025
22.2.0 187 10/18/2025
22.1.9 256 10/15/2025
22.1.8 191 10/15/2025
22.1.7 200 10/15/2025
22.1.6 193 10/15/2025
22.1.5 215 10/15/2025
22.1.4 200 10/14/2025
22.1.3 209 10/13/2025
22.1.2 226 10/12/2025
22.1.1 189 10/12/2025
22.1.0 171 10/12/2025
22.0.5 154 10/11/2025
22.0.4 131 10/11/2025
22.0.3 140 10/11/2025
22.0.2 132 10/11/2025
22.0.1 141 10/11/2025
22.0.0 127 10/11/2025
21.2.5 230 10/7/2025
21.2.4 207 10/7/2025
21.2.3 202 10/7/2025
21.2.2 215 10/6/2025
21.2.1 203 10/6/2025
21.2.0 201 10/6/2025
21.1.8 204 10/6/2025
21.1.7 200 10/6/2025
21.1.6 200 10/6/2025
21.1.5 203 10/6/2025
21.1.4 207 10/4/2025
21.1.2 199 10/4/2025
21.1.1 190 10/4/2025
21.0.2 141 10/4/2025
21.0.1 207 9/29/2025
21.0.0 158 9/27/2025
20.2.4 536 8/28/2025
20.2.3 262 8/28/2025
20.2.2 429 8/13/2025
20.2.1 292 7/29/2025
20.2.0 160 7/29/2025
20.1.5 187 7/29/2025
20.1.4 176 7/29/2025
20.1.3 634 7/22/2025
20.1.2 586 7/22/2025
20.1.0 239 7/17/2025
20.0.2 226 7/17/2025
20.0.1 228 7/16/2025
20.0.0 210 7/16/2025
19.1.1 694 6/11/2025
19.1.0 216 5/30/2025
19.0.2 372 5/16/2025
19.0.1 298 5/16/2025
19.0.0 350 4/11/2025
18.0.1 402 3/18/2025
18.0.0 303 2/14/2025
17.1.7 724 1/15/2025
17.1.6 217 1/15/2025
17.1.5 659 1/8/2025
17.1.4 312 1/6/2025
17.1.3 251 1/6/2025
17.1.2 235 1/5/2025
17.1.1 218 1/5/2025
17.1.0 245 1/4/2025
17.0.2 595 12/24/2024
17.0.1 391 12/13/2024
17.0.0 338 12/11/2024
16.5.0 927 12/2/2024
16.4.7 343 11/1/2024
16.4.6 301 10/30/2024
16.4.5 233 10/30/2024
16.4.4 221 10/30/2024
16.4.3 617 10/27/2024
16.4.2 230 10/27/2024
16.4.1 213 10/27/2024
16.4.0 244 10/27/2024
16.3.3 351 10/14/2024
16.3.2 243 10/14/2024
16.3.1 280 10/12/2024
16.3.0 317 10/3/2024
16.2.2 546 8/23/2024
16.2.1 715 6/27/2024
16.2.0 225 6/27/2024
16.1.5 555 6/12/2024
16.1.4 237 6/12/2024
16.1.3 534 5/30/2024
16.1.2 244 5/29/2024
16.1.1 231 5/28/2024
16.1.0 233 5/28/2024
16.0.0 265 5/24/2024
15.0.1 265 5/19/2024
15.0.0 276 5/14/2024
14.4.3 238 5/14/2024
14.4.1 474 4/19/2024
14.4.0 258 4/19/2024
14.3.0 373 3/21/2024
14.2.0 474 3/11/2024
14.1.1 259 3/9/2024
14.1.0 263 3/9/2024
14.0.1 531 2/18/2024
14.0.0 704 1/20/2024
13.0.5 257 1/18/2024
13.0.4 645 12/25/2023
13.0.3 265 12/25/2023
13.0.2 431 12/11/2023
13.0.0 277 12/10/2023
12.7.5 396 11/9/2023
12.7.4 232 11/9/2023
12.7.3 293 10/29/2023
12.7.2 261 10/29/2023
12.7.1 324 9/27/2023
12.7.0 269 9/16/2023
12.6.4 269 9/14/2023
12.6.2 295 9/8/2023
12.6.1 272 9/7/2023
12.6.0 264 9/6/2023
12.5.0 599 8/15/2023
12.4.1 245 8/15/2023
12.4.0 285 8/15/2023
12.3.0 840 5/30/2023
12.2.1 327 5/29/2023
12.2.0 310 5/24/2023
12.1.0 315 5/24/2023
12.0.0 339 5/24/2023
11.0.5 842 5/23/2023
11.0.4 324 5/23/2023
11.0.3 288 5/23/2023
11.0.2 368 5/21/2023
11.0.1 321 5/21/2023
11.0.0 324 5/21/2023
10.6.0 342 5/21/2023
10.5.13 1,150 4/12/2023
10.5.12 376 4/12/2023
10.5.11 364 4/12/2023
10.5.10 635 4/12/2023
10.5.9 391 4/6/2023
10.5.8 596 3/14/2023
10.5.7 403 3/14/2023
10.5.6 810 3/11/2023
10.5.5 856 1/13/2023
10.5.4 714 1/10/2023
10.5.3 500 1/4/2023
10.5.2 470 1/3/2023
10.5.1 621 12/29/2022
10.5.0 718 12/29/2022
10.4.2 494 12/29/2022
10.4.0 844 12/23/2022
10.2.24 1,582 10/19/2022
10.2.23 598 10/19/2022
10.2.22 558 10/18/2022
10.2.21 563 10/17/2022
10.2.20 579 10/17/2022
10.2.19 590 10/17/2022
10.2.18 855 9/13/2022
10.2.17 1,460 9/13/2022
10.2.16 1,059 9/7/2022
10.2.15 868 9/6/2022
10.2.14 1,228 9/6/2022
10.2.13 631 9/6/2022
10.2.12 846 9/6/2022
10.2.11 857 9/6/2022
10.2.10 801 9/6/2022
10.2.9 1,076 9/5/2022
10.2.8 735 8/15/2022
10.2.7 666 8/13/2022
10.2.6 807 8/5/2022
10.2.5 786 7/19/2022
10.2.4 1,451 5/16/2022
10.2.3 699 5/16/2022
10.2.2 1,638 3/20/2022
10.2.0 813 3/20/2022
10.1.1 834 3/18/2022
10.1.0 797 3/14/2022
10.0.0 837 3/1/2022
9.0.4 870 2/28/2022
9.0.3 1,975 1/24/2022
9.0.2 746 12/22/2021
9.0.1 567 12/22/2021
9.0.0 558 12/22/2021
8.0.5 1,149 12/1/2021
8.0.3 1,222 8/14/2021
8.0.2 750 8/14/2021
8.0.1 845 8/14/2021
8.0.0 666 8/9/2021
7.0.13 1,552 7/12/2021
7.0.12 1,079 6/9/2021
7.0.11 1,575 5/1/2021
7.0.10 1,212 5/1/2021
1.4.0 966 8/25/2020

- If NLog is used the system now looks for a "nlog.{ASPNET_ENVIRONEMENT}.config" and uses it if found.
- Auto-registration logs are set back to level TRACE.
- `SwaggerHealthCheckUriResolver` now handles exceptions when the host name cannot be resolved automatically.
- New extensions for `IConfiguration` `RunsInContainer()`.
- `ExceptionHandlingMiddleware` now can be configured to exclude routes from handling using `ConfigurationOptions.RoutesToExcludeFromExceptionMiddleware`. The default routes ignored now are "/health" and "/swagger".
- `ExceptionHandlingMiddleware` will skip exception if headers already sent