Cannot build Xamarin iOS on Microsoft Azure Hosted Agent with GRPC Core ( MTOUCH : error MT0009: Error while loading assemblies: .../grpc_csharp_ext.x64.dll)

delaCruz 1 Reputation point

We want to build our Xamarin iOS using Microsoft Azure Hosted agent with MacOS VM but we are having an error when it tries to "CompileToNative"

MTOUCH : error MT0009: Error while loading assemblies: /Users/runner/.nuget/packages/grpc.core/2.31.0/runtimes/win/native/grpc_csharp_ext.x64.dll [/Users/runner/work/1/s/ProjectName/ProjectName.iOS/ProjectName.iOS.csproj]

Our yaml file.

vmImage: 'macOS-latest'

 # To manually select a Xamarin SDK version on the Hosted macOS agent, enable this script with the 
SDK version you want to target
- script: sudo $AGENT_HOMEDIRECTORY/scripts/ 6_6_0 
 displayName: 'Select Xamarin SDK version'
 enabled: true

- task: NuGetCommand@2
    restoreSolution: '**/*.sln'

- task: XamariniOS@2
    solutionFile: '**/*.sln'
    configuration: 'Release'
    buildForSimulator: true
    packageApp: false

There is similar error similar to this Bu the accepted does not help us because it is running on Microsoft hosted agent environment.

Not Monitored
Not Monitored
Tag not monitored by Microsoft.
36,509 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Leon Lu (Shanghai Wicresoft Co,.Ltd.) 69,386 Reputation points Microsoft Vendor

    If you can build it normally withoutthe grpc package, your issue is related to the Azure DevOps, Azure DevOps is currently not supported in the Q&A forums, the supported products are listed over here: (more to be added later on). For the related questions about Azure DevOps you can ask in here

    0 comments No comments