VS2010 is throwing an Invalid XmlnsDeclaration occurs in assembly 'Expression.Samples.PathListBoxUtils' error.
description
Visual Studio 2010 is throwing the following error on a project with the PathListBoxUtils library included:
Error 1 Invalid XmlnsDeclaration occurs in assembly 'Expression.Samples.PathListBoxUtils, Version=4.0.0.0, Culture=neutral, PublicKeyToken=76319f7ba805fb35'. XmlnsDeclaration references a namespace 'PathListBoxUtils' that is not in the assembly.
The assembly was added to the project in Blend 4.
This is causing several problems inside of VS2010. The Designer fails to load and contains the following stack trace:
System.NullReferenceException
Object reference not set to an instance of an object.
at MS.Internal.Design.Metadata.ReflectionProjectNode.ProcessAssemblyNamespaces(Dictionary2 namespaces, AssemblyNode assembly)
at MS.Internal.Design.Metadata.ReflectionProjectNode.BuildNamespaces()
at MS.Internal.Design.Metadata.ReflectionProjectNode.EnsureState()
at MS.Internal.Design.Metadata.ReflectionProjectNode.Find(Identifier namespaceUri)
at Microsoft.Windows.Design.XamlLanguageService.<>c__DisplayClass6.<>c__DisplayClass8.<PrefetchAttachedAttributes>b__5(Object state)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
It is also causing intellisense in XAML to throw the following exception constantly:
System.AppDomainUnloadedException: Attempted to access an unloaded AppDomain. at Microsoft.Windows.Design.IXamlCompletion.get_Name() at MS.Internal.XamlLanguageService.XamlDeclarationsAdapter.GetName(Int32 index) at Microsoft.VisualStudio.Package.CompletionSet.OnCommit(String textSoFar, Int32 index, Int32 selected, UInt16 commitChar, String& completeWord) at Microsoft.VisualStudio.Editor.Implementation.ShimCompletion.TryCommit(Nullable1 queryCommitChar, Boolean isSelected) at Microsoft.VisualStudio.Editor.Implementation.ShimCompletionController.TryCommit(Nullable1 commitChar) at Microsoft.VisualStudio.Editor.Implementation.ShimCompletionController.PreProcessCommand(Guid& pguidCmdGroup, UInt32 nCmdID, IntPtr pvaIn, IntPtr pvaOut) at Microsoft.VisualStudio.Editor.Implementation.IntellisenseCommandFilter.Exec(Guid& pguidCmdGroup, UInt32 nCmdID, UInt32 nCmdexecopt, IntPtr pvaIn, IntPtr pvaOut) at Microsoft.VisualStudio.Editor.Implementation.CommandChainNode.Exec(Guid& pguidCmdGroup, UInt32 nCmdID, UInt32 nCmdexecopt, IntPtr pvaIn, IntPtr pvaOut) at Microsoft.VisualStudio.Editor.Implementation.CommandFilterWrapper.Exec(Guid& pguidCmdGroup, UInt32 nCmdID, UInt32 nCmdexecopt, IntPtr pvaIn, IntPtr pvaOut) at Microsoft.VisualStudio.Editor.Implementation.CommandChainNode.Exec(Guid& pguidCmdGroup, UInt32 nCmdID, UInt32 nCmdexecopt, IntPtr pvaIn, IntPtr pvaOut) at Microsoft.VisualStudio.Editor.Implementation.CommandFilterWrapper.Exec(Guid& pguidCmdGroup, UInt32 nCmdID, UInt32 nCmdexecopt, IntPtr pvaIn, IntPtr pvaOut) at Microsoft.VisualStudio.Editor.Implementation.CommandChainNode.Exec(Guid& pguidCmdGroup, UInt32 nCmdID, UInt32 nCmdexecopt, IntPtr pvaIn, IntPtr pvaOut) at Microsoft.VisualStudio.Package.ViewFilter.InnerExec(Guid& guidCmdGroup, UInt32 nCmdId, UInt32 nCmdexecopt, IntPtr pvaIn, IntPtr pvaOut) at Microsoft.VisualStudio.Package.ViewFilter.ExecCommand(Guid& guidCmdGroup, UInt32 nCmdId, UInt32 nCmdexecopt, IntPtr pvaIn, IntPtr pvaOut) at MS.Internal.XamlLanguageService.VsXamlLanguageService.XamlViewFilter.ExecCommand(Guid& guidCmdGroup, UInt32 nCmdId, UInt32 nCmdexecopt, IntPtr pvaIn, IntPtr pvaOut) at Microsoft.VisualStudio.Package.ViewFilter.Microsoft.VisualStudio.OLE.Interop.IOleCommandTarget.Exec(Guid& guidCmdGroup, UInt32 nCmdId, UInt32 nCmdexecopt, IntPtr pvaIn, IntPtr pvaOut) at Microsoft.VisualStudio.Editor.Implementation.CommandChainNode.Exec(Guid& pguidCmdGroup, UInt32 nCmdID, UInt32 nCmdexecopt, IntPtr pvaIn, IntPtr pvaOut) at Microsoft.VisualStudio.Editor.Implementation.CommandFilterWrapper.Exec(Guid& pguidCmdGroup, UInt32 nCmdID, UInt32 nCmdexecopt, IntPtr pvaIn, IntPtr pvaOut) at Microsoft.VisualStudio.Editor.Implementation.VsTextViewAdapter.Exec(Guid& pguidCmdGroup, UInt32 nCmdID, UInt32 nCmdexecopt, IntPtr pvaIn, IntPtr pvaOut) at Microsoft.VisualStudio.Editor.Implementation.VsKeyboardFilter.SendCommand(Guid cmdGroup, UInt32 cmdID, Object inParam) at Microsoft.VisualStudio.Editor.Implementation.VsKeyboardFilter.TextInput(TextCompositionEventArgs args) at Microsoft.VisualStudio.Text.Editor.Implementation.KeyProcessorDispatcher.<DispatchTextInputEvents>b__0(KeyProcessor p, TextCompositionEventArgs args) at Microsoft.VisualStudio.Text.Editor.Implementation.KeyProcessorDispatcher.<>c__DisplayClass1e1.<Dispatch>b__1a() at Microsoft.VisualStudio.Text.Utilities.GuardedOperations.CallExtensionPoint(Object errorSource, Action call)
Occasionally, this last error will cause VS2010 to crash.
None of these errors prevent the code from compiling and running correctly.