I am upgrading VB.NET projects from VS2015 to VS2022. Many lines use the colon for multiple statements on a single line, like
Try : If MyDb IsNot Nothing Then MyDb.Dispose() Catch : End Try
This was, and should still be, acceptable per
Statements in Visual Basic | Microsoft Docs where it states, "You can have multiple statements on a single line separated by the colon (:) character."
Instead, I am getting errors like, "'Try' must end with a matching 'End Try'." I couldn't find any setting for this in Tools | Options. Am I missing something?