Browse Source

remove Microsoft.EntityFrameworkCore.Tools package from start the project

pull/765/head
cKey 3 years ago
parent
commit
6d911edcd1
  1. 4
      aspnet-core/services/LY.MicroService.AuthServer.HttpApi.Host/LY.MicroService.AuthServer.HttpApi.Host.csproj
  2. 6
      aspnet-core/services/LY.MicroService.AuthServer.HttpApi.Host/Program.cs
  3. 29
      aspnet-core/services/LY.MicroService.AuthServer/EntityFrameworkCore/AuthServerMigrationsDbContextFactory.cs
  4. 4
      aspnet-core/services/LY.MicroService.AuthServer/LY.MicroService.AuthServer.csproj
  5. 6
      aspnet-core/services/LY.MicroService.AuthServer/Program.cs
  6. 30
      aspnet-core/services/LY.MicroService.BackendAdmin.HttpApi.Host/EntityFrameworkCore/BackendAdminMigrationsDbContextFactory.cs
  7. 4
      aspnet-core/services/LY.MicroService.BackendAdmin.HttpApi.Host/LY.MicroService.BackendAdmin.HttpApi.Host.csproj
  8. 6
      aspnet-core/services/LY.MicroService.BackendAdmin.HttpApi.Host/Program.cs
  9. 30
      aspnet-core/services/LY.MicroService.LocalizationManagement.HttpApi.Host/EntityFrameworkCore/LocalizationManagementMigrationsDbContextFactory.cs
  10. 4
      aspnet-core/services/LY.MicroService.LocalizationManagement.HttpApi.Host/LY.MicroService.LocalizationManagement.HttpApi.Host.csproj
  11. 6
      aspnet-core/services/LY.MicroService.LocalizationManagement.HttpApi.Host/Program.cs
  12. 29
      aspnet-core/services/LY.MicroService.PlatformManagement.HttpApi.Host/EntityFrameworkCore/PlatformManagementMigrationsDbContextFactory.cs
  13. 4
      aspnet-core/services/LY.MicroService.PlatformManagement.HttpApi.Host/LY.MicroService.PlatformManagement.HttpApi.Host.csproj
  14. 6
      aspnet-core/services/LY.MicroService.PlatformManagement.HttpApi.Host/Program.cs
  15. 30
      aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/EntityFrameworkCore/RealtimeMessageMigrationsDbContextFactory.cs
  16. 4
      aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/LY.MicroService.RealtimeMessage.HttpApi.Host.csproj
  17. 6
      aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/Program.cs
  18. 30
      aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/EntityFrameworkCore/TaskManagementMigrationsDbContextFactory.cs
  19. 4
      aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/LY.MicroService.TaskManagement.HttpApi.Host.csproj
  20. 6
      aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/Program.cs
  21. 32
      aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/EntityFrameworkCore/WebhooksManagementMigrationsDbContextFactory.cs
  22. 4
      aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/LY.MicroService.WebhooksManagement.HttpApi.Host.csproj
  23. 6
      aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/Program.cs
  24. 4
      aspnet-core/services/LY.MicroService.WorkflowManagement.HttpApi.Host/LY.MicroService.WorkflowManagement.HttpApi.Host.csproj
  25. 6
      aspnet-core/services/LY.MicroService.WorkflowManagement.HttpApi.Host/Program.cs
  26. 4
      aspnet-core/services/LY.MicroService.identityServer.HttpApi.Host/LY.MicroService.identityServer.HttpApi.Host.csproj
  27. 6
      aspnet-core/services/LY.MicroService.identityServer.HttpApi.Host/Program.cs
  28. 29
      aspnet-core/services/LY.MicroService.identityServer/EntityFrameworkCore/IdentityServertMigrationsDbContextFactory.cs
  29. 4
      aspnet-core/services/LY.MicroService.identityServer/LY.MicroService.IdentityServer.csproj
  30. 6
      aspnet-core/services/LY.MicroService.identityServer/Program.cs

4
aspnet-core/services/LY.MicroService.AuthServer.HttpApi.Host/LY.MicroService.AuthServer.HttpApi.Host.csproj

@ -10,10 +10,6 @@
<PackageReference Include="DotNetCore.CAP.Dashboard" Version="$(DotNetCoreCAPPackageVersion)" /> <PackageReference Include="DotNetCore.CAP.Dashboard" Version="$(DotNetCoreCAPPackageVersion)" />
<PackageReference Include="DotNetCore.CAP.MySql" Version="$(DotNetCoreCAPPackageVersion)" /> <PackageReference Include="DotNetCore.CAP.MySql" Version="$(DotNetCoreCAPPackageVersion)" />
<PackageReference Include="DotNetCore.CAP.RabbitMQ" Version="$(DotNetCoreCAPPackageVersion)" /> <PackageReference Include="DotNetCore.CAP.RabbitMQ" Version="$(DotNetCoreCAPPackageVersion)" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="$(MicrosoftPackageVersion)">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="$(MicrosoftPackageVersion)" /> <PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="$(MicrosoftPackageVersion)" />
<PackageReference Include="Microsoft.AspNetCore.DataProtection.StackExchangeRedis" Version="$(MicrosoftPackageVersion)" /> <PackageReference Include="Microsoft.AspNetCore.DataProtection.StackExchangeRedis" Version="$(MicrosoftPackageVersion)" />
<PackageReference Include="Serilog.AspNetCore" Version="$(SerilogAspNetCorePackageVersion)" /> <PackageReference Include="Serilog.AspNetCore" Version="$(SerilogAspNetCorePackageVersion)" />

