Browse Source

Cli: Build the project if needed when generating code with Suite

pull/13058/head
Yunus Emre Kalkan 4 years ago
parent
commit
96a521a55b
  1. 12
      framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/SuiteCommand.cs

12
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/SuiteCommand.cs

@ -116,6 +116,18 @@ public class SuiteCommand : IConsoleCommand, ITransientDependency
return; return;
} }
var IsSolutionBuiltResponse = await client.GetAsync(
$"{AbpSuiteHost}/api/abpSuite/solutions/{solutionId.ToString()}/is-built"
);
var IsSolutionBuilt = Convert.ToBoolean(await IsSolutionBuiltResponse.Content.ReadAsStringAsync());
if (!IsSolutionBuilt)
{
Logger.LogInformation("Building the solution...");
CmdHelper.RunCmd("dotnet build", Path.GetDirectoryName(solutionFile));
}
var entityContent = new StringContent( var entityContent = new StringContent(
File.ReadAllText(entityFile), File.ReadAllText(entityFile),
Encoding.UTF8, Encoding.UTF8,

Loading…
Cancel
Save