Closed tarurar closed 1 year ago
Thank you for raising this issue, Andrei.
Since this whole chapter is about Web API projects that have to target the Web SDK, and this section is about how to decorate controller classes with attributes that would also only work in a project that targets the Web SDK, a target framework of Microsoft.NET.Sdk.Web
is already implied.
But in the eighth edition I will make it more explicit as you suggest. I've added an entry to the improvements sections for the sixth edition: https://github.com/markjprice/cs10dotnet6/blob/main/docs/errata/improvements.md#page-709---implementing-open-api-analyzers-and-conventions
I've also updated the relevant section for the seventh edition: https://github.com/markjprice/cs11dotnet7/blob/main/docs/bonus/advanced-features.md#implementing-open-api-analyzers-and-conventions
The mentioned steps are not enough. Open API analyzers work only for project which use sdk = "Microsoft.NET.Sdk.Web" and are not triggered for others.