Why does Util.Compile().Run().Dump() only work in debug mode?

Hello Forum,

When I call this code:

Public  Sub Main()
    Util.NewProcess = True
    Call New Application().Run(New MyForm().Dump())
End Sub

' Define other methods and classes here
Public Class MyForm
    Inherits Form

    Public Sub New()
        ' Set ClientSize instead of Size, as each platform has different window border sizes
        ClientSize = New Size(600, 400)

        ' Title to show in the title bar
        Title = "Hello, Eto.Forms"

        ' Content of the form
        Content = New Label With {
            .Text = "Some content",
            .VerticalAlignment = VerticalAlignment.Center,
            .TextAlignment = TextAlignment.Center
    End Sub
End Class

Friend Class Program
    Public Shared Sub Main(ByVal args As String())
        Call New Application().Run(New MyForm())
    End Sub
End Class

From a console app:

Util.Compile("Eto-Form-Vb-0.linq").Run(QueryResultFormat.Html, Nothing).AsString().Dump()

The code works fine in debug mode, but in release mode, it just hangs indefinitely. Is there something specific I need to do to make release mode work properly?

Sign In or Register to comment.