Visual Studio 2010 SP1 XAML Designer Incompatible with Irony Ver 1.0

Jul 23, 2012 at 5:55 PM

Having problems with Irony v1.0 and VS2010.  The internal XAML designer gives following error

System.Reflection.TargetInvocationException

Exception has been thrown by the target of an invocation.

at System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner) at System.RuntimeMethodHandle.InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeType typeOwner) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) at System.Delegate.DynamicInvokeImpl(Object[] args) 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)

 

System.Reflection.Adds.UnresolvedAssemblyException

Type universe cannot resolve assembly: Irony, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null.

at System.Reflection.Adds.AssemblyProxy.GetResolvedAssembly() at System.Reflection.Adds.AssemblyProxy.GetHashCode() at Microsoft.Windows.Design.Metadata.ReflectionMetadataContext.Reflectable`1.GetHashCode() at System.Collections.Generic.GenericEqualityComparer`1.GetHashCode(T obj) at System.Collections.Generic.HashSet`1.InternalGetHashCode(T item) at System.Collections.Generic.HashSet`1.Contains(T item) at Microsoft.Windows.Design.Metadata.ReflectionMetadataContext.CanParentContextSupportType(Reflectable`1 type) at Microsoft.Windows.Design.Metadata.ReflectionMetadataContext.GetTypeForReflectableType(Reflectable`1 reflectableType) at MS.Internal.Metadata.ClrType.GetTypeMetadata(Type type) at MS.Internal.Metadata.ClrType.get_BaseType() at MS.Internal.Design.Metadata.Xaml.XamlType.<GetAllAttachableProperties>d__7.MoveNext() at MS.Internal.Design.Metadata.Xaml.XamlType.<FindAttachableProperties>d__0.MoveNext() at Microsoft.Windows.Design.Metadata.Xaml.XamlExtensionImplementations.<FindAttachableProperties>d__7.MoveNext() at MS.Internal.VirtualModel.VirtualModelPropertyCollection.<GetUncachedProperties>d__0.MoveNext() at System.Linq.Buffer`1..ctor(IEnumerable`1 source) at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source) at MS.Internal.VirtualModel.VirtualModelPropertyCollection.GetEnumerator() at MS.Internal.Designer.PropertyEditing.Model.Properties.ModelPropertyMerger.<GetFirstProperties>d__0.MoveNext() at MS.Internal.Designer.PropertyEditing.Views.PropertyEntryReader.RedraftEntries(IPropertyViewManager viewManager, Selection selection, Boolean attachedOnly, IEventCodeBehindProxy eventCodeBehindProxy, CategoryList categoryList) at MS.Internal.Designer.PropertyEditing.PropertyInspector.UpdateCategories(Selection selection, Boolean attachedOnly, IEntryReader entryReader) at MS.Internal.Designer.PropertyEditing.PropertyInspector.RefreshPropertyList(Boolean attachedOnly) at MS.Internal.Designer.PropertyEditing.PropertyInspector.OnSelectionChangedIdle()

 

If I click on reload designer a total of three times, the disigner will display both XAML and visual display okey until I click in XAML editor area again and get same error.

Any thoughts?

Coordinator
Jul 23, 2012 at 6:07 PM

do you reference Irony in your project?

Other than that obvious thing, have no idea - how Xaml editor does assembly resolution...

Jul 23, 2012 at 6:57 PM

Yes, I do have a reference in my project to a copy of irony.dll.

Since the version that works is 1.0 and your web blog is 2009 and early 2010 is there a possible incompatibility with Framework 4.0?

Is there a newer version of irony.dll?

I downloaded the irony project form Codeplex and compile the solution but when I add the irony.dll from that project and clean/recompile my project I get several errors stating not found methods.

