写法变更 导致windows 服务挂掉,修改测试
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
0e4c972b19
commit
1baa31db04
|
@ -27,11 +27,7 @@ using LogDashboard;
|
|||
|
||||
|
||||
|
||||
|
||||
var builder = WebApplication.CreateBuilder(args);
|
||||
|
||||
#region 环境变量设置,以及部署运维平台
|
||||
|
||||
#region 获取环境变量
|
||||
//以配置文件为准,否则 从url中取环境值(服务以命令行传递参数启动,配置文件配置了就不需要传递环境参数)
|
||||
var config = new ConfigurationBuilder()
|
||||
.AddEnvironmentVariables()
|
||||
|
@ -48,11 +44,19 @@ if (string.IsNullOrWhiteSpace(enviromentName))
|
|||
: "Development";
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
var builder = WebApplication.CreateBuilder(new WebApplicationOptions
|
||||
{
|
||||
EnvironmentName = enviromentName
|
||||
});
|
||||
|
||||
#region 主机配置
|
||||
|
||||
|
||||
NewId.SetProcessIdProvider(new CurrentProcessIdProvider());
|
||||
|
||||
builder.Host.UseEnvironment(enviromentName)
|
||||
builder.Host
|
||||
.ConfigureAppConfiguration((hostContext, config) =>
|
||||
{
|
||||
|
||||
|
|
Loading…
Reference in New Issue