我的Xamarin遇到问题.Forms不想再加载了,它不断给我错误消息
Unable to cast object of type 'System.RuntimeType' to type 'Mono.Debugger.Soft.TypeMirror'.
我的代码ATM是
MainPage.xaml.cs:
public partial class MainPage : MasterDetailPage
{
public MainPage()
{
InitializeComponent();
}
}
MainPage.xaml
<?xml version="1.0" encoding="utf-8" ?>
<MasterDetailPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:Hoofdstuk04"
x:Class="Hoofdstuk04.MainPage">
<MasterDetailPage.Master>
<ContentPage Title="Master">
<StackLayout>
<!-- Click event method nog toevoegen -->
<Button Text="RandomColorPage"></Button>
<Button Text="CarouselPage"></Button>
</StackLayout>
</ContentPage>
</MasterDetailPage.Master>
<MasterDetailPage.Detail>
<NavigationPage>
<x:Arguments>
<!--<local:ImageViewerPage />-->
</x:Arguments>
</NavigationPage>
</MasterDetailPage.Detail>
</MasterDetailPage>
有人知道我为什么收到此错误吗?我唯一更改的是代码中MainPage的继承,从 ContentPage 到 MasterDetailPage
答案 0 :(得分:0)
为了防止“无法将类型为'System.RuntimeType'的对象转换为类型为'Mono.Debugger.Soft.TypeMirror'的解决方法”: