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:
<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[
^]