I wanted a custom Sub Main for a VB WinForms app. I’ve created the VB.Net app (.NET Framework 4.8) with VS2022. Unchecked the “Enable application framework” option of the project. Created the following module:
Private _mainForm As MainForm = New MainForm()
This worked fine when debugging with VS2022 but when I loaded the project with the AlterNET Studio Demo app, the following error was given during compilation:
Error Code: BC30738
Description: ‘Sub Main’ is declared more than once in ‘VBTest’: VBTest.My.MyApplication.Main(Args As String()), VBTest.Startup.Main()
Did I do something wrong or Scripter does not support custom Sub Main?