我收到的错误信息是:
调用堆栈追溯回到这段代码。在 System.Windows.ni.dll 中发生了类型为 'System.Windows.Markup.XamlParseException' 的第一次机会异常
public MainPage()
{
**InitializeComponent();**
this.Init();
// Set the data context of the listbox control to the sample data
DataContext = App.ViewModel;
this.Loaded += new RoutedEventHandler(MainPage_Loaded);
}
还有在InitializeComponent()行上的错误。
public void InitializeComponent() {
if (_contentLoaded) {
return;
}
_contentLoaded = true;
System.Windows.Application.LoadComponent(this, new System.Uri("/App;component/MainPage.xaml", System.UriKind.Relative));
this.LayoutRoot = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
this.SSIDTextBox = ((System.Windows.Controls.TextBox)(this.FindName("SSIDTextBox")));
this.PasswordTextBox = ((System.Windows.Controls.TextBox)(this.FindName("PasswordTextBox")));
this.Auth_ListPicker = ((Microsoft.Phone.Controls.ListPicker)(this.FindName("Auth_ListPicker")));
this.SaveButton = ((System.Windows.Controls.Button)(this.FindName("SaveButton")));
this.GenerateButton = ((System.Windows.Controls.Button)(this.FindName("GenerateButton")));
this.QRImage = ((System.Windows.Controls.Image)(this.FindName("QRImage")));
this.Profiles= ((System.Windows.Controls.ListBox)(this.FindName("Profiles")));
}
}
在我将WP 7.1转换为WP8之前,我没有遇到这个异常。
任何帮助都将不胜感激。
更新: 我添加了整个异常消息,这有助于确定问题吗?
'TaskHost.exe'(CLR C:\ windows \ system32 \ coreclr.dll:DefaultDomain):已加载'C:\ windows \ system32 \ mscorlib.ni.dll'。跳过加载符号。模块已优化,调试器选项“仅我的代码”已启用。 'TaskHost.exe'(CLR C:\ windows \ system32 \ coreclr.dll:Silverlight AppDomain):已加载'C:\ windows \ system32 \ System.Windows.RuntimeHost.ni.dll'。跳过加载符号。模块已优化,调试器选项“仅我的代码”已启用。 'TaskHost.exe'(CLR C:\ windows \ system32 \ coreclr.dll:Silverlight AppDomain):已加载'C:\ windows \ system32 \ System.Windows.ni.dll'。跳过加载符号。模块已优化,调试器选项“仅我的代码”已启用。 'TaskHost.exe'(CLR C:\ windows \ system32 \ coreclr.dll:Silverlight AppDomain):已加载'C:\ windows \ system32 \ System.Net.ni.dll'。跳过加载符号。模块已优化,调试器选项“仅我的代码”已启用。 'TaskHost.exe'(CLR C:\ windows \ system32 \ coreclr.dll:Silverlight AppDomain):已加载'C:\ windows \ system32 \ System.ni.dll'。跳过加载符号。模块已优化,调试器选项“仅我的代码”已启用。 'TaskHost.exe'(CLR C:\ windows \ system32 \ coreclr.dll:Silverlight AppDomain):已加载'C:\ windows \ system32 \ System.Xml.ni.dll'。跳过加载符号。模块已优化,调试器选项“仅我的代码”已启用。 'TaskHost.exe'(CLR C:\ windows \ system32 \ coreclr.dll:Silverlight AppDomain):已加载'C:\ Data \ Programs {64003C1B-A4FD-41FF-A132-2B6C9FE8EDC9} \ Install \ WifiQR.DLL'。已加载符号。 'TaskHost.exe'(CLR C:\ windows \ system32 \ coreclr.dll:Silverlight AppDomain):已加载'C:\ windows \ system32 \ Microsoft.Phone.ni.dll'。跳过加载符号。模块已优化,调试器选项“仅我的代码”已启用。 'TaskHost.exe'(CLR C:\ windows \ system32 \ coreclr.dll:Silverlight AppDomain):已加载'C:\ windows \ system32 \ Microsoft.Phone.Interop.ni.dll'。跳过加载符号。模块已优化,调试器选项“仅我的代码”已启用。 'TaskHost.exe'(CLR C:\ windows \ system32 \ coreclr.dll:Silverlight AppDomain):已加载'C:\ Data \ Programs {64003C1B-A4FD-41FF-A132-2B6C9FE8EDC9} \ Install \ Microsoft.Phone.Controls.Toolkit.DLL'。找不到或打开PDB文件。 'TaskHost.exe'(CLR C:\ windows \ system32 \ coreclr.dll:Silverlight AppDomain):已加载'C:\ Data \ Programs {64003C1B-A4FD-41FF-A132-2B6C9FE8EDC9} \ Install \ microsoft.phone.controls.DLL'。找不到或打开PDB文件。 'TaskHost.exe'(CLR C:\ windows \ system32 \ coreclr.dll:Silverlight AppDomain):已加载'C:\ windows \ system32 \ System.Core.ni.dll'。跳过加载符号。模块已优化,调试器选项“仅我的代码”已启用。 在System.Windows.ni.dll中发生了类型为'System.Windows.Markup.XamlParseException'的第一个机会异常