question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Failed to load 6.0.0-preview.3.21201.4/libhostfxr.dylib, no suitable image found. Mac M1

See original GitHub issue

File a bug

Remember:

  • Please check that the documentation does not explain the behavior you are seeing.
  • Please search in both open and closed issues to check that your bug has not already been filed.

Include your code

To fix any bug we must first reproduce it. To make this possible, please attach a small, runnable project or post a small, runnable code listing that reproduces what you are seeing.

It is often impossible for us to reproduce a bug when working with only code snippets since we have to guess at the missing code.

Use triple-tick code fences for any posted code.

dotnet ef dbcontext scaffold  "ConnectionString" MySql.Data.EntityFrameworkCore -o Model -f

Include stack traces

Include the full exception message and stack trace for any exception you encounter.

Use triple-tick fences for stack traces.

Failed to load /usr/local/share/dotnet/host/fxr/6.0.0-preview.3.21201.4/libhostfxr.dylib, error: dlopen(/usr/local/share/dotnet/host/fxr/6.0.0-preview.3.21201.4/libhostfxr.dylib, 1): no suitable image found.  Did find:
        /usr/local/share/dotnet/host/fxr/6.0.0-preview.3.21201.4/libhostfxr.dylib: mach-o, but wrong architecture
        /usr/local/share/dotnet/host/fxr/6.0.0-preview.3.21201.4/libhostfxr.dylib: mach-o, but wrong architecture
The library libhostfxr.dylib was found, but loading it from /usr/local/share/dotnet/host/fxr/6.0.0-preview.3.21201.4/libhostfxr.dylib failed
  - Installing .NET prerequisites might help resolve this problem.
     https://go.microsoft.com/fwlink/?linkid=2063366

Include verbose output

Please include --verbose output when filing bugs about the dotnet ef or Package Manager Console tools.

Use triple-tick fences for tool output.

Failed to load /usr/local/share/dotnet/host/fxr/6.0.0-preview.3.21201.4/libhostfxr.dylib, error: dlopen(/usr/local/share/dotnet/host/fxr/6.0.0-preview.3.21201.4/libhostfxr.dylib, 1): no suitable image found.  Did find:
        /usr/local/share/dotnet/host/fxr/6.0.0-preview.3.21201.4/libhostfxr.dylib: mach-o, but wrong architecture
        /usr/local/share/dotnet/host/fxr/6.0.0-preview.3.21201.4/libhostfxr.dylib: mach-o, but wrong architecture
The library libhostfxr.dylib was found, but loading it from /usr/local/share/dotnet/host/fxr/6.0.0-preview.3.21201.4/libhostfxr.dylib failed
  - Installing .NET prerequisites might help resolve this problem.
     https://go.microsoft.com/fwlink/?linkid=2063366

Include provider and version information

EF Core version: 5.0.6 Database provider: MySql.Data.EntityFrameworkCore Target framework: 6.0.100-preview.3.21202.5 Operating system: macOS Big Sur 11.3.1 M1 IDE: console

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:6
  • Comments:30 (12 by maintainers)

github_iconTop GitHub Comments

3reactions
bricelamcommented, Jun 28, 2021

☹️ Sorry friends, I’m still trying to get access to an M1 so I can dig into this.

2reactions
johnseedcommented, Jul 19, 2021

My mistake, it is not completely fixed, dotnet --version, build, run is working, but the ef scaffold is not

John@Johns-MacBook-Pro XX.Scaffold % dotnet ef dbcontext scaffold  "xxx" Pomelo.EntityFrameworkCore.MySql -o Model --schema xxx -t tablex  -f

Failed to load /usr/local/share/dotnet/host/fxr/6.0.0-preview.6.21352.12/libhostfxr.dylib, error: dlopen(/usr/local/share/dotnet/host/fxr/6.0.0-preview.6.21352.12/libhostfxr.dylib, 1): no suitable image found.  Did find:
        /usr/local/share/dotnet/host/fxr/6.0.0-preview.6.21352.12/libhostfxr.dylib: mach-o, but wrong architecture
        /usr/local/share/dotnet/host/fxr/6.0.0-preview.6.21352.12/libhostfxr.dylib: mach-o, but wrong architecture
The library libhostfxr.dylib was found, but loading it from /usr/local/share/dotnet/host/fxr/6.0.0-preview.6.21352.12/libhostfxr.dylib failed
  - Installing .NET prerequisites might help resolve this problem.
     https://go.microsoft.com/fwlink/?linkid=2063366


John@Johns-MacBook-Pro XX.Scaffold % dotnet ef dbcontext scaffold "xxx" Npgsql.EntityFrameworkCore.PostgreSQL -o xxx -c XXContext -t tablex -f

Failed to load /usr/local/share/dotnet/host/fxr/6.0.0-preview.6.21352.12/libhostfxr.dylib, error: dlopen(/usr/local/share/dotnet/host/fxr/6.0.0-preview.6.21352.12/libhostfxr.dylib, 1): no suitable image found.  Did find:
        /usr/local/share/dotnet/host/fxr/6.0.0-preview.6.21352.12/libhostfxr.dylib: mach-o, but wrong architecture
        /usr/local/share/dotnet/host/fxr/6.0.0-preview.6.21352.12/libhostfxr.dylib: mach-o, but wrong architecture
The library libhostfxr.dylib was found, but loading it from /usr/local/share/dotnet/host/fxr/6.0.0-preview.6.21352.12/libhostfxr.dylib failed
  - Installing .NET prerequisites might help resolve this problem.
     https://go.microsoft.com/fwlink/?linkid=2063366
John@Johns-MacBook-Pro XX.Scaffold % 
Read more comments on GitHub >

github_iconTop Results From Across the Web

Reason: no suitable image found [closed]
This occurs if the referencing project is out of date with respect to the referenced library. I found that I had updated my...
Read more >
No suitable image found. | Apple Developer Forums
Hello,. Please help me solve this error: IB Designables: Failed to render and update auto layout status for ViewController (BYZ-38-t0r): dlopen(Demo.app, ...
Read more >
.net 6 SDK on M1 MacBook Pro fails to load after installing ...
I have installed the .net 6 SDK for M1 Mac / ARM64 (GA version released ... The library libhostfxr.dylib was found, but loading...
Read more >
MacBook M1 - java.lang.UnsatisfiedLinkError - YouTrack
UnsatisfiedLinkError: no suitable image found ... I am developing an app using KMM and switched to a MacBook with the new M1 chip...
Read more >
Image analysis softwares on MacBook with M1 chip?
Hi guys, I'm thinking of getting a new MacBook Pro with M1 Pro chip, but was worried that M1 is not compatible with...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found