Browse Source

Merge pull request #12778 from abpframework/auto-merge/rel-5-3/1115

Merge branch dev with rel-5.3
pull/12780/head
liangshiwei 4 years ago
committed by GitHub
parent
commit
2e686a259a
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 14
      framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/NugetPackageToLocalReferenceConverter.cs
  2. 2
      templates/app/aspnet-core/src/MyCompanyName.MyProjectName.AuthServer/appsettings.json

14
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/NugetPackageToLocalReferenceConverter.cs

@ -5,6 +5,8 @@ using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Xml; using System.Xml;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Logging.Abstractions;
using Volo.Abp.Cli.Utils; using Volo.Abp.Cli.Utils;
using Volo.Abp.DependencyInjection; using Volo.Abp.DependencyInjection;
@ -12,6 +14,12 @@ namespace Volo.Abp.Cli.ProjectModification;
public class NugetPackageToLocalReferenceConverter : ITransientDependency public class NugetPackageToLocalReferenceConverter : ITransientDependency
{ {
public ILogger<NugetPackageToLocalReferenceConverter> Logger { get; set; }
public NugetPackageToLocalReferenceConverter(){
Logger = NullLogger<NugetPackageToLocalReferenceConverter>.Instance;
}
public async Task Convert(ModuleWithMastersInfo module, string solutionFile, string modulePrefix = "Volo.") public async Task Convert(ModuleWithMastersInfo module, string solutionFile, string modulePrefix = "Volo.")
{ {
var nugetPackageList = GetNugetPackages(module); var nugetPackageList = GetNugetPackages(module);
@ -30,6 +38,12 @@ public class NugetPackageToLocalReferenceConverter : ITransientDependency
foreach (var projectFile in projectFiles) foreach (var projectFile in projectFiles)
{ {
if (!File.Exists(projectFile))
{
Logger.LogWarning($"{projectFile} could not be found, skipping...");
return;
}
var content = File.ReadAllText(projectFile); var content = File.ReadAllText(projectFile);
using (var stream = StreamHelper.GenerateStreamFromString(content)) using (var stream = StreamHelper.GenerateStreamFromString(content))
{ {

2
templates/app/aspnet-core/src/MyCompanyName.MyProjectName.AuthServer/appsettings.json

@ -3,7 +3,7 @@
"SelfUrl": "https://localhost:44301", "SelfUrl": "https://localhost:44301",
"ClientUrl": "http://localhost:4200", "ClientUrl": "http://localhost:4200",
"CorsOrigins": "https://*.MyProjectName.com,http://localhost:4200,https://localhost:44307,https://localhost:44300", "CorsOrigins": "https://*.MyProjectName.com,http://localhost:4200,https://localhost:44307,https://localhost:44300",
"RedirectAllowedUrls": "http://localhost:4200,https://localhost:44307" "RedirectAllowedUrls": "http://localhost:4200,https://localhost:44302,https://localhost:44307,https://localhost:44309"
}, },
"ConnectionStrings": { "ConnectionStrings": {
"Default": "Server=(LocalDb)\\MSSQLLocalDB;Database=MyProjectName;Trusted_Connection=True" "Default": "Server=(LocalDb)\\MSSQLLocalDB;Database=MyProjectName;Trusted_Connection=True"

Loading…
Cancel
Save