问题描述
未能加载文件或程序集“System.Windows.Controls,Version=5.0.5.0,Culture=neutral,PublicKeyToken=31bf3856ad364e35”或它的某一个依赖项。系统找不到指定的文件。在System.RuntimeTypeHandle.GetDeclaringType(RuntimeTypetype)在System.RuntimeType.RuntimeTypeCache.GetEnclosingType()在System.RuntimeType.get_DeclaringType()在MS.Internal.Metadata.ClrAssembly.IsPublicOrNestedPublic(Typet)在MS.Internal.Metadata.ClrAssembly.get_Types()在MS.Internal.Design.Metadata.AssemblyNode.BuildNamespaces(SymbolTable`1newNamespaces)在MS.Internal.Design.Metadata.AssemblyNode.BuildNamespaces()在MS.Internal.Design.Metadata.ReflectionProjectNode.ProcessAssemblyNamespaces(Dictionary`2namespaces,AssemblyNodeassembly)在MS.Internal.Design.Metadata.ReflectionProjectNode.BuildNamespaces()在MS.Internal.Design.Metadata.ReflectionProjectNode.EnsureState()在MS.Internal.Design.Metadata.ReflectionProjectNode.Find(IdentifiernamespaceUri)在MS.Internal.Design.Markup.PrefixScope.AddIgnorablePrefix(Identifierprefix)在MS.Internal.Design.Markup.XmlElement.BuildScope(PrefixScopeparentScope,IParseContextcontext)在MS.Internal.Design.Markup.XmlElement.ConvertToXaml(XamlElementparent,PrefixScopeparentScope,IParseContextcontext,IMarkupSourceProviderprovider,BooleanvisitCodeModel)在MS.Internal.Design.DocumentModel.DocumentTrees.Markup.XamlSourceDocument.ParseElementFromSkeleton(XamlParseContextcontext,SkeletonNodenode,XamlElementparent,BooleanfullElement)在MS.Internal.Design.DocumentModel.DocumentTrees.Markup.XamlSourceDocument.PopulateElementCacheWith(Identityidentity,SkeletonNodeskeletonNode,XamlParseContextcontext,XamlElementparent,BooleanfullElement)在MS.Internal.Design.DocumentModel.DocumentTrees.Markup.XamlSourceDocument.GetElementForIdentityFromSkeleton(Identityidentity,BooleanfullElement)在MS.Internal.Design.DocumentModel.DocumentTrees.Markup.XamlSourceDocument.<GetChildrenElements>d__2d.MoveNext()在MS.Internal.Design.DocumentModel.DocumentTrees.Markup.XamlProperty.GetFirstChild()在MS.Internal.Design.DocumentModel.DocumentTrees.Markup.XamlProperty.GetLocation()在MS.Internal.Design.DocumentModel.DocumentTrees.VirtualModel.VirtualModelDocumentProperty.Microsoft.Windows.Design.DocumentModel.IMarkupLocationProvider.GetLocation()在MS.Internal.Design.DocumentModel.DocumentTreeManagers.ApplyUpdateException.GetLocation(DocumentNodenode)在MS.Internal.Design.DocumentModel.DocumentTreeManagers.ApplyUpdateException..ctor(Stringmessage,ExceptioninnerException,DocumentNodenode)在MS.Internal.Design.DocumentModel.DocumentTreeManagers.ItemUpdater.ProduceDelta(DocumentNodeDictionarynewTable,DocumentNodeDictionaryoldTable)在Microsoft.Windows.Design.DocumentModel.Trees.DocumentTreeManager.ProduceDelta(DocumentTreeManagerolderDocument,Damagedamage)在Microsoft.Windows.Design.Platform.ViewProducerBase.IncrementalRebuild(DocumentTreeManagertree,Damagedamage)
解决方案
解决方案二:
检查下是不是缺少引用,或者没把引用的dll放在该放的文件夹
解决方案三:
少引用dll没有·如果没有把bin和obj文件夹删了再生成看看··