我在WPF中的所有xaml都给了我以下错误:
System.IO.FileLoadException
The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047)
at System.Reflection.AssemblyName.nInit(RuntimeAssembly& assembly, Boolean forIntrospection, Boolean raiseResolveEvent)
at System.Reflection.AssemblyName..ctor(String assemblyName)
at MS.Internal.Design.Metadata.ReflectionProjectNode.FindAssembly(String assembly)
at MS.Internal.Design.Metadata.ReflectionProjectNode.ParseClrNamespaceUri(Identifier namespaceId, Identifier name, String clrNamespaceUri, IParseContext context, Node offendingNode)
at MS.Internal.Design.Metadata.ReflectionProjectNode.EnsureExists(Identifier namespaceUri, Identifier name, IParseContext context, Node offendingNode)
at MS.Internal.Design.Markup.XmlElement.BuildScope(PrefixScope parentScope, IParseContext context)
at MS.Internal.Design.Markup.XmlElement.ConvertToXaml(XamlElement parent, PrefixScope parentScope, IParseContext context, IMarkupSourceProvider provider, Boolean visitCodeModel)
at MS.Internal.Design.DocumentModel.DocumentTrees.Markup.XamlSourceDocument.FullParse(Boolean convertToXamlWithErrors)
at MS.Internal.Design.DocumentModel.DocumentTrees.Markup.XamlSourceDocument.get_RootItem()
at Microsoft.Windows.Design.DocumentModel.Trees.ModifiableDocumentTree.get_ModifiableRootItem()
at Microsoft.Windows.Design.DocumentModel.MarkupDocumentManagerBase.get_LoadState()
at MS.Internal.Host.PersistenceSubsystem.Load()
at MS.Internal.Host.Designer.Load()
at MS.Internal.Designer.VSDesigner.Load()
at MS.Internal.Designer.VSIsolatedDesigner.VSIsolatedView.Load()
at MS.Internal.Designer.VSIsolatedDesigner.VSIsolatedDesignerFactory.Load(IsolatedView view)
at MS.Internal.Host.Isolation.IsolatedDesigner.BootstrapProxy.LoadDesigner(IsolatedDesignerFactory factory, IsolatedView view)
at MS.Internal.Host.Isolation.IsolatedDesigner.BootstrapProxy.LoadDesigner(IsolatedDesignerFactory factory, IsolatedView view)
at MS.Internal.Host.Isolation.IsolatedDesigner.Load()
at MS.Internal.Designer.DesignerPane.LoadDesignerView(Boolean isReload)
我正在使用Visual Studio 2010。如果我使用VS 2012,例外情况就会消失,一切正常。 我也尝试过属性 - >调试 - >并禁用'启用Visual Studio托管过程'。 我的程序集名称中没有任何特殊字符。它只是被称为 SeatingPlans 我失踪了什么?不知道为什么VS2012显示我的xaml,但VS2010没有。