How could I configure Rider to develop .Net core 3 application on macOS with Apple Silicon

Hello, I'm trying to develop .Net Core 3 application on M1 macOS and using Rider.

this is debugging configuration and it fails.

It says:

../.AzureToolsForIntelliJ/AzureFunctionsCoreTools/v3/3.40.0/func host start --pause-on-error --port 7071 --verbose
dotnet sdk is required for dotnet based functions. Please install https://microsoft.com/net

It is because .Net core 3 is not support M1 macOS directly.

But, it could be run with:

  1.  env /usr/bin/arch -x86_64 /bin/zsh --login  
  2. /.../.AzureToolsForIntelliJ/AzureFunctionsCoreTools/v3/3.40.0/func host start --pause-on-error --port 7071 --verbose 

My question is how I can configure such 2-step command in debugging configuration dialog.

Or like

env /usr/bin/arch -x86_64 /bin/zsh --login -c "/Users/myaccount/.AzureToolsForIntelliJ/AzureFunctionsCoreTools/v3/3.40.0/func host start --pause-on-error --port 7071 --verbose"

It is very convenient if i could run and debug the application with the debug button.

1 comment
Comment actions Permalink

Hello Kenji,

Thank you for your question!

To specify x86_64 environment in your run configuration, it is possible to use Shell Script:
Run/Debug Configuration: Shell Script

You may want to create a script, that executes required commands with the arguments above one by one. For this you need to create a Shell script file in Run > Edit Configuration > + > Shell Script.

Please inform me if it helps.

0

Please sign in to leave a comment.