Skip to content

Dotnet Runtime 6.0.0-preview 2 issue macOS arm64 issue. #49609

@speed2048

Description

@speed2048

I have the an application running correctly on a mac m1 machine with .NET runtime 5.0.3 x64 runtime installed.

Signal published file with Target framework: 5.0, Target runtime: osx-x64.

I installed .NET Runtime 6.0.0-preview.2 Arm64 packaged and the tried running the application and fails with the following errors.

Failed to load /usr/local/share/dotnet/host/fxr/6.0.0-preview.2.21154.6/libhostfxr.dylib, error: dlopen(/usr/local/share/dotnet/host/fxr/6.0.0-preview.2.21154.6/libhostfxr.dylib, 1): no suitable image found. Did find:
/usr/local/share/dotnet/host/fxr/6.0.0-preview.2.21154.6/libhostfxr.dylib: mach-o, but wrong architecture
/usr/local/share/dotnet/host/fxr/6.0.0-preview.2.21154.6/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.2.21154.6/libhostfxr.dylib failed

I understand why this is happening but why doesn't the application start mechanism detect this issue and run the correct runtime as the 5.0.3 runtime is still installed?

Another question is there a way I can run previews m1 with 5.0.x x-64 runtimes side by side?

As a side if I install the macOS 6.0.0 preview-2 x64 package the application executes correctly and has opened the 5.0.3 runtime dlls. So the startup does detect which runtime to use.

Regards,
Bob

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions