Merge pull request #17780 from abpframework/auto-merge/rel-7-4/2212

Merge branch dev with rel-7.4
pull/17788/head^2
maliming 2 years ago committed by GitHub
commit a080638644
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -120,7 +120,10 @@ public class InstallLibsService : IInstallLibsService, ITransientDependency
using (var reader = File.OpenText(file))
{
return reader.ReadToEnd().Contains("Microsoft.NET.Sdk.Web");
var fileTexts = reader.ReadToEnd();
return fileTexts.Contains("Microsoft.NET.Sdk.Web") ||
fileTexts.Contains("Microsoft.NET.Sdk.Razors") ||
fileTexts.Contains("Microsoft.NET.Sdk.BlazorWebAssemblys");
}
}
return true;

@ -32,6 +32,7 @@ public abstract class AppNoLayersTemplateBase : AppTemplateBase
steps.Add(new RemoveProjectFromSolutionStep("MyCompanyName.MyProjectName.Host.Mongo"));
steps.Add(new RemoveProjectFromSolutionStep("MyCompanyName.MyProjectName.Blazor.Server.Mongo"));
steps.Add(new RemoveProjectFromSolutionStep("MyCompanyName.MyProjectName.Blazor.WebAssembly.Server.Mongo", projectFolderPath: "/aspnet-core/MyCompanyName.MyProjectName.Blazor.WebAssembly/Server.Mongo"));
SetDbmsSymbols(context);
break;
case DatabaseProvider.MongoDb:
steps.Add(new RemoveProjectFromSolutionStep("MyCompanyName.MyProjectName.Mvc"));

@ -102,6 +102,7 @@ public abstract class AppTemplateBase : TemplateInfo
else
{
context.Symbols.Add("EFCORE");
SetDbmsSymbols(context);
}
if (context.BuildArgs.DatabaseProvider != DatabaseProvider.MongoDb)
@ -234,6 +235,36 @@ public abstract class AppTemplateBase : TemplateInfo
steps.Add(new ChangeThemeStep());
RemoveLeptonXThemePackagesFromPackageJsonFiles(steps, isProTemplate: IsPro(), uiFramework: context.BuildArgs.UiFramework);
}
protected void SetDbmsSymbols(ProjectBuildContext context)
{
switch (context.BuildArgs.DatabaseManagementSystem)
{
case DatabaseManagementSystem.NotSpecified:
context.Symbols.Add("SqlServer");
break;
case DatabaseManagementSystem.SQLServer:
context.Symbols.Add("SqlServer");
break;
case DatabaseManagementSystem.MySQL:
context.Symbols.Add("MySql");
break;
case DatabaseManagementSystem.PostgreSQL:
context.Symbols.Add("PostgreSql");
break;
case DatabaseManagementSystem.Oracle:
context.Symbols.Add("Oracle");
break;
case DatabaseManagementSystem.OracleDevart:
context.Symbols.Add("Oracle");
break;
case DatabaseManagementSystem.SQLite:
context.Symbols.Add("SqLite");
break;
default:
throw new AbpException("Unknown Dbms: " + context.BuildArgs.DatabaseManagementSystem);
}
}
private void RemoveThemeLogoFolders(ProjectBuildContext context, List<ProjectBuildPipelineStep> steps)
{

Loading…
Cancel
Save