Root cause: Your project Output type is : Class Library.
Solution: Your project Output Type either Console Application or Windows Application
Steps:
Right click on project in Solution Explorer -> Properties.
In opened tab with properties, click on Application
You will find a comboBox marked with Output Type label.
Select either: Console Application or Windows Application