AspNetCore.Extensions.Protobuf 2.0.0

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

Protobuf formatter for ASP.NET Core.

This library support application/x-protobuf-json and application/x-protobuf HTTP request headers by default:

POST your_api_url
Content-Type: application/x-protobuf-json
Accept: application/x-protobuf-json

{
  "dogs": [
    {
      "name": "d1",
      "age": 3
    }
  ]
}

Custom Content-Type header fields are also supported:

var builder = WebApplication.CreateBuilder(args);

builder.AddProtobufFormatters(opt =>
{
    opt.InputFormatters.Add(new ProtobufInputFormatter());
    opt.InputFormatters.Add(new ProtobufJsonInputFormatter(["application/x-json"]));

    opt.OutputFormatters.Add(new ProtobufOutputFormatter());
    opt.OutputFormatters.Add(new ProtobufJsonOutputFormatter());
});

How to use proto files in c# project: C# Tooling support for .proto files.

You can get more details in the sample projects.

Product Compatible and additional computed target framework versions.
.NET 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
2.0.0 189 11/22/2024
1.1.0 234 9/2/2024
1.0.0 178 2/28/2024