Getting libhostfxr.dylib not found error when running Azure pipeline on Azure Agent machine
During pipeline execution starts on agent machine then below error is shown
Agent Machine : M1 chip, Mac
Failed to load /Volumes/Ext/azure_agent/_work/_tool/dotnet/host/fxr/7.0.10/libhostfxr.dylib,
error: dlopen(/Volumes/Ext/azure_agent/_work/_tool/dotnet/host/fxr/7.0.10/libhostfxr.dylib, 0x0001): tried:
'/Volumes/Ext/azure_agent/_work/_tool/dotnet/host/fxr/7.0.10/libhostfxr.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64')),
'/System/Volumes/Preboot/Cryptexes/OS/Volumes/Ext/azure_agent/_work/_tool/dotnet/host/fxr/7.0.10/libhostfxr.dylib' (no such file),
'/Volumes/Ext/azure_agent/_work/_tool/dotnet/host/fxr/7.0.10/libhostfxr.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64'))
The library libhostfxr.dylib was found, but loading it from /Volumes/Ext/azure_agent/_work/_tool/dotnet/host/fxr/7.0.10/libhostfxr.dylib failed