mscorlib.ni.dll 中发生了“System.IO.FileNotFoundException"类型的第一次机会异常 - windows phone [英] A first chance exception of type 'System.IO.FileNotFoundException' occurred in mscorlib.ni.dll - windows phone

查看:28
本文介绍了mscorlib.ni.dll 中发生了“System.IO.FileNotFoundException"类型的第一次机会异常 - windows phone的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的 xaml 页面中,当我创建一个复选框时,会出现该错误,但将其删除后,该错误就会消失.如果我忽略该错误,它仍会运行,但我仍然想知道是什么导致该错误出现.我在这里做错了什么?

In my xaml page, when i create a checkbox, that error appear but when it is removed, the error disappear. It will still run if i ignore the error but I would still want to know what makes that error appear. What have I done wrong here?

下面是xaml代码:

        <toolkit:DatePicker Name="dateData"  
                            HorizontalAlignment="Center" 
                            Width="456"
                            Background="DarkBlue" 
                            ValueStringFormat="{}{0:D}"
                            Foreground="White"
                            BorderBrush="DarkBlue" 
                            />

        <TextBlock HorizontalAlignment="Left"
                   Text="Title" Margin="18,0,0,0" 
                   />

        <TextBox x:Name="titleTBox"  
                 Text="Add New Title"
                 FontFamily="{StaticResource PhoneFontFamilyLight}"      
                 GotFocus="newToDoTextBox_GotFocus" 
                 Grid.ColumnSpan="3" 
                 BorderBrush="Silver" 
                 />
        <TextBlock HorizontalAlignment="Left"  
            TextWrapping="Wrap" 
            Text="Description" 
            VerticalAlignment="Top" Margin="18,0,0,0"
                   />
        <TextBox
                x:Name="descriptionTBox"   
                Text="Add New Description"
                TextWrapping="Wrap"
                FontFamily="{StaticResource PhoneFontFamilyLight}"                    
                GotFocus="newToDoTextBox_GotFocus" Height="125" 
                BorderBrush="Silver" 
                />

        <CheckBox Name="cBox" 
                  Content="Reminder"/>


        <TextBlock HorizontalAlignment="Left"
                   Name="textRDate"
                   Text="Reminder Date" 
                   Margin="18,0,0,0" 
                   Visibility="Collapsed"
                   />

            <toolkit:DatePicker  
                Name="rDate" 
                HorizontalAlignment="Left" 
                Width="456"
                Visibility="Collapsed"
                />

        <TextBlock HorizontalAlignment="Left"
                   Name="TextTDate"
                   Text="Reminder Time" 
                   Margin="18,0,0,0" 
                   Visibility="Collapsed"
                   />

            <toolkit:TimePicker  Name="rTime" 
                                 HorizontalAlignment="Right" 
                                 Width="456"
                                 Visibility="Collapsed"
                                 />
    </StackPanel>

推荐答案

我在尝试从需要在 C# 中访问的 API 中引用 .dll 文件时遇到此错误.您必须绝对确定自己满足了制作参考的所有要求 - 一般来说,其中一些很容易被忽视:

I was experiencing this error while trying to reference a .dll file from an API that I needed to access in C#. You must be absolutely certain that you are meeting all of the requirements for making the reference - some of which are easy to overlook, in general:

您是否有正确的驱动程序,并且在安装它们后是否重新启动了您的机器?

Do you have the correct drivers, and have you restarted your machine since installing them?

您所引用的文件是否针对您正在构建应用程序以运行的处理器类型?(请参阅选择正确的主动解决方案平台的说明.这篇文章可能会有所帮助:Visual Studio 的任何 CPU"目标是什么意思?)

Is the file you are referencing made for the type of processor you are building the application to run on? (See clarifications in choosing the right Active Solution Platform. This post might help: What does the Visual Studio "Any CPU" target mean?)

尝试验证您引用的文件的依赖关系(它是否需要一些硬件连接?它要识别或访问什么?).

Try to verify the dependencies of the file you are referencing (is it expecting some hardware connection? what is it looking to identify or access?).

这篇关于mscorlib.ni.dll 中发生了“System.IO.FileNotFoundException"类型的第一次机会异常 - windows phone的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