eXpandFramework / eXpand

DevExpress XAF (eXpressApp) extension framework. 𝗹𝗶𝗻𝗸𝗲𝗱𝗶𝗻.𝗲𝘅𝗽𝗮𝗻𝗱𝗳𝗿𝗮𝗺𝗲𝘄𝗼𝗿𝗸.𝗰𝗼𝗺, 𝘆𝗼𝘂𝘁𝘂𝗯𝗲.𝗲𝘅𝗽𝗮𝗻𝗱𝗳𝗿𝗮𝗺𝗲𝘄𝗼𝗿𝗸.𝗰𝗼𝗺 and 𝘁𝘄𝗶𝘁𝘁𝗲𝗿 @𝗲𝘅𝗽𝗮𝗻𝗱𝗳𝗿𝗮𝗺𝗲𝘄𝗼𝗿𝗸 and or simply 𝗦𝘁𝗮𝗿/𝘄𝗮𝘁𝗰𝗵 this repository and get notified from 𝗚𝗶𝘁𝗛𝘂𝗯
http://expand.expandframework.com
Microsoft Public License
220 stars 114 forks source link

Model Editor failed to load. - 'FontStyle' property specified was not found. #1031

Closed pavlovboris closed 9 months ago

pavlovboris commented 9 months ago

Hello,

After updating to 23.1.601.3, Devexpress model editor won't start on any project with the following exception : System.Reflection.CustomAttributeFormatException: 'FontStyle' property specified was not found. --->

The XpandModelEditor seems to work as expected.

Thank you for your great work and support!

Model Editor Log :

