Can't debug or run Xamarin Mac app in Jetbrains Rider IDE
I have a Xamarin Mac project that was primarily developed on Visual Studio 2019. Our team is looking to make the migration over to Jetbrains Rider. I did the import of VS settings on initial load up of my project. The project Cleans/Builds successfully in the Rider IDE and I am able to successfully run the application outside of the IDE (in finder). However, when I try to run it and debug in the IDE itself I get FATAL UNHANDLED EXCEPTION: System.DllNotFoundException: Could not find the runtime library libxammac.dylib at runtime. This screams IDE/project configuration issue but I don't really know where to begin to look. There isn't much online to go off of.
Please sign in to leave a comment.
Hello Aurrutia ,
Thank you for contacting Rider Forum and sorry for the delay in the reply.
Could you please try tweaking the MSBuild version in Settings | Build, Execution, Deployment | Toolset and Build?
If that does not help, please provide me your .csproj file, reproduce the issue and collect the full log bundle so we could take a closer look at the case?
Thank you in advance and have a great day!
I tried tweaking the MSBuild version a couple times but still it did not work. I reproduced the issue and have collected the logs. There isn't a way to attach to this thread so i submitted a request https://rider-support.jetbrains.com/hc/en-us/requests/6019325. You can find the csproj file and logs there. Thank you Anna Morozyuk
Hello Aurrutia ,
Thank you for your reply. I have checked the logs provided and can state that you have faced a recent bug with ID:
RIDER-104817 Rider 2023.3.x - Cannot run/debug Xamarin.Mac macOS project
It is going to be fixed in the bugfix 2023.3.4. At the moment, there is no workaround available for this issue.
Thank you for understanding. Let me know if any further questions remain.
Anna Morozyuk Thank you. When is 2023.3.4 expected to be released?
Aurrutia , the bugfix 2023.3.4 is going to be released by the end of next week.
Anna Morozyuk Hi Anna. Is 2023.3.4 released yet? I do not see it available for download on the website. If not, is there an update on when it will be?
Hello Aurrutia ,
At the moment, the bugfix is available. Please update Rider and let me know if the issue persists.
Hi Anna Morozyuk I updated to 2023.3.4 and I still get the same issue. Can i please get some help with this?
Anna Morozyuk I've attached the logs and csproj file again here on this new request ticket https://rider-support.jetbrains.com/hc/en-us/requests/6158133
Hi Anna Morozyuk . Any updates on this?
Hello Aurrutia,
Sorry for the delay in the reply.
At the moment, we could not neither reproduce the issue, nor find anything useful in the logs.
Thus, could you please provide me with two more things:
1. Scree-cast of the issue;
2. Logs with debugger tracing collected the following way:
Thank you in advance. Looking forward to hearing from you soon.
Anna Morozyuk I have attached what you requested to this ticket that I still have open https://rider-support.jetbrains.com/hc/en-us/requests/6158133
I was unable to attach any of my demo screen cast videos because the files were too large for your system.
Aurrutia , you may want to drop it to out shared storage and provide the upload ID afterwards:
https://uploads.jetbrains.com/
Thank yo in advance!
Anna Morozyuk ok. Here is the Upload ID for the screen cast 2024_04_03_25Ef9wocbtwjQH7r2NgiaM
Aurrutia ,
Could you please additionally debug another Run Configuration, i.e. for mac in Run > Edit Configurations? And collect logs with trace as well?
Thank you in advance!
Anna Morozyuk Not sure I 100% understand. You want me to go to Run > Edit Configurations and then what? Should i be adding a new config template by clicking Edit configuration templates… and selecting Xamarin.Mac? Even if I do that it says “No projects to run” in the Project: selection field.
Anna Morozyuk Does your team offer support over Zoom or any type of call service? I feel like that would be more efficient
Aurrutia ,
This log might shed light on the issue's case, thus, I'd like to receive it first and then plan further steps.
Could you please launch a mac project from the Solution Explorer using the mouse right click like it is shown in the screen-shot below?
Please collect logs with trace after debugging this project:
Thank you in advance!
Anna Morozyuk Ok. Should this Mac project be a new mac project that i create? Or are you talking about our existing Xamarin.Mac project (the one we are seeing the issue with)? Sorry, still a little confused.
Aurrutia ,
I meant the project you already have.
Looking forward to hearing from you soon.
Anna Morozyuk My trial has run out (great timing). Our team is really interested in using Rider but we want to make sure it works for us first. Are you able to provide me with a new temporary trial code or something so we can continue to debug this?
Aurrutia ,
The trial key should be sent to your e-mail. Looking forward to getting the logs.
Anna Morozyuk I got the code. I see this though after I paste it in and click Activate. It doesn't work. It doesn't make sense because we are in April!
Anna Morozyuk I actually see this after clicking activate so it looks like it briefly works. But when i hit continue it just pops back up with the red error message
Please check your inbox. We sent you a new license. You can activate it either online via account, or via offline code (attached to the email).
To activate it online, click Log in and proceed to authentication.
For offline activation, copy your code from the email and paste it into `Activation code` field.
Thanks!
Hello,
Was any progress made on this issue?
I am running into the same problem when trying to run my pre-existing Xamarin project as well from Rider.
I am getting the same error message when I try to run. The app builds fine though.
[ERROR] FATAL UNHANDLED EXCEPTION: System.DllNotFoundException: Could not find the runtime library libxammac.dylib
at ObjCRuntime.Runtime.LookupInternalFunction[T] (System.String name) [0x000c0] in <20011123f8d14949981858833744d42c>:0
at ObjCRuntime.Runtime.EnsureInitialized () [0x00036] in <20011123f8d14949981858833744d42c>:0
at AppKit.NSApplication.Init () [0x00016] in <20011123f8d14949981858833744d42c>:0
at a.Main (System.String[] args) [0x00000] in <94f0acd88721f2542a3fc130fee35371>:
Thanks,
Vanessa
Hello Vanessa ,
Thank you for the update.
Unfortunately, at the moment, the root cause is not clear. Could you please collect logs with tracing as I wrote above?
Thank you in advance.
Thank you Anna!
I have uploaded the logs and the ID is: Upload id: 2024_05_07_Thxq1kjy4wbtKzpExcNxjj (file: rider-logs-20240507-1315472446977602716226244.zip)
Thank you,
Vanessa
Hello Vanessa ,
Thank you for the provided info.
Could you please additionally provide me with a repro project and a screen-shot of the Run Configuration used from Run > Edit Configurations? Please upload them to our shared storage as well to https://uploads.jetbrains.com and provide me with the ID of the upload.
Thank you in advance. Looking forward to your response.
Hello Anna,
Thank you for looking into this issue!
I have uploaded a reproducible solution here: Upload id: 2024_05_14_23QAVz5FWvPy8C7Mi5eTTp (file: test-app-for-rider-support.zip)
I uploaded the screenshot of the run configuration here: Upload id: 2024_05_14_zp1UJ4veX1EZyKuSL1XjB5 (file: RunCOnfiguration.png)
Thank you,
Vanessa