Browse Source

Merge pull request #8355 from abpframework/auto-merge/rel-4-3/200

Merge branch dev with rel-4.3
pull/8366/head
Berkan Sasmaz 5 years ago
committed by GitHub
parent
commit
9fe8cf630c
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 18
      framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/ProjectNugetPackageAdder.cs

18
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/ProjectNugetPackageAdder.cs

@ -113,7 +113,12 @@ namespace Volo.Abp.Cli.ProjectModification
if (withSourceCode)
{
await AddSourceCode(projectFile, solutionFile, package, version);
await ConvertPackageReferenceToProjectReference(projectFile, solutionFile, package);
var projectFilesInSolution = Directory.GetFiles(Path.GetDirectoryName(solutionFile), "*.csproj", SearchOption.AllDirectories);
foreach (var projectFileInSolution in projectFilesInSolution)
{
await ConvertPackageReferenceToProjectReference(projectFileInSolution, solutionFile, package);
}
if (addSourceCodeToSolutionFile)
{
@ -145,7 +150,7 @@ namespace Volo.Abp.Cli.ProjectModification
var nodes = doc.SelectNodes(
$"/Project/ItemGroup/PackageReference[starts-with(@Include, '{package.Name}')]");
if (nodes == null)
if (nodes == null || nodes.Count < 1)
{
return;
}
@ -277,7 +282,14 @@ namespace Volo.Abp.Cli.ProjectModification
package.Target == NuGetPackageTarget.BlazorServer ||
package.Target == NuGetPackageTarget.BlazorWebAssembly))
{
await RunBundleForBlazorAsync(projectFile);
try
{
await RunBundleForBlazorAsync(projectFile);
}
catch (Exception e)
{
Logger.LogWarning("Couldn't run bundle for blazor.");
}
}
Logger.LogInformation("Successfully installed.");

Loading…
Cancel
Save