I'm trying to write a very simple console exe in vb.net. I have written the .vb file and opened it inside Visual Studio .NET but it seems I can't compile from within here without defining a project for my solution. (Is that correct?)
And if I try to add a project, all the available ones are in C# which I don't want to code in.
So I instead run the command line compiler, vbc, to compile my simple little .vb file:
vbc /out:c:/hello.exe /t:exe c:/"vbnet/Hellovb"
BUT IT DOESN'T compile, annoyingly.. It says "Sub Main was not found in 'Hello'"
Here is my code:
Dim obj As Class1 = New Class1
Function Method1() As String
Return "Hello Experts Exchange"
What the heck is going on???