PS C:\Users\Anjali kumari> dotnet-ef => A fatal error occurred. The required library hostfxr.dll could not be found
PS C:\Users\Anjali kumari> dotnet --info
.NET SDK (reflecting any global.json):
Version: 6.0.100
Commit: 9e8b04bbff
Runtime Environment:
OS Name: Windows
OS Version: 10.0.19043
OS Platform: Windows
RID: win10-x64
Base Path: C:\Users\Anjali kumari\AppData\Roaming.dotnet\sdk\6.0.100\
Host (useful for support):
Version: 6.0.0
Commit: 4822e3c3aa
.NET SDKs installed:
6.0.100 [C:\Users\Anjali kumari\AppData\Roaming.dotnet\sdk]
.NET runtimes installed:
Microsoft.AspNetCore.App 6.0.0 [C:\Users\Anjali kumari\AppData\Roaming.dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 6.0.0 [C:\Users\Anjali kumari\AppData\Roaming.dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 6.0.0 [C:\Users\Anjali kumari\AppData\Roaming.dotnet\shared\Microsoft.WindowsDesktop.App]
PS C:\Users\Anjali kumari> dotnet tool list --global
Package Id Version Commands
dotnet-aspnet-codegenerator 6.0.1 dotnet-aspnet-codegenerator
dotnet-ef 6.0.1 dotnet-ef
PS C:\Users\Anjali kumari> dotnet-ef
A fatal error occurred. The required library hostfxr.dll could not be found.
If this is a self-contained application, that library should exist in [C:\Users\Anjali kumari.dotnet\tools.store\dotnet-ef\6.0.1\dotnet-ef\6.0.1\tools\netcoreapp3.1\any].
If this is a framework-dependent application, install the runtime in the global location [C:\Program Files\dotnet] or use the DOTNET_ROOT environment variable to specify the runtime location or register the runtime location in [HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\x64\InstallLocation].