Can't run iOS part of Xamarin.Forms project

Answered

The problem appeared after update to XCode 9.3

 

I use Rider 2018.1 EAP.

I have a PCL project with Shared, iOS and Android parts. While running Android works fine, for iOS I get the following error (both real device and simulator):

8
15 comments
Avatar
Permanently deleted user

just installed rider on mac and created a xamarin forms app, am getting message "XamarinIos can't be run"

4
Avatar
Permanently deleted user

Same here. Installed Rider 2018.1, opened an existing solution for a Xamarin.Forms app, and both Android and iOS apps can't be run:

Error running '...appname...' : XamariniOS can't be run. Report this to Rider developers

Error running '...appname...' : XamarinAndroid can't be run. Report this to Rider developers

 

Opening the same solution and running the app in Visual Studio for Mac and Windows works fine.

3
Avatar
Permanently deleted user

Same here for a Xamarin.Forms project:

Error running '---': XamarinIOS can't be run. Report this to Rider developers

VS for Mac and Windows works fine.

2
Avatar
Permanently deleted user
Still an issue

JetBrains Rider 2018.2 EAP
Build #RD-182.3624.343, built on July 13, 2018
Rider EAP User
Expiration date: August 12, 2018
JRE: 1.8.0_152-release-1226-b7 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
macOS 10.13.5
1

+1 for this
We can not use Rider at all on Xamarin projects. How can we escalate this and get it addressed?

1

Hi there!

Sorry for the late answer.

Here is an issue for the case "XamarinIOS can't be run". So, please, check your MSBuild settings "Preferences | Build, Execution, Deployment | Toolset and Build". A Mono's MSBuild should be specified there. If it does not help, could you please collect logs (described here), screenshots of errors and attach them to the issue? Also, it would be better to continue our communication there and, please, feel free to vote for the issue.

Mkadan,  running xcode-select --install  command in the terminal should help. Here is the corresponding issue on Rider tracker.

 

 

0

I'm having the same problem. 

I've created a blank Xamarin.Forms project. It runs neither for android nor for iOS. I'm getting these 2 same type of errors for both - Xamarin.Android/iOS can't be run, report this to Rider developers.

 

0

Hey, I have some more updates.

Before I was testing the rider by creating a test solution from within the Rider, using Rider's xamarin template, which uses PCL...

I decided to create the project with visual studio, and run it through Rider and it WORKED! So, there are 2 issues really now

1. Rider default Xamarin template are not compilable 

2. Rider templates do no support .NET Standard. 

Otherwise, this concrete issue for me was fixed in the latest EAP release.

0

Hi, Gagik. 

Thank you for your reply.

Please make sure that you ran not .NET Project in RunConfiguration dialog but Xamarin.iOS

If the problem remains, please, collect and send us LOGS files : https://rider-support.jetbrains.com/hc/en-us/articles/360001079770-How-to-collect-Rider-logs-

https://rider-support.jetbrains.com/hc/en-us/articles/208199755-Uploading-Large-Files-for-JetBrains-Support-Team 

 

Sofia

0

Gagik, in addition to the previous message, 

  • 1. Rider default Xamarin template is not compilable 
  • 2. Rider templates do no support .NET Standard. 

could you please check

  1. which MSBuild selected in Rider. There should be the mono's MSBuild or Visual Studio's one.
  2. can you build your uncompilable project? If it builds and red code disappears, this is a known issue.
  3. if the project cannot be built and the MSBuild is selected correct, please, create an issue in our tracker and attach a sample solution.

Kind regards,

Sofya

0

Hey Sofia

Thanks a lot for the support. Your first comment solved the run issue. 

As for .NET Standard thing. What I was referring to, is that there's no option to create a project with .NET Standard library, there's only a version to create a PCL project (Both Xamarin.Forms and Xamarin.Native). As for MSBuild here's the MSBuild path for the Rider EAP I have
/Library/Frameworks/Mono.framework/Versions/Current/lib/mono/msbuild/15.0/bin/MSBuild.dll

I suppose this is the Mono version

0

Hi, Gagik,

I'm glad to hear that the problem is solved.

Indeed, at the moment Rider does not support .NET Standard template for Xamarin.Forms. But here is an issue. Please feel free to vote for it.

If you have any other questions just let me know.

 

Kind regards,

Sofya.

0
Avatar
Permanently deleted user

I've still got this problem with "XamarinAndroid can't be run".

It was all working perfectly, until I did a "File | Invalidate Caches / Restart" (and selected the invalidate AND restart option).

After it came back, some red-lines disappeared under code that was correct (as per the intention of this function), but now I can only build Xamarin Android projects and not run them.

JetBrains Rider 2018.2
Build #RD-182.4231.193, built on August 21, 2018
Licensed to (removed)
Subscription is active until August 8, 2019
JRE: 1.8.0_152-release-1248-b8 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
macOS 10.13.6

0
Avatar
Permanently deleted user

This is exactly the error that was happening as described in https://youtrack.jetbrains.com/issue/RIDER-18906

Maybe this will help someone else: after I did that invalidate & restart, my Xamarin.Android project which was set as the default build config had somehow switched to being a ".NET Project" (this is not a mistake I would have made, as I've never selected ".NET Project" as a build config for anything in this solution).

This happened for EVERY solution I opened after that, every project basically became a ".NET Project" build config.

Look closely at the selected build config for your solution/project and make sure it's not been set to a ".NET Project" type (which has the 'wave' icon next to it instead of the small droid overlaying a console window icon).

After I switched the config BACK to being a Xamarin/Android one (and deleted the .NET build config Rider had created), I was then able to run/debug as always.

 

0

"Look closely at the selected build config for your solution/project and make sure it's not been set to a ".NET Project" type (which has the 'wave' icon next to it instead of the small droid overlaying a console window icon)."

This helped me fix my iOS project. Thank you so much!

The error message I got was

"Could not load file or assembly 'Xamarin.iOS, Version=0.0.0.0, Culture=neutral, PublicKeyToken=' or one of its dependencies."

0

Please sign in to leave a comment.