Hi,
I downloaded 21.2.4 to try out Model Editor designer.
It works on completely new project, but it crashes on my existing project (project was started previously from scratch on .NET 6 and 21.2.3).
When opening xafml in .Module, .Module.Win, or .Win I get following exception:
Call Stack 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, Dictionary`2 settings, String frameworkVersion)
at DevExpress.ExpressApp.Design.ModelEditorServer.ServerHost.<>c__DisplayClass66_0.<OpenModelEditor>b__1()
at DevExpress.ExpressApp.Design.ModelEditorServer.UiRunner.<>c__DisplayClass3_0.<RunOnUIThreadCore>b__0(Object _)
--- End of stack trace from previous location ---
at DevExpress.ExpressApp.Design.ModelEditorServer.ServerHost.OpenModelEditor(String fileName, String projectUniqueName, Dictionary`2 settings, String frameworkVersion)
at DevExpress.ExpressApp.Design.ModelEditorServer.ServerProtocol.OpenModelEditor(String xafmlFileName, String projectUniqueName, Dictionary`2 settings, String frameworkVersion)
--- End of stack trace from previous location ---
at DevExpress.ExpressApp.Design.ModelEditorServer.LoggedServerProtocol`1.Invoke(MethodInfo targetMethod, Object[] args)
--- End of stack trace from previous location ---
at System.Reflection.DispatchProxyGenerator.Invoke(Object[] args)
at generatedProxy_1.OpenModelEditor(String , String , Dictionary`2 , String )
----------InnerException----------
Could not find the ModuleBase descendant to build the Application Model.
Try to rebuild your XAF solution or reload the Model Editor. If this does not help, send diagnostic information to DevExpress Support: https://www.devexpress.com/go/XAF_ModelEditor_Troubleshooting.aspx
----------StackTrace----------
at StreamJsonRpc.JsonRpc.<InvokeCoreAsync>d__139`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.<OpenModelEditorAsync>d__134.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.<>c__DisplayClass132_0.<<OpenModelEditor>b__0>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.<>c__DisplayClass118_0.<<RunAsync>b__0>d.MoveNext()
Is it something obvious, can I somehow send more information or should I send my project?
Kind regards,
Mario
Workaround
Edit the file : C:\Program Files (x86)\DevExpress 21.2\Components\Tools\eXpressAppFrameworkNetCore\Model Editor\DevExpress.ExpressApp.Design.ModelEditorServer.NetCore.v21.2.runtimeconfig.json
file as follows:
JSON{
"runtimeOptions": {
"tfm": "net6.0",
"frameworks": [
{
"name": "Microsoft.WindowsDesktop.App",
"version": "6.0.0"
},
{
"name": "Microsoft.AspNetCore.App",
"version": "6.0.0"
}
],
"configProperties": {
"System.Reflection.Metadata.MetadataUpdater.IsSupported": false
}
}
}
Just in case, tried the same thing on another machine (Windows Server 2019) and it is the same error.
Seems project related as it works fine on completely new project but this is the only .NET Core XAF project created before, so I do not have any other projects to test on.
Hi,
Also having similar issue with VS 2022 + .net 6. The issue occurs also in new project.
at DevExpress.ExpressApp.Utils.Reflection.TypeData.CreateInstance(Object[] args) at DevExpress.ExpressApp.Utils.Reflection.TypeHelper.CreateInstance(Type type, Object[] args) at DevExpress.Persistent.Base.ReflectionHelper.CreateObject(Type objectType, Object[] args) 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, Dictionary`2 settings, String frameworkVersion) at DevExpress.ExpressApp.Design.ModelEditorServer.ServerHost.<>c__DisplayClass66_0.<OpenModelEditor>b__1() at DevExpress.ExpressApp.Design.ModelEditorServer.UiRunner.<>c__DisplayClass3_0.<RunOnUIThreadCore>b__0(Object _) --- End of stack trace from previous location --- at DevExpress.ExpressApp.Design.ModelEditorServer.ServerHost.OpenModelEditor(String fileName, String projectUniqueName, Dictionary`2 settings, String frameworkVersion) at DevExpress.ExpressApp.Design.ModelEditorServer.ServerProtocol.OpenModelEditor(String xafmlFileName, String projectUniqueName, Dictionary`2 settings, String frameworkVersion) --- End of stack trace from previous location --- at DevExpress.ExpressApp.Design.ModelEditorServer.LoggedServerProtocol`1.Invoke(MethodInfo targetMethod, Object[] args) --- End of stack trace from previous location --- at System.Reflection.DispatchProxyGenerator.Invoke(Object[] args) at generatedProxy_1.OpenModelEditor(String , String , Dictionary`2 , String ) ----------InnerException---------- Could not load file or assembly 'System.ComponentModel.Primitives, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. Le fichier spécifié est introuvable. ----------StackTrace---------- at DXApplication7.Blazor.Server.DXApplication7BlazorApplication..ctor() at Create_DXApplication7BlazorApplication() at DevExpress.ExpressApp.Utils.Reflection.TypeData.CreateInstance(Object[] args) ----------InnerException---------- Unable to create an instance of the "DXApplication7.Blazor.Server.DXApplication7BlazorApplication" type. Reason: "Could not load file or assembly 'System.ComponentModel.Primitives, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. Le fichier spécifié est introuvable." ----------StackTrace---------- at StreamJsonRpc.JsonRpc.<InvokeCoreAsync>d__139`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.<OpenModelEditorAsync>d__134.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.<>c__DisplayClass132_0.<<OpenModelEditor>b__0>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.<>c__DisplayClass118_0.<<RunAsync>b__0>d.MoveNext()
Hello,
Please send us the %USERPROFILE%\AppData\Roaming\eXpressAppFramework folder.
Hi,
I cleaned the folder, started Visual Studio and Model Editor, then compressed the folder content.
Find zip file attached.
EDIT: This log file is when opening Model.xafml in Blazor.Server project.
Kind regards,
Mario
Hi,
In previous comment, I did not realize I opened model from Blazor.Server (which also throws exception, albeit different).
This time I deleted folder content again and opened model in .Module project.
Find zip file attached.
Kind regards,
Mario
Hi,
I solved the problem with the designer by changing this file :
C:\Program Files (x86)\DevExpress 21.2\Components\Tools\eXpressAppFrameworkNetCore\Model Editor\DevExpress.ExpressApp.Design.ModelEditorServer.NetCore.v21.2.runtimeconfig.json
{ "runtimeOptions": { "tfm": "net6.0", "frameworks": [ { "name": "Microsoft.WindowsDesktop.App", "version": "6.0.0" }, { "name": "Microsoft.AspNetCore.App", "version": "6.0.0" } ], "configProperties": { "System.Reflection.Metadata.MetadataUpdater.IsSupported": false } } }
Cheers.
Hello,
Thank you for sharing your results. I checked Mario's log files and the issue is the same. Model Editor cannot load some .NET 6 assemblies.
Please use Tavares Andre's workaround. We are working on a solution and will inform you once we have news.
Hi,
Just to confirm, mentioned workaround works on my side as well.
Kind regards,
Mario
Had the same problem with older projects (created with < 21.2.4). The workaround works.
Kind regards,
Christian
Hi!
This bug is still not solved with 21.2.5.
After installing 21.2.5 the same error occurred!
I needed to reapply the workaround to get everything up and running.
Please solve this for future versions.
Thx