Click here to Skip to main content
16,016,425 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am installing in my system ASP Netcore 3.1 but unable to get this name space

<TargetFramework>netcoreapp3.1</TargetFramework>


What I have tried:

but show in intelligence in this namespace
using Microsoft.Extensions.Hosting.Internal;
instad of this namespace i need
Microsoft.AspNetCore.Hosting.Internal
Posted
Updated 15-Nov-22 0:43am
Comments
Graeme_Grant 14-Nov-22 21:52pm    
Why v3.1 when v7.0 was released last week? v3.1 is 4 generations ago... 7.0 is faster without changing any code, simply changing the version and recompiling, plus simpler code...

1 solution

There is no Microsoft.AspNetCore.Hosting.Internal namespace. It doesn't exist.

There is a Microsoft.AspNetCore.Hosting namespace:
Microsoft.AspNetCore.Hosting Namespace | Microsoft Learn[^]

To use that namespace from a project using the Microsoft.NET.Sdk SDK, you need to add a framework reference to your project:
XML
<ItemGroup>
    <FrameworkReference Include="Microsoft.AspNetCore.App" />
</ItemGroup>
If your project uses the Microsoft.NET.Sdk.Web SDK, that reference is included automatically.

Use ASP.NET Core APIs in a class library | Microsoft Learn[^]
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900