How to fix Mono Shared Runtime is not supported when running UI Test

This is a very frustrating issue and I have found lots of unhelpful articles, especially since they all point to Visual Studio 2019.

I get this issue when trying to run a Xamarin.UITest project.

System.Exception : Mono Shared Runtime is not supported. This can be resolved by changing the project configuration or using a Release build.


  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Test|AnyCPU'">



1 answer

  • answered 2022-05-04 12:22 ToolmakerSteve

    OP (Original Poster aka question-asker) seems to be doing everything right, in specifying the apk.

    It appears that a SharedMonoFramework was still on the device, associated with the project's bundle id, from an earlier debug test run.

    The app needed to be completely removed from the device.

    One of these approaches:

    • Manually delete app from device.

    • Command prompt adb uninstall com.yourcompany.yourapp (the bundle id).

    • Factory reset the device.

How many English words
do you know?
Test your English vocabulary size, and measure
how many words do you know
Online Test
Powered by Examplum