My Solutions:
<OutputType>Exe</OutputType>There are 2 mainly reasons for this error:
Configurations .csproj file the .NET project will be built into .exe / .dll file ( by run 'dotnet build'). Incase, we config the .csproj with option: Exe the .NET project will be built to .exe file that need an Main() endpoint. So that why the error happening.
Don't have Main() endpoint