/// <summary> /// Creates a new instance. /// </summary> /// <param name="environmentNameKey">The environment key to be searched</param> /// <exception cref="ArgumentNullException"></exception> public HostBuilder(string environmentNameKey = Constants.EnvironmentNameKeyDefault) : this(HostingEnvironment.BuildDefault(environmentNameKey)) { }