In VS2022, VB hot reload never works, claiming ENC0005, when Handles is not relevant

peter rumsey 0 Reputation points
2025-03-07T05:07:54.19+00:00

In this code, deleting either LstLog line text while at the breakpoint evinces the problem. You can use Debug. instead of LstLog.

    Private Sub mnuLogShown_Click(sender As Object, e As EventArgs) Handles mnuLogShown.Click
        LstLog.Write($"--------> File Pair List started at {Now}")
        LstLog.Write($"{fPair.LName}|#{xPair}|{fPair.RName}")
        For Each i In fPair.Map
            Dim item = cFiles(i).lvItem
            If Not item.fPair.Op.Any(Op.Ops) Then Continue For
            'LstLog.Write()
            Debug.WriteLine($"{item.LText} {item.Ops} {item.RText}")
        Next i '<--breakpoint>
    End Sub

Visual Studio Debugging
Visual Studio Debugging
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Debugging: The act or process of detecting, locating, and correcting logical or syntactical errors in a program or malfunctions in hardware. In hardware contexts, the term troubleshoot is the term more frequently used, especially if the problem is major.
1,033 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.