24.11.2023 г. 16:16:38 : Enter SetExceptionForModelEditorAsync 24.11.2023 г. 16:16:45 : System.Reflection.CustomAttributeFormatException: 'FontStyle' property specified was not found. ---> System.Reflection.CustomAttributeFormatException: 'FontStyle' property specified was not found. ---> StreamJsonRpc.RemoteInvocationException: 'FontStyle' property specified was not found. at StreamJsonRpc.JsonRpc.d151`1.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at DevExpress.ExpressApp.Design.ClientHost.d136.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at DevExpress.ExpressApp.Design.ClientHost.<>cDisplayClass134_0.<b0>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at DevExpress.ExpressApp.Design.ClientHost.<>cDisplayClass120_0.<b0>d.MoveNext() RPC server exception: System.Reflection.CustomAttributeFormatException: 'FontStyle' property specified was not found. ---> System.Reflection.CustomAttributeFormatException: 'FontStyle' property specified was not found. at System.Reflection.CustomAttribute.AddCustomAttributes(ListBuilder1& attributes, RuntimeModule decoratedModule, Int32 decoratedMetadataToken, RuntimeType attributeFilterType, Boolean mustBeInheritable, ListBuilder1 derivedAttributes) --- End of inner exception stack trace --- at System.Reflection.CustomAttribute.AddCustomAttributes(ListBuilder1& attributes, RuntimeModule decoratedModule, Int32 decoratedMetadataToken, RuntimeType attributeFilterType, Boolean mustBeInheritable, ListBuilder1 derivedAttributes) at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeModule decoratedModule, Int32 decoratedMetadataToken, Int32 pcaCount, RuntimeType attributeFilterType) at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeType type, RuntimeType caType, Boolean inherit) at System.RuntimeType.GetCustomAttributes(Boolean inherit) at DevExpress.Xpo.Metadata.ReflectionClassInfo.GetCustomAttributes(Type classType) at DevExpress.Xpo.Metadata.ReflectionClassInfo..ctor(Type classType, XPDictionary dictionary) at DevExpress.Xpo.Metadata.ReflectionDictionary.CreateClassInfo(Type classType) at DevExpress.Xpo.Metadata.ReflectionDictionary.ResolveClassInfoByType(Type classType) at DevExpress.ExpressApp.DC.Xpo.XafReflectionDictionary.ResolveClassInfoByType(Type classType) at DevExpress.Xpo.Metadata.ReflectionDictionary.QueryClassInfo(Type classType) at DevExpress.Xpo.Metadata.XPDictionary.GetClassInfo(Type classType) at DevExpress.Xpo.Metadata.XPMemberInfo.get_CollectionElementType() at DevExpress.Xpo.Metadata.XPMemberInfo.GetAssociatedMember() at DevExpress.ExpressApp.DC.Xpo.XpoTypeInfoSource.InitMemberInfo(XafMemberInfo member, XPMemberInfo xpMember) at DevExpress.ExpressApp.DC.Xpo.XpoTypeInfoSource.InitMemberInfo(ITypeInfo owner, XafMemberInfo member, Object memberSource) at DevExpress.ExpressApp.DC.Xpo.XpoTypeInfoSource.InitMemberInfo(Object memberSource, XafMemberInfo member) at Xpand.Persistent.Base.Xpo.XpandXpoTypeInfoSource.DevExpress.ExpressApp.DC.ITypeInfoSource.InitMemberInfo(Object member, XafMemberInfo memberInfo) in D:\a\1\s\Xpand\Xpand.Persistent\Xpand.Persistent.Base\Xpo\XpandXpoTypeInfoSource.cs:line 40 at DevExpress.ExpressApp.DC.TypeInfo.InitializeMember(Object member, String memberName) at DevExpress.ExpressApp.DC.Xpo.XpoTypeInfoSource.EnumXPClassMembers(TypeInfo info, EnumMembersHandler handler) at DevExpress.ExpressApp.DC.Xpo.XpoTypeInfoSource.EnumMembers(TypeInfo info, EnumMembersHandler handler) at Xpand.Persistent.Base.Xpo.XpandXpoTypeInfoSource.DevExpress.ExpressApp.DC.ITypeInfoSource.EnumMembers(TypeInfo info, EnumMembersHandler handler) in D:\a\1\s\Xpand\Xpand.Persistent\Xpand.Persistent.Base\Xpo\XpandXpoTypeInfoSource.cs:line 15 at DevExpress.ExpressApp.DC.TypeInfo.GetOwnMembers() at DevExpress.ExpressApp.DC.TypeInfo.Refresh(Boolean refreshMembers) at DevExpress.ExpressApp.DC.Xpo.XpoTypeInfoSource.RegisterEntity(Type type) at DevExpress.ExpressApp.DC.TypesInfo.RegisterEntity(Type entityType) at DevExpress.ExpressApp.DC.TypesInfo.EnsureReferencesForEntity(Type entityType) at DevExpress.ExpressApp.DC.TypesInfo.RegisterEntity(Type entityType) at DevExpress.ExpressApp.DC.TypesInfo.EnsureReferencesForEntity(Type entityType) at DevExpress.ExpressApp.DC.TypesInfo.RegisterEntity(Type entityType) at DevExpress.ExpressApp.DC.TypesInfo.EnsureReferencesForEntity(Type entityType) at DevExpress.ExpressApp.DC.TypesInfo.RegisterEntity(Type entityType) at DevExpress.ExpressApp.DC.TypesInfo.EnsureReferencesForEntity(Type entityType) at DevExpress.ExpressApp.DC.TypesInfo.RegisterEntity(Type entityType) at DevExpress.ExpressApp.DC.TypesInfo.EnsureReferencesForEntity(Type entityType) at DevExpress.ExpressApp.DC.TypesInfo.RegisterEntity(Type entityType) at DevExpress.ExpressApp.DC.TypesInfo.EnsureReferencesForEntity(Type entityType) at DevExpress.ExpressApp.DC.TypesInfo.RegisterEntity(Type entityType) at DevExpress.ExpressApp.DC.TypesInfo.EnsureReferencesForEntity(Type entityType) at DevExpress.ExpressApp.DC.TypesInfo.RegisterEntity(Type entityType) at DevExpress.ExpressApp.DC.TypesInfo.EnsureReferencesForEntity(Type entityType) at DevExpress.ExpressApp.DC.TypesInfo.RegisterEntity(Type entityType) at DevExpress.ExpressApp.DC.TypesInfo.EnsureReferencesForEntity(Type entityType) at DevExpress.ExpressApp.DC.TypesInfo.RegisterEntity(Type entityType) at DevExpress.ExpressApp.DC.TypesInfo.EnsureReferencesForEntity(Type entityType) at DevExpress.ExpressApp.DC.TypesInfo.RegisterEntity(Type entityType) at DevExpress.ExpressApp.DC.TypesInfo.EnsureReferencesForEntity(Type entityType) at DevExpress.ExpressApp.DC.TypesInfo.RegisterEntity(Type entityType) at DevExpress.ExpressApp.DC.TypesInfo.EnsureReferencesForEntity(Type entityType) at DevExpress.ExpressApp.DC.TypesInfo.RegisterEntity(Type entityType) at DevExpress.ExpressApp.DC.TypesInfo.EnsureReferencesForEntity(Type entityType) at DevExpress.ExpressApp.DC.TypesInfo.RegisterEntity(Type entityType) at DevExpress.ExpressApp.DC.TypesInfo.EnsureReferencesForEntity(Type entityType) at DevExpress.ExpressApp.DC.TypesInfo.RegisterEntity(Type entityType) at DevExpress.ExpressApp.DC.TypesInfo.EnsureReferencesForEntity(Type entityType) at DevExpress.ExpressApp.DC.TypesInfo.RegisterEntity(Type entityType) at DevExpress.ExpressApp.DC.TypesInfo.EnsureReferencesForEntity(Type entityType) at DevExpress.ExpressApp.DC.TypesInfo.RegisterEntity(Type entityType) at DevExpress.ExpressApp.DC.TypesInfo.EnsureReferencesForEntity(Type entityType) at DevExpress.ExpressApp.DC.TypesInfo.RegisterEntity(Type entityType) at DevExpress.ExpressApp.DC.TypesInfo.EnsureReferencesForEntity(Type entityType) at DevExpress.ExpressApp.DC.TypesInfo.RegisterEntity(Type entityType) at DevExpress.ExpressApp.DC.TypesInfo.RegisterEntities(IEnumerable1 types) at DevExpress.ExpressApp.ApplicationModulesManager.LoadDomainComponents(ITypesInfo typesInfo) at DevExpress.ExpressApp.ApplicationModulesManager.LoadTypesInfo(ITypesInfo typesInfo) at DevExpress.ExpressApp.ApplicationModulesManager.Load(ITypesInfo typesInfo, Boolean loadTypesInfo) at DevExpress.ExpressApp.Utils.DesignerModelFactory.CreateModulesManager(XafApplication application, String configFileName, String assembliesPath, Action initializeTypeInfoSources) at DevExpress.ExpressApp.Design.ModelEditor.ModelLoader.LoadModel(ITypeDiscoveryService typeDiscoveryService, String targetDiffFileName, IDisposable& obj, ILogger logger) at DevExpress.ExpressApp.Design.ModelEditor.ModelEditorFormController.CreateModelEditorController() at DevExpress.ExpressApp.Design.ModelEditor.ModelEditorFormController.Init() at DevExpress.ExpressApp.Design.ModelEditorServer.ServerHost.CreateNewModelEditor(String fileName, ModelEditorInfo meInfo, String projectUniqueName, Dictionary2 settings, String frameworkVersion) at DevExpress.ExpressApp.Design.ModelEditorServer.ServerHost.<>cDisplayClass66_0.b1() at DevExpress.ExpressApp.Design.ModelEditorServer.UiRunner.<>cDisplayClass3_0.b0(Object _) --- End of stack trace from previous location --- at DevExpress.ExpressApp.Design.ModelEditorServer.ServerHost.OpenModelEditor(String fileName, String projectUniqueName, Dictionary2 settings, String frameworkVersion) at DevExpress.ExpressApp.Design.ModelEditorServer.ServerProtocol.OpenModelEditor(String xafmlFileName, String projectUniqueName, Dictionary2 settings, String frameworkVersion) at InvokeStub_IServerReceiveProtocol.OpenModelEditor(Object, Object, IntPtr) at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr args, BindingFlags invokeAttr) --- End of stack trace from previous location --- at DevExpress.ExpressApp.Design.ModelEditorServer.LoggedServerProtocol1.Invoke(MethodInfo targetMethod, Object[] args) at generatedProxy_1.OpenModelEditor(String, String, Dictionary2, String) at InvokeStub_generatedProxy_1.OpenModelEditor(Object, Object, IntPtr) at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr args, BindingFlags invokeAttr)

Exception_EndOfInnerExceptionStack

apobekiaris commented 9 months ago

I would search all files in all dirs for this property FontStyle maybe it can give us a clue what's going on, if not I require a sample reproducing the case.

apobekiaris commented 9 months ago

a tip from the XAF team, it maybe a version conflict e.g. if u use different a version TypeA!=TypeA

apobekiaris commented 9 months ago

if u can repro it and does not involve eXpandFramework, you need to ask the DX support

pavlovboris commented 9 months ago

Thanks for the hints! Found out the following: if I remove all attributes that have [Appearance ... FontStyle](Excel importer as well(ExcelColumnMap)) then the model editor loads correctly. As far as your suggestion, I will try to repro and will contact DX if find more, but the exception occurs only when 23.1.601.3/23.1.601.2 is installed, it does not appear with 23.1.601.1 That's why I thought that its something with exPand.

apobekiaris commented 9 months ago

As far as your suggestion, I will try to repro and will contact DX if find more, but the exception occurs only when 23.1.601.3/23.1.601.2 is installed, it does not appear with 23.1.601.1 that why I thought that its something with exPand.

it still can be a version conflict, but in any case as I can not repro it nor my tests or my apps fail, I can only help u If I have a repro sample

pavlovboris commented 9 months ago

Dont want to lose our time anymore on this, I can live without the appearance attribute FontStyle in Code and without excelimporter module. Maybe I will try to repro later only with excelimporter module, Can close for now.

Thank you and BR