David Acker
David Acker
I'd be interested in helping out with this. Where should this new analyzer live in the project? Also, would it make sense to register code fixes for changing from `Add`...
@captainsafia @Youssef1313 Sounds good! I'll address the remaining comments within the next few days. I'll also file an issue in the docs repo and submit a PR to update the...
@adityamandaleeka Hmm, that's odd. I'm not getting those test failures locally. I'll dig into this a bit.
> @david-acker would you be interested in writing a sample app showing how to use you new Request decompression middleware? Absolutely! I'd be happy to put something together.
Just ran into this issue as well. The workaround didn't work either since `RenderModeInteractiveServer`, along with the other render mode attributes, appear to have been removed in .NET 8 ([source](https://devblogs.microsoft.com/dotnet/announcing-asp-net-core-in-dotnet-8/#upgrade-an-existing-project)).
Here are some other `record` types that I found in the project (excluding those in analyzer, test, and tools code): `Microsoft.AspNetCore.Components` https://github.com/dotnet/aspnetcore/blob/e1f66845c0c65b7ed8413cf75656762dd2698f40/src/Components/Components/src/ComponentFactory.cs#L123-L125 https://github.com/dotnet/aspnetcore/blob/e1f66845c0c65b7ed8413cf75656762dd2698f40/src/Components/Endpoints/src/Binding/Factories/ComplexType/ComplexTypeExpressionConverterFactoryOfT.cs#L159-L164 https://github.com/dotnet/aspnetcore/blob/da8a6f0766d1f333cc2faec72f97751e3c605dac/src/Components/Endpoints/src/Rendering/EndpointHtmlRenderer.cs#L251 https://github.com/dotnet/aspnetcore/blob/e1f66845c0c65b7ed8413cf75656762dd2698f40/src/Components/Endpoints/src/Rendering/EndpointHtmlRenderer.Streaming.cs#L248-L248 https://github.com/dotnet/aspnetcore/blob/e1f66845c0c65b7ed8413cf75656762dd2698f40/src/Components/Web/src/Forms/ExpressionFormatting/ExpressionFormatter.cs#L266 https://github.com/dotnet/aspnetcore/blob/e1f66845c0c65b7ed8413cf75656762dd2698f40/src/Components/WebAssembly/Server/src/TargetPickerUi.cs#L428-L436
I'm planning on working on this again fairly soon now that the API has finally approved.
We could add this new analyzer to the `Microsoft.AspNetCore.Analyzers` project in `src/Analyzers` since a similar middleware analyzer ([UseAuthorizationAnalyzer](https://github.com/dotnet/aspnetcore/blob/main/src/Analyzers/Analyzers/src/UseAuthorizationAnalyzer.cs#L11)) for [ASP0001](https://learn.microsoft.com/en-us/aspnet/core/diagnostics/asp0001?view=aspnetcore-7.0) lives there. Then we can leverage the existing middleware information...
Here's a simple suggestion for the title and message of the new diagnostic: **Title:** Custom IProblemDetailsWriter is incorrectly configured **Message:** The custom IProblemDetailsWriter must be registered before calling AddControllers, AddControllersWithViews,...
I'd be happy to put up a PR for this once the API for the new diagnostic is approved.