I have
NuGet Microsoft.AspNetCore.Http.Abstractions
NuGet Microsoft.AspNetCore.Routing
and use the namespaces
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Routing;
I wanted to build something like this but it does not seem to know IEndpointConventionBuilder nor IEndpointRouteBuilder and refuses to compile.
public static class EndpointRouteBuilderExtensions
{
public static IEndpointConventionBuilder MapServiceEndpoints(this IEndpointRouteBuilder endpoints)
{
//some code
}
}
What am I missing...?
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>
<FrameworkReference Include="Microsoft.AspNetCore.App" />
</ItemGroup>
</Project>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With