0

Hi i have created a web api application in ASP.Net 5. i have set

"compilationOptions": {
    "emitEntryPoint": true
  },

in project.json file. But the following function

public static void Main(string[] args) => WebApplication.Run<Startup>(args);

in Startup.cs does not get triggering. Please help me.

selvakumar
  • 1,771
  • 3
  • 20
  • 34

1 Answers1

0

this link ASP.NET 5 Entry point overview gives the solution to trigger entry point in ASP.NET 5 Web Application. We can trigger the entry point by adding the following line in project.json file.

"commands": {
    "web": "Microsoft.AspNet.Server.Kestrel",
     "devo": "MyProject --server Microsoft.AspNet.Server.Kestrel --server.urls http://0.0.0.0:5001 --ASPNET_ENV Development",
   },

In this code replace MyProject by your project name and select this command in debugging option of visual studio.enter image description here

selvakumar
  • 1,771
  • 3
  • 20
  • 34