Warning 1 Namespace or type specified in the Imports 'Irony.Compiler' doesn't contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public member. Make sure the imported element name doesn't use any aliases. C:\Users\tony\Documents\Visual Studio 2010\Projects\SearchQueryWPF\SearchQueryWPF\MainWindow.xaml.vb 7 9 SearchQueryWPF
Warning 2 Namespace or type specified in the Imports 'Irony.Compiler' doesn't contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public member. Make sure the imported element name doesn't use any aliases. C:\Users\tony\Documents\Visual Studio 2010\Projects\SearchQueryWPF\SearchQueryWPF\Model2 - DAL\BookDAL.vb 5 9 SearchQueryWPF
Warning 3 Namespace or type specified in the Imports 'Irony.Compiler' doesn't contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public member. Make sure the imported element name doesn't use any aliases. C:\Users\tony\Documents\Visual Studio 2010\Projects\SearchQueryWPF\SearchQueryWPF\Utility\SearchGrammar.vb 5 9 SearchQueryWPF
Error 4 Type 'Grammar' is not defined. C:\Users\tony\Documents\Visual Studio 2010\Projects\SearchQueryWPF\SearchQueryWPF\Utility\SearchGrammar.vb 10 14 SearchQueryWPF
Error 5 Type 'IdentifierTerminal' is not defined. C:\Users\tony\Documents\Visual Studio 2010\Projects\SearchQueryWPF\SearchQueryWPF\Utility\SearchGrammar.vb 14 24 SearchQueryWPF
Error 6 Type 'StringLiteral' is not defined. C:\Users\tony\Documents\Visual Studio 2010\Projects\SearchQueryWPF\SearchQueryWPF\Utility\SearchGrammar.vb 19 26 SearchQueryWPF
Error 7 Type 'NonTerminal' is not defined. C:\Users\tony\Documents\Visual Studio 2010\Projects\SearchQueryWPF\SearchQueryWPF\Utility\SearchGrammar.vb 22 32 SearchQueryWPF
Error 8 Type 'NonTerminal' is not defined. C:\Users\tony\Documents\Visual Studio 2010\Projects\SearchQueryWPF\SearchQueryWPF\Utility\SearchGrammar.vb 23 30 SearchQueryWPF
Error 9 Type 'NonTerminal' is not defined. C:\Users\tony\Documents\Visual Studio 2010\Projects\SearchQueryWPF\SearchQueryWPF\Utility\SearchGrammar.vb 24 33 SearchQueryWPF
Error 10 Type 'NonTerminal' is not defined. C:\Users\tony\Documents\Visual Studio 2010\Projects\SearchQueryWPF\SearchQueryWPF\Utility\SearchGrammar.vb 25 31 SearchQueryWPF
Error 11 Type 'NonTerminal' is not defined. C:\Users\tony\Documents\Visual Studio 2010\Projects\SearchQueryWPF\SearchQueryWPF\Utility\SearchGrammar.vb 26 35 SearchQueryWPF
Error 12 Type 'NonTerminal' is not defined. C:\Users\tony\Documents\Visual Studio 2010\Projects\SearchQueryWPF\SearchQueryWPF\Utility\SearchGrammar.vb 27 37 SearchQueryWPF
Error 13 Type 'NonTerminal' is not defined. C:\Users\tony\Documents\Visual Studio 2010\Projects\SearchQueryWPF\SearchQueryWPF\Utility\SearchGrammar.vb 28 39 SearchQueryWPF
Error 14 Type 'NonTerminal' is not defined. C:\Users\tony\Documents\Visual Studio 2010\Projects\SearchQueryWPF\SearchQueryWPF\Utility\SearchGrammar.vb 29 37 SearchQueryWPF
Error 15 Type 'NonTerminal' is not defined. C:\Users\tony\Documents\Visual Studio 2010\Projects\SearchQueryWPF\SearchQueryWPF\Utility\SearchGrammar.vb 30 33 SearchQueryWPF
Error 16 Type 'NonTerminal' is not defined. C:\Users\tony\Documents\Visual Studio 2010\Projects\SearchQueryWPF\SearchQueryWPF\Utility\SearchGrammar.vb 31 35 SearchQueryWPF
Error 17 Type 'NonTerminal' is not defined. C:\Users\tony\Documents\Visual Studio 2010\Projects\SearchQueryWPF\SearchQueryWPF\Utility\SearchGrammar.vb 32 43 SearchQueryWPF
Error 18 Type 'NonTerminal' is not defined. C:\Users\tony\Documents\Visual Studio 2010\Projects\SearchQueryWPF\SearchQueryWPF\Utility\SearchGrammar.vb 33 39 SearchQueryWPF
Error 19 Type 'NonTerminal' is not defined. C:\Users\tony\Documents\Visual Studio 2010\Projects\SearchQueryWPF\SearchQueryWPF\Utility\SearchGrammar.vb 34 33 SearchQueryWPF
Error 20 'Root' is not a member of 'SearchQueryWPF.SearchGrammar'. C:\Users\tony\Documents\Visual Studio 2010\Projects\SearchQueryWPF\SearchQueryWPF\Utility\SearchGrammar.vb 36 9 SearchQueryWPF
Error 21 'Symbol' is not declared. It may be inaccessible due to its protection level. C:\Users\tony\Documents\Visual Studio 2010\Projects\SearchQueryWPF\SearchQueryWPF\Utility\SearchGrammar.vb 38 27 SearchQueryWPF
Error 22 'System.Empty' is not accessible in this context because it is 'Friend'. C:\Users\tony\Documents\Visual Studio 2010\Projects\SearchQueryWPF\SearchQueryWPF\Utility\SearchGrammar.vb 40 28 SearchQueryWPF
Error 23 'Symbol' is not declared. It may be inaccessible due to its protection level. C:\Users\tony\Documents\Visual Studio 2010\Projects\SearchQueryWPF\SearchQueryWPF\Utility\SearchGrammar.vb 41 32 SearchQueryWPF
Error 24 'Symbol' is not declared. It may be inaccessible due to its protection level. C:\Users\tony\Documents\Visual Studio 2010\Projects\SearchQueryWPF\SearchQueryWPF\Utility\SearchGrammar.vb 44 34 SearchQueryWPF
Error 25 'Symbol' is not declared. It may be inaccessible due to its protection level. C:\Users\tony\Documents\Visual Studio 2010\Projects\SearchQueryWPF\SearchQueryWPF\Utility\SearchGrammar.vb 46 30 SearchQueryWPF
Error 26 'MakePlusRule' is not declared. It may be inaccessible due to its protection level. C:\Users\tony\Documents\Visual Studio 2010\Projects\SearchQueryWPF\SearchQueryWPF\Utility\SearchGrammar.vb 51 9 SearchQueryWPF
Error 27 'RegisterPunctuation' is not declared. It may be inaccessible due to its protection level. C:\Users\tony\Documents\Visual Studio 2010\Projects\SearchQueryWPF\SearchQueryWPF\Utility\SearchGrammar.vb 54 9 SearchQueryWPF
Error 28 Type 'AstNode' is not defined. C:\Users\tony\Documents\Visual Studio 2010\Projects\SearchQueryWPF\SearchQueryWPF\Utility\SearchGrammar.vb 57 49 SearchQueryWPF
Error 29 Type 'AstNode' is not defined. C:\Users\tony\Documents\Visual Studio 2010\Projects\SearchQueryWPF\SearchQueryWPF\Utility\SearchGrammar.vb 71 29 SearchQueryWPF
Error 30 Type 'Token' is not defined. C:\Users\tony\Documents\Visual Studio 2010\Projects\SearchQueryWPF\SearchQueryWPF\Utility\SearchGrammar.vb 100 51 SearchQueryWPF
Error 31 Type 'Token' is not defined. C:\Users\tony\Documents\Visual Studio 2010\Projects\SearchQueryWPF\SearchQueryWPF\Utility\SearchGrammar.vb 104 83 SearchQueryWPF
Error 32 Type 'Token' is not defined. C:\Users\tony\Documents\Visual Studio 2010\Projects\SearchQueryWPF\SearchQueryWPF\Utility\SearchGrammar.vb 108 65 SearchQueryWPF
Error 33 Type 'Token' is not defined. C:\Users\tony\Documents\Visual Studio 2010\Projects\SearchQueryWPF\SearchQueryWPF\Utility\SearchGrammar.vb 114 51 SearchQueryWPF
Error 34 Type 'Token' is not defined. C:\Users\tony\Documents\Visual Studio 2010\Projects\SearchQueryWPF\SearchQueryWPF\Utility\SearchGrammar.vb 122 51 SearchQueryWPF
Warning 35 Namespace or type specified in the Imports 'Irony.Compiler' doesn't contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public member. Make sure the imported element name doesn't use any aliases. C:\Users\tony\Documents\Visual Studio 2010\Projects\SearchQueryWPF\SearchQueryWPF\ViewModel\MainWindowViewModel.vb 4 9 SearchQueryWPF
Error 36 Type 'LanguageCompiler' is not defined. C:\Users\tony\Documents\Visual Studio 2010\Projects\SearchQueryWPF\SearchQueryWPF\ViewModel\MainWindowViewModel.vb 13 29 SearchQueryWPF
Error 37 Type 'Irony.StringSet' is not defined. C:\Users\tony\Documents\Visual Studio 2010\Projects\SearchQueryWPF\SearchQueryWPF\ViewModel\MainWindowViewModel.vb 14 27 SearchQueryWPF
Error 38 Type 'LanguageCompiler' is not defined. C:\Users\tony\Documents\Visual Studio 2010\Projects\SearchQueryWPF\SearchQueryWPF\ViewModel\MainWindowViewModel.vb 29 26 SearchQueryWPF
Error 39 Type 'AstNode' is not defined. C:\Users\tony\Documents\Visual Studio 2010\Projects\SearchQueryWPF\SearchQueryWPF\ViewModel\MainWindowViewModel.vb 77 25 SearchQueryWPF
Error 40 Type 'SyntaxError' is not defined. C:\Users\tony\Documents\Visual Studio 2010\Projects\SearchQueryWPF\SearchQueryWPF\ViewModel\MainWindowViewModel.vb 101 25 SearchQueryWPF
Error 41 The type 'local:MainWindowViewModel' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built. C:\Users\tony\Documents\Visual Studio 2010\Projects\SearchQueryWPF\SearchQueryWPF\MainWindow.xaml 9 10 SearchQueryWPF

Coordinator
Jul 23, 2012 at 7:18 PM

don't know where you get it from, but Irony.Compiler namespace (mentioned in error printout) is long gone, should not be there at all.

My guess is that you took latest Irony sources from codeplex, but for search grammar you use Michael's code from the book or article on SqlCentral. This code (search grammar) is outdated; there is up to date version in Irony sources, in Irony.Samples project, SearchGrammar - use this as is or as a basis point for your own version.

Jul 23, 2012 at 9:01 PM

Thanks - You are correct on both references.  I am new to both iFTS for SQL Server and Irony Parser/Compiler and took my starting example from Michael Cole's Pro Full-Text Search and equilivant find on SqlCentral FTS article/sample.  Per your suggestion I will now look at Irony.Samples project, SearchGrammar.

Thanks for your patience and assistance