C# Windows Phone App.xml已编译,但在尝试运行应用程序时因缺少类型而引发错误
我有2个项目的解决方案。一个带有Windows phone和一个PortableClassLibrary 在PortableClassLibrary中,我实现了ViewModelLocator部分,该部分允许访问我的视图在Phone项目中使用的ViewModel 在应用程序中,我有:C# Windows Phone App.xml已编译,但在尝试运行应用程序时因缺少类型而引发错误,c#,windows-phone-7,mvvm-light,C#,Windows Phone 7,Mvvm Light,我有2个项目的解决方案。一个带有Windows phone和一个PortableClassLibrary 在PortableClassLibrary中,我实现了ViewModelLocator部分,该部分允许访问我的视图在Phone项目中使用的ViewModel 在应用程序中,我有: <Application xmlns:vm="clr-namespace:PortableClassLibrary.ViewModel;assembly=PortableClassLibrary" /&
<Application xmlns:vm="clr-namespace:PortableClassLibrary.ViewModel;assembly=PortableClassLibrary" />
<Application.Resources>
<ResourceDictionary>
<vm:ViewModelLocator x:Key="Locator" d:IsDataSource="True" />
<ResourceDictionary.MergedDictionaries></ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>
一切正常,编译时没有任何错误
当我启动手机模拟器时,它会在尝试加载App.xaml时崩溃,并告知找不到ViewModelLocator类型
它在App.xaml中工作时怎么会找到它,而在我尝试运行它时却找不到 如何使用定位器?