Windows phone 7 wp7 xamlparseexception初始化组件

Windows phone 7 wp7 xamlparseexception初始化组件,windows-phone-7,xaml,xamlparseexception,Windows Phone 7,Xaml,Xamlparseexception,我有个奇怪的问题。我开发了一个WindowsPhone7应用程序。最初,其目标windows phone操作系统版本设置为7.0(在项目属性中)。一切都很顺利 但是,在将目标操作系统升级到7.1版后,我得到一个异常:XamlParseException“[Line:0 Position:0]”。在此方法中,LoginPage.g.i.cs中出现异常: [System.Diagnostics.DebuggerNonUserCodeAttribute()] public void Initi

我有个奇怪的问题。我开发了一个WindowsPhone7应用程序。最初,其目标windows phone操作系统版本设置为7.0(在项目属性中)。一切都很顺利

但是,在将目标操作系统升级到7.1版后,我得到一个异常:XamlParseException“[Line:0 Position:0]”。在此方法中,LoginPage.g.i.cs中出现异常:

[System.Diagnostics.DebuggerNonUserCodeAttribute()]
    public void InitializeComponent() {
        if (_contentLoaded) {
            return;
        }
        _contentLoaded = true;
        System.Windows.Application.LoadComponent(this, new System.Uri("/BCMLogic;component/Pages/LoginPage.xaml", System.UriKind.Relative));
        this.LayoutRoot = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
        this.TitlePanel = ((System.Windows.Controls.StackPanel)(this.FindName("TitlePanel")));
        this.image1 = ((System.Windows.Controls.Image)(this.FindName("image1")));
        this.ContentPanel = ((System.Windows.Controls.Grid)(this.FindName("ContentPanel")));
        this.loginBtn = ((System.Windows.Controls.Button)(this.FindName("loginBtn")));
        this.userNameTxt = ((System.Windows.Controls.TextBox)(this.FindName("userNameTxt")));
        this.passTxt = ((System.Windows.Controls.PasswordBox)(this.FindName("passTxt")));
        this.clientTxt = ((System.Windows.Controls.TextBox)(this.FindName("clientTxt")));
        this.user = ((System.Windows.Controls.Image)(this.FindName("user")));
        this.passwd = ((System.Windows.Controls.Image)(this.FindName("passwd")));
        this.welcome = ((System.Windows.Controls.Image)(this.FindName("welcome")));
        this.client = ((System.Windows.Controls.Image)(this.FindName("client")));
        this.progressOverlay = ((Coding4Fun.Phone.Controls.ProgressOverlay)(this.FindName("progressOverlay")));
    }
}
}

第行显示错误:this.LayoutRoot=((System.Windows.Controls.Grid)(this.FindName(“LayoutRoot”))

我在LoginPage.xaml中的主网格如下所示:

<Grid x:Name="LayoutRoot" Background="Transparent">
    <Grid.RowDefinitions>
        <RowDefinition Height="Auto"/>
        <RowDefinition Height="*"/>
    </Grid.RowDefinitions>

 ....

</Grid>

....
内部异常为null,所以我在那里没有得到任何信息。这是否与项目DLL引用的操作系统与我将项目升级到的操作系统版本不兼容有关?我怎么检查这个?我花了一些时间浏览其他帖子,但就是找不到适合我问题的解决方案

提前感谢您的帮助:)