Skip to content

Commit

Permalink
Merge pull request #12146 from abpframework/volo/issue/9283
Browse files Browse the repository at this point in the history
Cli project generation: Consider AbpAccountPublic in blazor appsettings files
  • Loading branch information
gterdem authored Mar 31, 2022
2 parents 806fc56 + 907094e commit 94ae35e
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,20 @@ public override void Execute(ProjectBuildContext context)
appsettingsFile.NormalizeLineEndings();
var lines = appsettingsFile.GetLines();

for (var i = 0; i < lines.Length; i++)
for (var i = 1; i < lines.Length; i++)
{
var line = lines[i];
var previousLine = lines[i-1];

if (line.Contains("Authority") && line.Contains("localhost"))
{
line = line.Replace("44305", "44301");
}
else if (line.Contains("BaseUrl") && line.Contains("localhost"))
else if (previousLine.Contains("AbpAccountPublic") && line.Contains("BaseUrl") && line.Contains("localhost"))
{
line = line.Replace("44305", "44301");
}
else if (previousLine.Contains("Default") && line.Contains("BaseUrl") && line.Contains("localhost"))
{
line = line.Replace("44305", "44300");
}
Expand Down

0 comments on commit 94ae35e

Please sign in to comment.