6
aspnet-core/services/LY.MicroService.AuthServer.HttpApi.Host/Program.cs

@ -54,12 +54,6 @@ public class Program
} }
catch (Exception ex) catch (Exception ex)
{ {
var type = ex.GetType().Name;
if (type.Equals("StopTheHostException", StringComparison.Ordinal))
{
throw;
}
Log.Fatal(ex, "Host terminated unexpectedly!"); Log.Fatal(ex, "Host terminated unexpectedly!");
Console.WriteLine("Host terminated unexpectedly!"); Console.WriteLine("Host terminated unexpectedly!");
Console.WriteLine(ex.ToString()); Console.WriteLine(ex.ToString());

29
aspnet-core/services/LY.MicroService.AuthServer/EntityFrameworkCore/AuthServerMigrationsDbContextFactory.cs

@ -1,29 +0,0 @@
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Design;
using Microsoft.Extensions.Configuration;
using System.IO;
namespace LY.MicroService.AuthServer.EntityFrameworkCore;
public class AuthServerMigrationsDbContextFactory : IDesignTimeDbContextFactory<AuthServerMigrationsDbContext>
{
public AuthServerMigrationsDbContext CreateDbContext(string[] args)
{
var configuration = BuildConfiguration();
var connectionString = configuration.GetConnectionString("Default");
var builder = new DbContextOptionsBuilder<AuthServerMigrationsDbContext>()
.UseMySql(connectionString, ServerVersion.AutoDetect(connectionString));
return new AuthServerMigrationsDbContext(builder.Options);
}
private static IConfigurationRoot BuildConfiguration()
{
var builder = new ConfigurationBuilder()
.SetBasePath(Directory.GetCurrentDirectory())
.AddJsonFile("appsettings.Development.json", optional: false);
return builder.Build();
}
}

4
aspnet-core/services/LY.MicroService.AuthServer/LY.MicroService.AuthServer.csproj

@ -24,10 +24,6 @@
<PackageReference Include="Serilog.Sinks.File" Version="$(SerilogSinksFilePackageVersion)" /> <PackageReference Include="Serilog.Sinks.File" Version="$(SerilogSinksFilePackageVersion)" />
<PackageReference Include="Serilog.Sinks.Elasticsearch" Version="$(SerilogSinksElasticsearchPackageVersion)" /> <PackageReference Include="Serilog.Sinks.Elasticsearch" Version="$(SerilogSinksElasticsearchPackageVersion)" />
<PackageReference Include="Microsoft.AspNetCore.DataProtection.StackExchangeRedis" Version="$(MicrosoftPackageVersion)" /> <PackageReference Include="Microsoft.AspNetCore.DataProtection.StackExchangeRedis" Version="$(MicrosoftPackageVersion)" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="$(MicrosoftPackageVersion)">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Volo.Abp.AspNetCore.Serilog" Version="$(VoloAbpPackageVersion)" /> <PackageReference Include="Volo.Abp.AspNetCore.Serilog" Version="$(VoloAbpPackageVersion)" />
<PackageReference Include="Volo.Abp.Account.Application" Version="$(VoloAbpPackageVersion)" /> <PackageReference Include="Volo.Abp.Account.Application" Version="$(VoloAbpPackageVersion)" />
<PackageReference Include="Volo.Abp.Account.Web" Version="$(VoloAbpPackageVersion)" /> <PackageReference Include="Volo.Abp.Account.Web" Version="$(VoloAbpPackageVersion)" />

6
aspnet-core/services/LY.MicroService.AuthServer/Program.cs

@ -54,12 +54,6 @@ public class Program
} }
catch (Exception ex) catch (Exception ex)
{ {
var type = ex.GetType().Name;
if (type.Equals("StopTheHostException", StringComparison.Ordinal))
{
throw;
}
Log.Fatal(ex, "Host terminated unexpectedly!"); Log.Fatal(ex, "Host terminated unexpectedly!");
Console.WriteLine("Host terminated unexpectedly!"); Console.WriteLine("Host terminated unexpectedly!");
Console.WriteLine(ex.ToString()); Console.WriteLine(ex.ToString());

30
aspnet-core/services/LY.MicroService.BackendAdmin.HttpApi.Host/EntityFrameworkCore/BackendAdminMigrationsDbContextFactory.cs

@ -1,30 +0,0 @@
using System.IO;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Design;
using Microsoft.Extensions.Configuration;
namespace LY.MicroService.BackendAdmin.EntityFrameworkCore;
public class BackendAdminMigrationsDbContextFactory : IDesignTimeDbContextFactory<BackendAdminMigrationsDbContext>
{
public BackendAdminMigrationsDbContext CreateDbContext(string[] args)
{
var configuration = BuildConfiguration();
var connectionString = configuration.GetConnectionString("Default");
var builder = new DbContextOptionsBuilder<BackendAdminMigrationsDbContext>()
.UseMySql(connectionString, ServerVersion.AutoDetect(connectionString));
return new BackendAdminMigrationsDbContext(builder.Options);
}
private static IConfigurationRoot BuildConfiguration()
{
var builder = new ConfigurationBuilder()
.SetBasePath(Directory.GetCurrentDirectory())
.AddJsonFile("appsettings.Development.json", optional: false);
return builder.Build();
}
}

4
aspnet-core/services/LY.MicroService.BackendAdmin.HttpApi.Host/LY.MicroService.BackendAdmin.HttpApi.Host.csproj

@ -14,10 +14,6 @@
<PackageReference Include="DotNetCore.CAP.Dashboard" Version="$(DotNetCoreCAPPackageVersion)" /> <PackageReference Include="DotNetCore.CAP.Dashboard" Version="$(DotNetCoreCAPPackageVersion)" />
<PackageReference Include="DotNetCore.CAP.MySql" Version="$(DotNetCoreCAPPackageVersion)" /> <PackageReference Include="DotNetCore.CAP.MySql" Version="$(DotNetCoreCAPPackageVersion)" />
<PackageReference Include="DotNetCore.CAP.RabbitMQ" Version="$(DotNetCoreCAPPackageVersion)" /> <PackageReference Include="DotNetCore.CAP.RabbitMQ" Version="$(DotNetCoreCAPPackageVersion)" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="$(MicrosoftPackageVersion)">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.AspNetCore.DataProtection.StackExchangeRedis" Version="$(MicrosoftPackageVersion)" /> <PackageReference Include="Microsoft.AspNetCore.DataProtection.StackExchangeRedis" Version="$(MicrosoftPackageVersion)" />
<PackageReference Include="Serilog.AspNetCore" Version="$(SerilogAspNetCorePackageVersion)" /> <PackageReference Include="Serilog.AspNetCore" Version="$(SerilogAspNetCorePackageVersion)" />
<PackageReference Include="Serilog.Enrichers.Environment" Version="$(SerilogEnrichersEnvironmentPackageVersion)" /> <PackageReference Include="Serilog.Enrichers.Environment" Version="$(SerilogEnrichersEnvironmentPackageVersion)" />

6
aspnet-core/services/LY.MicroService.BackendAdmin.HttpApi.Host/Program.cs

@ -55,12 +55,6 @@ public class Program
} }
catch (Exception ex) catch (Exception ex)
{ {
var type = ex.GetType().Name;
if (type.Equals("StopTheHostException", StringComparison.Ordinal))
{
throw;
}
Log.Fatal(ex, "Host terminated unexpectedly!"); Log.Fatal(ex, "Host terminated unexpectedly!");
Console.WriteLine("Host terminated unexpectedly!"); Console.WriteLine("Host terminated unexpectedly!");
Console.WriteLine(ex.ToString()); Console.WriteLine(ex.ToString());

30
aspnet-core/services/LY.MicroService.LocalizationManagement.HttpApi.Host/EntityFrameworkCore/LocalizationManagementMigrationsDbContextFactory.cs

@ -1,30 +0,0 @@
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Design;
using Microsoft.Extensions.Configuration;
using System.IO;
namespace LY.MicroService.LocalizationManagement.EntityFrameworkCore
{
public class LocalizationManagementMigrationsDbContextFactory : IDesignTimeDbContextFactory<LocalizationManagementMigrationsDbContext>
{
public LocalizationManagementMigrationsDbContext CreateDbContext(string[] args)
{
var configuration = BuildConfiguration();
var connectionString = configuration.GetConnectionString("Default");
var builder = new DbContextOptionsBuilder<LocalizationManagementMigrationsDbContext>()
.UseMySql(connectionString, ServerVersion.AutoDetect(connectionString));
return new LocalizationManagementMigrationsDbContext(builder.Options);
}
private static IConfigurationRoot BuildConfiguration()
{
var builder = new ConfigurationBuilder()
.SetBasePath(Directory.GetCurrentDirectory())
.AddJsonFile("appsettings.Development.json", optional: false);
return builder.Build();
}
}
}

4
aspnet-core/services/LY.MicroService.LocalizationManagement.HttpApi.Host/LY.MicroService.LocalizationManagement.HttpApi.Host.csproj

@ -10,10 +10,6 @@
<PackageReference Include="DotNetCore.CAP.Dashboard" Version="$(DotNetCoreCAPPackageVersion)" /> <PackageReference Include="DotNetCore.CAP.Dashboard" Version="$(DotNetCoreCAPPackageVersion)" />
<PackageReference Include="DotNetCore.CAP.MySql" Version="$(DotNetCoreCAPPackageVersion)" /> <PackageReference Include="DotNetCore.CAP.MySql" Version="$(DotNetCoreCAPPackageVersion)" />
<PackageReference Include="DotNetCore.CAP.RabbitMQ" Version="$(DotNetCoreCAPPackageVersion)" /> <PackageReference Include="DotNetCore.CAP.RabbitMQ" Version="$(DotNetCoreCAPPackageVersion)" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="$(MicrosoftPackageVersion)">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.AspNetCore.DataProtection.StackExchangeRedis" Version="$(MicrosoftPackageVersion)" /> <PackageReference Include="Microsoft.AspNetCore.DataProtection.StackExchangeRedis" Version="$(MicrosoftPackageVersion)" />
<PackageReference Include="Serilog.AspNetCore" Version="$(SerilogAspNetCorePackageVersion)" /> <PackageReference Include="Serilog.AspNetCore" Version="$(SerilogAspNetCorePackageVersion)" />
<PackageReference Include="Serilog.Enrichers.Environment" Version="$(SerilogEnrichersEnvironmentPackageVersion)" /> <PackageReference Include="Serilog.Enrichers.Environment" Version="$(SerilogEnrichersEnvironmentPackageVersion)" />

6
aspnet-core/services/LY.MicroService.LocalizationManagement.HttpApi.Host/Program.cs

@ -54,12 +54,6 @@ public class Program
} }
catch (Exception ex) catch (Exception ex)
{ {
var type = ex.GetType().Name;
if (type.Equals("StopTheHostException", StringComparison.Ordinal))
{
throw;
}
Log.Fatal(ex, "Host terminated unexpectedly!"); Log.Fatal(ex, "Host terminated unexpectedly!");
Console.WriteLine("Host terminated unexpectedly!"); Console.WriteLine("Host terminated unexpectedly!");
Console.WriteLine(ex.ToString()); Console.WriteLine(ex.ToString());

29
aspnet-core/services/LY.MicroService.PlatformManagement.HttpApi.Host/EntityFrameworkCore/PlatformManagementMigrationsDbContextFactory.cs

@ -1,29 +0,0 @@
using System.IO;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Design;
using Microsoft.Extensions.Configuration;
namespace LY.MicroService.PlatformManagement.EntityFrameworkCore;
public class PlatformManagementMigrationsDbContextFactory : IDesignTimeDbContextFactory<PlatformManagementMigrationsDbContext>
{
public PlatformManagementMigrationsDbContext CreateDbContext(string[] args)
{
var configuration = BuildConfiguration();
var connectionString = configuration.GetConnectionString("Default");
var builder = new DbContextOptionsBuilder<PlatformManagementMigrationsDbContext>()
.UseMySql(connectionString, ServerVersion.AutoDetect(connectionString));
return new PlatformManagementMigrationsDbContext(builder.Options);
}
private static IConfigurationRoot BuildConfiguration()
{
var builder = new ConfigurationBuilder()
.SetBasePath(Directory.GetCurrentDirectory())
.AddJsonFile("appsettings.Development.json", optional: false);
return builder.Build();
}
}

4
aspnet-core/services/LY.MicroService.PlatformManagement.HttpApi.Host/LY.MicroService.PlatformManagement.HttpApi.Host.csproj

@ -10,10 +10,6 @@
<PackageReference Include="DotNetCore.CAP.Dashboard" Version="$(DotNetCoreCAPPackageVersion)" /> <PackageReference Include="DotNetCore.CAP.Dashboard" Version="$(DotNetCoreCAPPackageVersion)" />
<PackageReference Include="DotNetCore.CAP.MySql" Version="$(DotNetCoreCAPPackageVersion)" /> <PackageReference Include="DotNetCore.CAP.MySql" Version="$(DotNetCoreCAPPackageVersion)" />
<PackageReference Include="DotNetCore.CAP.RabbitMQ" Version="$(DotNetCoreCAPPackageVersion)" /> <PackageReference Include="DotNetCore.CAP.RabbitMQ" Version="$(DotNetCoreCAPPackageVersion)" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="$(MicrosoftPackageVersion)">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.AspNetCore.DataProtection.StackExchangeRedis" Version="$(MicrosoftPackageVersion)" /> <PackageReference Include="Microsoft.AspNetCore.DataProtection.StackExchangeRedis" Version="$(MicrosoftPackageVersion)" />
<PackageReference Include="Serilog.AspNetCore" Version="$(SerilogAspNetCorePackageVersion)" /> <PackageReference Include="Serilog.AspNetCore" Version="$(SerilogAspNetCorePackageVersion)" />
<PackageReference Include="Serilog.Enrichers.Environment" Version="$(SerilogEnrichersEnvironmentPackageVersion)" /> <PackageReference Include="Serilog.Enrichers.Environment" Version="$(SerilogEnrichersEnvironmentPackageVersion)" />

6
aspnet-core/services/LY.MicroService.PlatformManagement.HttpApi.Host/Program.cs

@ -54,12 +54,6 @@ public class Program
} }
catch (Exception ex) catch (Exception ex)
{ {
var type = ex.GetType().Name;
if (type.Equals("StopTheHostException", StringComparison.Ordinal))
{
throw;
}
Log.Fatal(ex, "Host terminated unexpectedly!"); Log.Fatal(ex, "Host terminated unexpectedly!");
Console.WriteLine("Host terminated unexpectedly!"); Console.WriteLine("Host terminated unexpectedly!");
Console.WriteLine(ex.ToString()); Console.WriteLine(ex.ToString());

30
aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/EntityFrameworkCore/RealtimeMessageMigrationsDbContextFactory.cs

@ -1,30 +0,0 @@
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Design;
using Microsoft.Extensions.Configuration;
using System.IO;
namespace LY.MicroService.RealtimeMessage.EntityFrameworkCore
{
public class RealtimeMessageMigrationsDbContextFactory : IDesignTimeDbContextFactory<RealtimeMessageMigrationsDbContext>
{
public RealtimeMessageMigrationsDbContext CreateDbContext(string[] args)
{
var configuration = BuildConfiguration();
var connectionString = configuration.GetConnectionString("Default");
var builder = new DbContextOptionsBuilder<RealtimeMessageMigrationsDbContext>()
.UseMySql(connectionString, ServerVersion.AutoDetect(connectionString));
return new RealtimeMessageMigrationsDbContext(builder.Options);
}
private static IConfigurationRoot BuildConfiguration()
{
var builder = new ConfigurationBuilder()
.SetBasePath(Directory.GetCurrentDirectory())
.AddJsonFile("appsettings.Development.json", optional: false);
return builder.Build();
}
}
}

4
aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/LY.MicroService.RealtimeMessage.HttpApi.Host.csproj

@ -14,10 +14,6 @@
<PackageReference Include="DotNetCore.CAP.Dashboard" Version="$(DotNetCoreCAPPackageVersion)" /> <PackageReference Include="DotNetCore.CAP.Dashboard" Version="$(DotNetCoreCAPPackageVersion)" />
<PackageReference Include="DotNetCore.CAP.MySql" Version="$(DotNetCoreCAPPackageVersion)" /> <PackageReference Include="DotNetCore.CAP.MySql" Version="$(DotNetCoreCAPPackageVersion)" />
<PackageReference Include="DotNetCore.CAP.RabbitMQ" Version="$(DotNetCoreCAPPackageVersion)" /> <PackageReference Include="DotNetCore.CAP.RabbitMQ" Version="$(DotNetCoreCAPPackageVersion)" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="$(MicrosoftPackageVersion)">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.AspNetCore.DataProtection.StackExchangeRedis" Version="$(MicrosoftPackageVersion)" /> <PackageReference Include="Microsoft.AspNetCore.DataProtection.StackExchangeRedis" Version="$(MicrosoftPackageVersion)" />
<PackageReference Include="Microsoft.AspNetCore.SignalR.StackExchangeRedis" Version="$(MicrosoftPackageVersion)" /> <PackageReference Include="Microsoft.AspNetCore.SignalR.StackExchangeRedis" Version="$(MicrosoftPackageVersion)" />
<PackageReference Include="Quartz.Serialization.Json" Version="$(QuartzNETPackageVersion)" /> <PackageReference Include="Quartz.Serialization.Json" Version="$(QuartzNETPackageVersion)" />

6
aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/Program.cs

@ -54,12 +54,6 @@ public class Program
} }
catch (Exception ex) catch (Exception ex)
{ {
var type = ex.GetType().Name;
if (type.Equals("StopTheHostException", StringComparison.Ordinal))
{
throw;
}
Log.Fatal(ex, "Host terminated unexpectedly!"); Log.Fatal(ex, "Host terminated unexpectedly!");
Console.WriteLine("Host terminated unexpectedly!"); Console.WriteLine("Host terminated unexpectedly!");
Console.WriteLine(ex.ToString()); Console.WriteLine(ex.ToString());

30
aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/EntityFrameworkCore/TaskManagementMigrationsDbContextFactory.cs

@ -1,30 +0,0 @@
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Design;
using Microsoft.Extensions.Configuration;
using System.IO;
namespace LY.MicroService.TaskManagement.EntityFrameworkCore;
public class TaskManagementMigrationsDbContextFactory : IDesignTimeDbContextFactory<TaskManagementMigrationsDbContext>
{
public TaskManagementMigrationsDbContext CreateDbContext(string[] args)
{
var configuration = BuildConfiguration();
var connectionString = configuration.GetConnectionString("TaskManagement");
var builder = new DbContextOptionsBuilder<TaskManagementMigrationsDbContext>()
.UseMySql(connectionString, ServerVersion.AutoDetect(connectionString));
return new TaskManagementMigrationsDbContext(builder.Options);
}
private static IConfigurationRoot BuildConfiguration()
{
var builder = new ConfigurationBuilder()
.SetBasePath(Directory.GetCurrentDirectory())
.AddJsonFile("appsettings.json", optional: false)
.AddJsonFile("appsettings.Development.json", optional: true);
return builder.Build();
}
}

4
aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/LY.MicroService.TaskManagement.HttpApi.Host.csproj

@ -22,10 +22,6 @@
<PackageReference Include="DotNetCore.CAP.Dashboard" Version="$(DotNetCoreCAPPackageVersion)" /> <PackageReference Include="DotNetCore.CAP.Dashboard" Version="$(DotNetCoreCAPPackageVersion)" />
<PackageReference Include="DotNetCore.CAP.MySql" Version="$(DotNetCoreCAPPackageVersion)" /> <PackageReference Include="DotNetCore.CAP.MySql" Version="$(DotNetCoreCAPPackageVersion)" />
<PackageReference Include="DotNetCore.CAP.RabbitMQ" Version="$(DotNetCoreCAPPackageVersion)" /> <PackageReference Include="DotNetCore.CAP.RabbitMQ" Version="$(DotNetCoreCAPPackageVersion)" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="$(MicrosoftPackageVersion)">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.AspNetCore.DataProtection.StackExchangeRedis" Version="$(MicrosoftPackageVersion)" /> <PackageReference Include="Microsoft.AspNetCore.DataProtection.StackExchangeRedis" Version="$(MicrosoftPackageVersion)" />
<PackageReference Include="DistributedLock.Redis" Version="$(DistributedLockRedisPackageVersion)" /> <PackageReference Include="DistributedLock.Redis" Version="$(DistributedLockRedisPackageVersion)" />
<PackageReference Include="Quartz.Serialization.Json" Version="$(QuartzNETPackageVersion)" /> <PackageReference Include="Quartz.Serialization.Json" Version="$(QuartzNETPackageVersion)" />

6
aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/Program.cs

@ -54,12 +54,6 @@ public class Program
} }
catch (Exception ex) catch (Exception ex)
{ {
var type = ex.GetType().Name;
if (type.Equals("StopTheHostException", StringComparison.Ordinal))
{
throw;
}
Log.Fatal(ex, "Host terminated unexpectedly!"); Log.Fatal(ex, "Host terminated unexpectedly!");
Console.WriteLine("Host terminated unexpectedly!"); Console.WriteLine("Host terminated unexpectedly!");
Console.WriteLine(ex.ToString()); Console.WriteLine(ex.ToString());

32
aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/EntityFrameworkCore/WebhooksManagementMigrationsDbContextFactory.cs

@ -1,32 +0,0 @@
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Design;
using Microsoft.Extensions.Configuration;
using System.IO;
namespace LY.MicroService.WebhooksManagement.EntityFrameworkCore;
public class WebhooksManagementMigrationsDbContextFactory : IDesignTimeDbContextFactory<WebhooksManagementMigrationsDbContext>
{
public WebhooksManagementMigrationsDbContext CreateDbContext(string[] args)
{
var configuration = BuildConfiguration();
var connectionString = configuration.GetConnectionString("WebhooksManagement");
DbContextOptionsBuilder<WebhooksManagementMigrationsDbContext> builder = null;
builder = new DbContextOptionsBuilder<WebhooksManagementMigrationsDbContext>()
.UseMySql(connectionString, ServerVersion.AutoDetect(connectionString));
return new WebhooksManagementMigrationsDbContext(builder.Options);
}
private static IConfigurationRoot BuildConfiguration()
{
var builder = new ConfigurationBuilder()
.SetBasePath(Directory.GetCurrentDirectory())
.AddJsonFile("appsettings.json", optional: false)
.AddJsonFile("appsettings.Development.json", optional: true);
return builder.Build();
}
}

4
aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/LY.MicroService.WebhooksManagement.HttpApi.Host.csproj

@ -11,10 +11,6 @@
<PackageReference Include="DotNetCore.CAP.MySql" Version="$(DotNetCoreCAPPackageVersion)" /> <PackageReference Include="DotNetCore.CAP.MySql" Version="$(DotNetCoreCAPPackageVersion)" />
<PackageReference Include="DotNetCore.CAP.RabbitMQ" Version="$(DotNetCoreCAPPackageVersion)" /> <PackageReference Include="DotNetCore.CAP.RabbitMQ" Version="$(DotNetCoreCAPPackageVersion)" />
<PackageReference Include="DotNetCore.CAP.OpenTelemetry" Version="$(DotNetCoreCAPPackageVersion)" /> <PackageReference Include="DotNetCore.CAP.OpenTelemetry" Version="$(DotNetCoreCAPPackageVersion)" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="$(MicrosoftPackageVersion)">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.AspNetCore.DataProtection.StackExchangeRedis" Version="$(MicrosoftPackageVersion)" /> <PackageReference Include="Microsoft.AspNetCore.DataProtection.StackExchangeRedis" Version="$(MicrosoftPackageVersion)" />
<PackageReference Include="DistributedLock.Redis" Version="$(DistributedLockRedisPackageVersion)" /> <PackageReference Include="DistributedLock.Redis" Version="$(DistributedLockRedisPackageVersion)" />
<PackageReference Include="OpenTelemetry.Extensions.Hosting" Version="$(OpenTelemetryExtensionsHostingPackageVersion)" /> <PackageReference Include="OpenTelemetry.Extensions.Hosting" Version="$(OpenTelemetryExtensionsHostingPackageVersion)" />

6
aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/Program.cs

@ -54,12 +54,6 @@ public class Program
} }
catch (Exception ex) catch (Exception ex)
{ {
var type = ex.GetType().Name;
if (type.Equals("StopTheHostException", StringComparison.Ordinal))
{
throw;
}
Log.Fatal(ex, "Host terminated unexpectedly!"); Log.Fatal(ex, "Host terminated unexpectedly!");
Console.WriteLine("Host terminated unexpectedly!"); Console.WriteLine("Host terminated unexpectedly!");
Console.WriteLine(ex.ToString()); Console.WriteLine(ex.ToString());

4
aspnet-core/services/LY.MicroService.WorkflowManagement.HttpApi.Host/LY.MicroService.WorkflowManagement.HttpApi.Host.csproj

@ -18,10 +18,6 @@
<PackageReference Include="Elsa.Rebus.RabbitMq" Version="$(ElsaPackageVersion)" /> <PackageReference Include="Elsa.Rebus.RabbitMq" Version="$(ElsaPackageVersion)" />
<PackageReference Include="Elsa.Designer.Components.Web" Version="$(ElsaPackageVersion)" /> <PackageReference Include="Elsa.Designer.Components.Web" Version="$(ElsaPackageVersion)" />
<PackageReference Include="Elsa.Webhooks.Api" Version="$(ElsaPackageVersion)" /> <PackageReference Include="Elsa.Webhooks.Api" Version="$(ElsaPackageVersion)" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="$(MicrosoftPackageVersion)">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.AspNetCore.DataProtection.StackExchangeRedis" Version="$(MicrosoftPackageVersion)" /> <PackageReference Include="Microsoft.AspNetCore.DataProtection.StackExchangeRedis" Version="$(MicrosoftPackageVersion)" />
<PackageReference Include="DistributedLock.Redis" Version="$(DistributedLockRedisPackageVersion)" /> <PackageReference Include="DistributedLock.Redis" Version="$(DistributedLockRedisPackageVersion)" />
<PackageReference Include="Quartz.Serialization.Json" Version="$(QuartzNETPackageVersion)" /> <PackageReference Include="Quartz.Serialization.Json" Version="$(QuartzNETPackageVersion)" />

6
aspnet-core/services/LY.MicroService.WorkflowManagement.HttpApi.Host/Program.cs

@ -54,12 +54,6 @@ public class Program
} }
catch (Exception ex) catch (Exception ex)
{ {
var type = ex.GetType().Name;
if (type.Equals("StopTheHostException", StringComparison.Ordinal))
{
throw;
}
Log.Fatal(ex, "Host terminated unexpectedly!"); Log.Fatal(ex, "Host terminated unexpectedly!");
Console.WriteLine("Host terminated unexpectedly!"); Console.WriteLine("Host terminated unexpectedly!");
Console.WriteLine(ex.ToString()); Console.WriteLine(ex.ToString());

4
aspnet-core/services/LY.MicroService.identityServer.HttpApi.Host/LY.MicroService.identityServer.HttpApi.Host.csproj

@ -18,10 +18,6 @@
<PackageReference Include="DotNetCore.CAP.Dashboard" Version="$(DotNetCoreCAPPackageVersion)" /> <PackageReference Include="DotNetCore.CAP.Dashboard" Version="$(DotNetCoreCAPPackageVersion)" />
<PackageReference Include="DotNetCore.CAP.MySql" Version="$(DotNetCoreCAPPackageVersion)" /> <PackageReference Include="DotNetCore.CAP.MySql" Version="$(DotNetCoreCAPPackageVersion)" />
<PackageReference Include="DotNetCore.CAP.RabbitMQ" Version="$(DotNetCoreCAPPackageVersion)" /> <PackageReference Include="DotNetCore.CAP.RabbitMQ" Version="$(DotNetCoreCAPPackageVersion)" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="$(MicrosoftPackageVersion)">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.AspNetCore.DataProtection.StackExchangeRedis" Version="$(MicrosoftPackageVersion)" /> <PackageReference Include="Microsoft.AspNetCore.DataProtection.StackExchangeRedis" Version="$(MicrosoftPackageVersion)" />
<PackageReference Include="Serilog.AspNetCore" Version="$(SerilogAspNetCorePackageVersion)" /> <PackageReference Include="Serilog.AspNetCore" Version="$(SerilogAspNetCorePackageVersion)" />
<PackageReference Include="Serilog.Enrichers.Environment" Version="$(SerilogEnrichersEnvironmentPackageVersion)" /> <PackageReference Include="Serilog.Enrichers.Environment" Version="$(SerilogEnrichersEnvironmentPackageVersion)" />

6
aspnet-core/services/LY.MicroService.identityServer.HttpApi.Host/Program.cs

@ -54,12 +54,6 @@ public class Program
} }
catch (Exception ex) catch (Exception ex)
{ {
var type = ex.GetType().Name;
if (type.Equals("StopTheHostException", StringComparison.Ordinal))
{
throw;
}
Log.Fatal(ex, "Host terminated unexpectedly!"); Log.Fatal(ex, "Host terminated unexpectedly!");
Console.WriteLine("Host terminated unexpectedly!"); Console.WriteLine("Host terminated unexpectedly!");
Console.WriteLine(ex.ToString()); Console.WriteLine(ex.ToString());

29
aspnet-core/services/LY.MicroService.identityServer/EntityFrameworkCore/IdentityServertMigrationsDbContextFactory.cs

@ -1,29 +0,0 @@
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Design;
using Microsoft.Extensions.Configuration;
using System.IO;
namespace LY.MicroService.IdentityServer.EntityFrameworkCore;
public class IdentityServertMigrationsDbContextFactory : IDesignTimeDbContextFactory<IdentityServertMigrationsDbContext>
{
public IdentityServertMigrationsDbContext CreateDbContext(string[] args)
{
var configuration = BuildConfiguration();
var connectionString = configuration.GetConnectionString("Default");
var builder = new DbContextOptionsBuilder<IdentityServertMigrationsDbContext>()
.UseMySql(connectionString, ServerVersion.AutoDetect(connectionString));
return new IdentityServertMigrationsDbContext(builder.Options);
}
private static IConfigurationRoot BuildConfiguration()
{
var builder = new ConfigurationBuilder()
.SetBasePath(Directory.GetCurrentDirectory())
.AddJsonFile("appsettings.Development.json", optional: false);
return builder.Build();
}
}

4
aspnet-core/services/LY.MicroService.identityServer/LY.MicroService.IdentityServer.csproj

@ -24,10 +24,6 @@
<PackageReference Include="Serilog.Sinks.File" Version="$(SerilogSinksFilePackageVersion)" /> <PackageReference Include="Serilog.Sinks.File" Version="$(SerilogSinksFilePackageVersion)" />
<PackageReference Include="Serilog.Sinks.Elasticsearch" Version="$(SerilogSinksElasticsearchPackageVersion)" /> <PackageReference Include="Serilog.Sinks.Elasticsearch" Version="$(SerilogSinksElasticsearchPackageVersion)" />
<PackageReference Include="Microsoft.AspNetCore.DataProtection.StackExchangeRedis" Version="$(MicrosoftPackageVersion)" /> <PackageReference Include="Microsoft.AspNetCore.DataProtection.StackExchangeRedis" Version="$(MicrosoftPackageVersion)" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="$(MicrosoftPackageVersion)">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Volo.Abp.AspNetCore.Serilog" Version="$(VoloAbpPackageVersion)" /> <PackageReference Include="Volo.Abp.AspNetCore.Serilog" Version="$(VoloAbpPackageVersion)" />
<PackageReference Include="Volo.Abp.Account.Application" Version="$(VoloAbpPackageVersion)" /> <PackageReference Include="Volo.Abp.Account.Application" Version="$(VoloAbpPackageVersion)" />
<PackageReference Include="Volo.Abp.Account.Web.IdentityServer" Version="$(VoloAbpPackageVersion)" /> <PackageReference Include="Volo.Abp.Account.Web.IdentityServer" Version="$(VoloAbpPackageVersion)" />

6
aspnet-core/services/LY.MicroService.identityServer/Program.cs

@ -54,12 +54,6 @@ public class Program
} }
catch (Exception ex) catch (Exception ex)
{ {
var type = ex.GetType().Name;
if (type.Equals("StopTheHostException", StringComparison.Ordinal))
{
throw;
}
Log.Fatal(ex, "Host terminated unexpectedly!"); Log.Fatal(ex, "Host terminated unexpectedly!");
Console.WriteLine("Host terminated unexpectedly!"); Console.WriteLine("Host terminated unexpectedly!");
Console.WriteLine(ex.ToString()); Console.WriteLine(ex.ToString());

Loading…
Cancel
Save