我的Silver Light应用程序中出现System.NullReferenceException错误

问题描述:

当我尝试创建银色灯光应用程序时,此错误出现在我身上.我使用Visual Studio 2010









when i try to create silver light application this error appear to me . i use visual studio 2010









System.NullReferenceException<br />
Object reference not set to an instance of an object.<br />
   at Microsoft.Windows.Design.Platform.SilverlightMetadataContext.SilverlightXamlExtensionImplementations.<getxmlnamespacecompatibilitymappings>d__8.MoveNext()<br />
   at MS.Internal.Design.Metadata.ReflectionProjectNode.BuildSubsumption()<br />
   at MS.Internal.Design.Metadata.ReflectionProjectNode.SubsumingNamespace(Identifier identifier)<br />
   at MS.Internal.Design.Markup.XmlElement.BuildScope(PrefixScope parentScope, IParseContext context)<br />
   at MS.Internal.Design.Markup.XmlElement.ConvertToXaml(XamlElement parent, PrefixScope parentScope, IParseContext context, IMarkupSourceProvider provider)<br />
   at MS.Internal.Design.DocumentModel.DocumentTrees.Markup.XamlSourceDocument.FullParse(Boolean convertToXamlWithErrors)<br />
   at MS.Internal.Design.DocumentModel.DocumentTrees.Markup.XamlSourceDocument.get_RootItem()<br />
   at Microsoft.Windows.Design.DocumentModel.Trees.ModifiableDocumentTree.get_ModifiableRootItem()<br />
   at Microsoft.Windows.Design.DocumentModel.MarkupDocumentManagerBase.get_LoadState()<br />
   at MS.Internal.Host.PersistenceSubsystem.Load()<br />
   at MS.Internal.Host.Designer.Load()<br />
   at MS.Internal.Designer.VSDesigner.Load()<br />
   at MS.Internal.Designer.VSIsolatedDesigner.VSIsolatedView.Load()<br />
   at MS.Internal.Designer.VSIsolatedDesigner.VSIsolatedDesignerFactory.Load(IsolatedView view)<br />
   at MS.Internal.Host.Isolation.IsolatedDesigner.BootstrapProxy.LoadDesigner(IsolatedDesignerFactory factory, IsolatedView view)<br />
   at MS.Internal.Host.Isolation.IsolatedDesigner.BootstrapProxy.LoadDesigner(IsolatedDesignerFactory factory, IsolatedView view)<br />
   at MS.Internal.Host.Isolation.IsolatedDesigner.Load()<br />
   at MS.Internal.Designer.DesignerPane.LoadDesignerView()</getxmlnamespacecompatibilitymappings>

信息太少,但让我尝试思考:

看起来您在调用MoveNext()而不检查范围. movenext 调用极限值时将导致NullReferenceException,因为没有剩余可移动的内容.

检查边界值,它应该消失了.
Too little info but let me try to think:

Looks like you are calling MoveNext() without checking for range. the movenext when called on limiting value will result in NullReferenceException as there is nothing left to move to.

check for boundary values and it should go away.


您需要重新安装Silverlight.首先删除并安装 [
You need to reinstall Silverlight. First remove and the install this[^]

hope it helps :)


当我尝试创建银色灯光应用程序时,此错误errorSystem.NullReferenceException出现在我眼前.我使用Visual Studio 2010
when i try to create silver light application this error errorSystem.NullReferenceException appear to me . i use visual studio 2010