From b740ca2292ab0b4dc3c77e8e92e513d5effc6084 Mon Sep 17 00:00:00 2001 From: maliming Date: Tue, 10 Mar 2020 20:40:47 +0800 Subject: [PATCH] Restore the sourceFile variable. --- .../NugetPackageToLocalReferenceConverter.cs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/NugetPackageToLocalReferenceConverter.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/NugetPackageToLocalReferenceConverter.cs index 8f566234c2..31dd41cbf1 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/NugetPackageToLocalReferenceConverter.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/NugetPackageToLocalReferenceConverter.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.IO; using System.Linq; @@ -52,6 +52,7 @@ namespace Volo.Abp.Cli.ProjectModification foreach (XmlNode oldNode in nodes) { + var tempSourceFile = sourceFile; var oldNodeIncludeValue = oldNode?.Attributes?["Include"]?.Value; var moduleName = nugetPackageList.FirstOrDefault(n => n.NugetPackage.Name == oldNodeIncludeValue)?.ModuleName; @@ -67,11 +68,11 @@ namespace Volo.Abp.Cli.ProjectModification if (oldNodeIncludeValue.EndsWith(".test", StringComparison.InvariantCultureIgnoreCase) || oldNodeIncludeValue.EndsWith(".tests", StringComparison.InvariantCultureIgnoreCase)) { - sourceFile = "test"; + tempSourceFile = "test"; } else { - sourceFile = "src"; + tempSourceFile = "src"; } } else @@ -81,7 +82,7 @@ namespace Volo.Abp.Cli.ProjectModification } var referenceProjectPath = - $"{localPathPrefix}{moduleName}\\{sourceFile}\\{oldNodeIncludeValue}\\{oldNodeIncludeValue}.csproj"; + $"{localPathPrefix}{moduleName}\\{tempSourceFile}\\{oldNodeIncludeValue}\\{oldNodeIncludeValue}.csproj"; XmlNode newNode = GetNewReferenceNode(doc, referenceProjectPath);