CapitalSix.AspNetCore.Extensions
9.0.1
dotnet add package CapitalSix.AspNetCore.Extensions --version 9.0.1
NuGet\Install-Package CapitalSix.AspNetCore.Extensions -Version 9.0.1
<PackageReference Include="CapitalSix.AspNetCore.Extensions" Version="9.0.1" />
<PackageVersion Include="CapitalSix.AspNetCore.Extensions" Version="9.0.1" />
<PackageReference Include="CapitalSix.AspNetCore.Extensions" />
paket add CapitalSix.AspNetCore.Extensions --version 9.0.1
#r "nuget: CapitalSix.AspNetCore.Extensions, 9.0.1"
#addin nuget:?package=CapitalSix.AspNetCore.Extensions&version=9.0.1
#tool nuget:?package=CapitalSix.AspNetCore.Extensions&version=9.0.1
AspNetCore Extensions
A collection of reusable AspNetCore extensions.
Version Information
Version information can be crusial when monitoring an application. Just like "health" it is important to get information about a running application.
This extension adds an endpoint to your WebApp or Api. This information will return a json object which contains the version of the application and the hash that represents the last commit of the application. With this information you can always monitor which version is running in each environment of your DTAP environments.
Here is an example of the output
{"version":"6.2.1","commit":"b7a45f"}
How to use
In your app register the following service:
services.AddVersionInfo();
In your app register the following mapping:
app.UseEndpoints(endpoints =>
{
endpoints.MapVersion("/version");
endpoints.MapHealthChecks("/health", new HealthCheckOptions
{
Predicate = _ => true,
ResponseWriter = UIResponseWriter.WriteHealthCheckUIResponse
});
endpoints.MapControllers();
});
How to use
Once all registrations have been added, just start your application and open the url: <baseUrl>/version
ie.: https://localhost:5001/version
This will show the version json.
Product | Versions 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 is compatible. 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 is compatible. 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. |
-
net6.0
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 6.0.0)
- Microsoft.Extensions.Hosting.Abstractions (>= 6.0.1)
- Microsoft.Extensions.Logging.Abstractions (>= 6.0.4)
-
net7.0
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 7.0.0)
- Microsoft.Extensions.Hosting.Abstractions (>= 7.0.0)
- Microsoft.Extensions.Logging.Abstractions (>= 7.0.1)
-
net8.0
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 8.0.2)
- Microsoft.Extensions.Hosting.Abstractions (>= 8.0.1)
- Microsoft.Extensions.Logging.Abstractions (>= 8.0.3)
-
net9.0
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.3)
- Microsoft.Extensions.Hosting.Abstractions (>= 9.0.3)
- Microsoft.Extensions.Logging.Abstractions (>= 9.0.3)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.