Alternative solution is to use a hosting.json
in the root of the project.
{
"urls": "http://localhost:60000"
}
And then in Program.cs
public static void Main(string[] args)
{
var config = new ConfigurationBuilder()
.SetBasePath(Directory.GetCurrentDirectory())
.AddJsonFile("hosting.json", true)
.Build();
var host = new WebHostBuilder()
.UseKestrel(options => options.AddServerHeader = false)
.UseConfiguration(config)
.UseContentRoot(Directory.GetCurrentDirectory())
.UseIISIntegration()
.UseStartup<Startup>()
.Build();
host.Run();
}