加入收藏 | 设为首页 | 会员中心 | 我要投稿 温州站长网 (https://www.0577zz.com/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 服务器 > 系统 > 正文

windows-phone-7 – 在Windows Phone 8中,我不断收到System.WInd

发布时间:2021-03-06 11:23:31 所属栏目:系统 来源:网络整理
导读:我得到的错误信息是 A first chance exception of type ‘System.Windows.Markup.XamlParseException’ occurred in System.Windows.ni.dll 调用堆栈追溯到这段代码. public MainPage() { **InitializeComponent();** this.Init(); // Set the data contex

我得到的错误信息是

A first chance exception of type ‘System.Windows.Markup.XamlParseException’ occurred in System.Windows.ni.dll

调用堆栈追溯到这段代码.

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:windowssystem32coreclr.dll: DefaultDomain): Loaded ‘C:windowssystem32mscorlib.ni.dll’. Skipped loading symbols. Module is optimized and the debugger option ‘Just My Code’ is enabled.
‘TaskHost.exe’ (CLR C:windowssystem32coreclr.dll: Silverlight AppDomain): Loaded ‘C:windowssystem32System.Windows.RuntimeHost.ni.dll’. Skipped loading symbols. Module is optimized and the debugger option ‘Just My Code’ is enabled.
‘TaskHost.exe’ (CLR C:windowssystem32coreclr.dll: Silverlight AppDomain): Loaded ‘C:windowssystem32System.Windows.ni.dll’. Skipped loading symbols. Module is optimized and the debugger option ‘Just My Code’ is enabled.
‘TaskHost.exe’ (CLR C:windowssystem32coreclr.dll: Silverlight AppDomain): Loaded ‘C:windowssystem32System.Net.ni.dll’. Skipped loading symbols. Module is optimized and the debugger option ‘Just My Code’ is enabled.
‘TaskHost.exe’ (CLR C:windowssystem32coreclr.dll: Silverlight AppDomain): Loaded ‘C:windowssystem32System.ni.dll’. Skipped loading symbols. Module is optimized and the debugger option ‘Just My Code’ is enabled.
‘TaskHost.exe’ (CLR C:windowssystem32coreclr.dll: Silverlight AppDomain): Loaded ‘C:windowssystem32System.Xml.ni.dll’. Skipped loading symbols. Module is optimized and the debugger option ‘Just My Code’ is enabled.
‘TaskHost.exe’ (CLR C:windowssystem32coreclr.dll: Silverlight AppDomain): Loaded ‘C:DataPrograms{64003C1B-A4FD-41FF-A132-2B6C9FE8EDC9}InstallWifiQR.DLL’. Symbols loaded.
‘TaskHost.exe’ (CLR C:windowssystem32coreclr.dll: Silverlight AppDomain): Loaded ‘C:windowssystem32Microsoft.Phone.ni.dll’. Skipped loading symbols. Module is optimized and the debugger option ‘Just My Code’ is enabled.
‘TaskHost.exe’ (CLR C:windowssystem32coreclr.dll: Silverlight AppDomain): Loaded ‘C:windowssystem32Microsoft.Phone.Interop.ni.dll’. Skipped loading symbols. Module is optimized and the debugger option ‘Just My Code’ is enabled.
‘TaskHost.exe’ (CLR C:windowssystem32coreclr.dll: Silverlight AppDomain): Loaded ‘C:DataPrograms{64003C1B-A4FD-41FF-A132-2B6C9FE8EDC9}InstallMicrosoft.Phone.Controls.Toolkit.DLL’. Cannot find or open the PDB file.
‘TaskHost.exe’ (CLR C:windowssystem32coreclr.dll: Silverlight AppDomain): Loaded ‘C:DataPrograms{64003C1B-A4FD-41FF-A132-2B6C9FE8EDC9}Installmicrosoft.phone.controls.DLL’. Cannot find or open the PDB file.
‘TaskHost.exe’ (CLR C:windowssystem32coreclr.dll: Silverlight AppDomain): Loaded ‘C:windowssystem32System.Core.ni.dll’. Skipped loading symbols. Module is optimized and the debugger option ‘Just My Code’ is enabled.
A first chance exception of type ‘System.Windows.Markup.XamlParseException’ occurred in System.Windows.ni.dll

解决方法

只需在清单文件中添加权限即可.

>转到WMAppmanifest.xml>选择“Capabalities”选项卡>现在查看“ID_CAP_MAP”

(编辑:温州站长网)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    热点阅读