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
                    
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="CapitalSix.AspNetCore.Extensions" Version="9.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="CapitalSix.AspNetCore.Extensions" Version="9.0.1" />
                    
Directory.Packages.props
<PackageReference Include="CapitalSix.AspNetCore.Extensions" />
                    
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 CapitalSix.AspNetCore.Extensions --version 9.0.1
                    
#r "nuget: CapitalSix.AspNetCore.Extensions, 9.0.1"
                    
#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.
#addin nuget:?package=CapitalSix.AspNetCore.Extensions&version=9.0.1
                    
Install CapitalSix.AspNetCore.Extensions as a Cake Addin
#tool nuget:?package=CapitalSix.AspNetCore.Extensions&version=9.0.1
                    
Install CapitalSix.AspNetCore.Extensions as a Cake Tool

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 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. 
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
9.0.1 105 4/4/2025
9.0.0 149 4/3/2025