You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Just a quick report about an issue I had today with Chapter 10 (not specifically an issue with the book, but took a bit of searching to fix)
Hardware is an M1 Mac Mini, running Monterey, only version of .NET Sdk installed is Core 6(.0.201), ARM version.
Following the dotnet tool install --global dotnet-ef --version 6.0.0 and then adding it to the path appears to work fine at first glance, but running the subsequent steps to scaffold models using the existing database threw up an error...
running the dotnet ef dbcontext [...] resulted in
A fatal error occurred. The required library libhostfxr.dylib could not be found.
If this is a self-contained application, that library should exist in [/Users/[name]/.dotnet/tools/.store/dotnet-ef/6.0.0/dotnet-ef/6.0.0/tools/netcoreapp3.1/any/].
If this is a framework-dependent application, install the runtime in the global location [/usr/local/share/dotnet/x64] or use the DOTNET_ROOT environment variable to specify the runtime location or register the runtime location in [/etc/dotnet].
After a bit of Googling, seems like there's an issue with the tool installer which made it install the x86 version instead of the ARM version.
Uninstalling the x86 version using dotnet tool uninstall --global dotnet-ef and then following the instructions at dotnet/sdk#21187 (comment) to force the install of the ARM version using dotnet tool install --global dotnet-ef -a arm64 then allowed the dotnet ef dbcontext [...] step further on to work correctly.
Hope this helps someone!
The text was updated successfully, but these errors were encountered:
Just a quick report about an issue I had today with Chapter 10 (not specifically an issue with the book, but took a bit of searching to fix)
Hardware is an M1 Mac Mini, running Monterey, only version of .NET Sdk installed is Core 6(.0.201), ARM version.
Following the
dotnet tool install --global dotnet-ef --version 6.0.0
and then adding it to the path appears to work fine at first glance, but running the subsequent steps to scaffold models using the existing database threw up an error...running the
dotnet ef dbcontext [...]
resulted inAfter a bit of Googling, seems like there's an issue with the tool installer which made it install the x86 version instead of the ARM version.
Uninstalling the x86 version using
dotnet tool uninstall --global dotnet-ef
and then following the instructions at dotnet/sdk#21187 (comment) to force the install of the ARM version usingdotnet tool install --global dotnet-ef -a arm64
then allowed thedotnet ef dbcontext [...]
step further on to work correctly.Hope this helps someone!
The text was updated successfully, but these errors were encountered: