Open
Description
Is there an existing issue for this?
- I have searched the existing issues
Describe the bug
using FromHeader
attribute on minimal API parameter with type StringValues
type produce error on build and analyze
Program.cs(7,18,7,70): error ASP0020: Parameter 'ifMatch' of type StringValues should define a bool TryParse(string, IFormatProvider, out StringValues) method, or implement IParsable<StringValues> (https://aka.ms/aspnet/analyzers)
Expected Behavior
No response
Steps To Reproduce
build this code:
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Primitives;
var builder = WebApplication.CreateBuilder(args);
var app = builder.Build();
app.MapGet("/", ([FromHeader(Name = "If-Match")] StringValues ifMatch) => ifMatch);
app.Run();
Exceptions (if any)
No response
.NET Version
8.0.202
Anything else?
there is an issue (#40752) that address same bug in previous versions. It seems it's returned again