If you're creating an ASP.NET Core library, then you need to include the FrameworkReference
in the project file as follows:
<Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFramework>netcoreapp3.0</TargetFramework> </PropertyGroup><ItemGroup>\r\n <FrameworkReference Include="Microsoft.AspNetCore.App" /> </ItemGroup>\r\n\r\n</Project>
Link: https://stackoverflow.com/questions/59873726/iendpointroutebuilder-interface-not-found