Skip to content
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
@pranavkm

Description

@pranavkm

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.

Metadata

Metadata

Assignees

Labels

3 - DonePRI: 0 - CriticalBlocks a critical product path. Must be handled immediatelybug

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions