I\'m trying to configure kestrel so that when it\'s in it\'s raw mode it runs on a specific port. However to do so it appears that the launchsettings.json needs to pass comm
A simple solution is to access the command line arguments through the Environment.GetCommandLineArgs method.
You only need to make sure that you remove the first argument, which is the executable name:
public class Startup
{
public Startup(IHostingEnvironment env)
{
var args = Environment.GetCommandLineArgs().Skip(1).ToArray();
var builder = new ConfigurationBuilder();
builder.AddCommandLine(args);
Configuration = builder.Build();
}
}