Open natelaff opened 2 years ago
@pranavkm @captainsafia your analyzers are working.
@natelaff we'll try to get a sample for you.
@natelaff would you be able to submit a PR to fix this?
@Rick-Anderson i don't know how to fix this 🤷♂️ its Microsoft's guidance that is triggering the warning. I don't know the proper method hence me opening this issue ;)
Show example with new hosting model for https://docs.microsoft.com/en-us/aspnet/core/web-api/jsonpatch?view=aspnetcore-6.0#json-patch-addnewtonsoftjson-and-systemtextjson
The current implementation results in warning
Warning ASP0000 Calling 'BuildServiceProvider' from application code results in an additional copy of singleton services being created. Consider alternatives such as dependency injecting services as parameters to 'Configure'.
This is relevant to code
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.