This repository was archived by the owner on Dec 19, 2018. It is now read-only.
This repository was archived by the owner on Dec 19, 2018. It is now read-only.
ASP.NET Core 2.1 gives error CS2017: Cannot specify /main if building a module or library #2398
Closed
Description
Original issue: https://github.com/aspnet/websdk/issues/350
Steps to reproduce:
- Install .NET Core SDK 2.1
- Create a new project with dotnet new "asp.net core web app"
- The project compiles OK
- Add element
<StartupObject>foo.Program</StartupObject>
to the csproj
Build fails with:
1>CSC : error CS2017: Cannot specify /main if building a module or library
This error did not occur with 2.0. Also a plain .NET core console app initialized with dotnet new "console application" does not have this problem.