Bug Report T1051661
Visible to All Users

Core - Model Editor does not work with .NET 6 projects

created 3 years ago (modified 3 years ago)

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 } } }
Show previous comments (7)
MB MB
Mario Blatarić 3 years ago

    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

        Answers approved by DevExpress Support

        created 3 years ago (modified 3 years ago)

        We have addressed the issue described in this ticket and will include a fix in our next maintenance update. Should you need to apply our fix prior to official release, you can request a hotfix here.

        Important Notes:

        • Hotfixes may be unavailable for Early Access/Beta builds or updates set for release within a week.
        • .NET only: in the NuGet Package Manager, use your personal NuGet feed and check the "Include prerelease" option to view the hotfix package in the "Updates" tab.
        Additional information:

        This fix causes the following breaking change: Core - Model Editor and DBUpdater for .NET 5 projects require .NET Runtime 6 to be installed on the development machine.

          Comments (3)

            The version for both the frameworks is 6.0.1 now.
            Just to save you the time looking for another issue :)

            Michal

            BI BI
            Bjoern Isemann 3 years ago

              Hm doesnt help in my case. I installed the latest pre-release via nuget but get the following exception. net6 and vs2022 pro.

              bei System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
              bei DevExpress.ExpressApp.Design.ClientHost.<WaitForInitAsync>d__116.MoveNext()
              ----------InnerException----------
              Timeout für den Vorgang wurde überschritten.
              ----------StackTrace----------
              bei System.IO.Pipes.NamedPipeClientStream.ConnectInternal(Int32 timeout, CancellationToken cancellationToken, Int32 startTime)
              bei System.Threading.Tasks.Task.Execute()
              — Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde —
              bei System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
              bei System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
              bei DevExpress.ExpressApp.Design.ClientHost.<CreateStreamAndConnectAsync>d__123.MoveNext()
              — Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde —
              bei System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
              bei System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
              bei DevExpress.ExpressApp.Design.ClientHost.<StartListeningAsync>d__122.MoveNext()
              — Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde —
              bei System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
              bei System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
              bei DevExpress.ExpressApp.Design.ClientHost.<LaunchAsync>d__121.MoveNext()
              — Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde —
              bei System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
              bei System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
              bei DevExpress.ExpressApp.Design.ClientHost.<>c__DisplayClass115_0.<<InitServer>b__0>d.MoveNext()
              — Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde —
              bei System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
              bei System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
              bei DevExpress.ExpressApp.Design.ClientHost.<>c__DisplayClass118_0.<<RunAsync>b__0>d.MoveNext()

              Andrey K (DevExpress Support) 3 years ago

                Hello Bjoern Isemann,

                This log is not enough to determine the cause of the issue. To let us go further, please send us the following diagnostic information: https://www.devexpress.com/go/XAF_ModelEditor_Troubleshooting.aspx

                We look forward to your response.

                Thanks,
                Andrey

                Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

                Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.