Browse Source
Update bundle command warning message.
pull/19842/head
maliming
2 years ago
No known key found for this signature in database
GPG Key ID: A646B9CB645ECEA4
1 changed files with
5 additions and
4 deletions
-
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Bundling/BundlingService.cs
|
|
|
@ -345,14 +345,15 @@ public class BundlingService : IBundlingService, ITransientDependency |
|
|
|
break; |
|
|
|
} |
|
|
|
|
|
|
|
var targetFramework = document.SelectSingleNode("//TargetFramework")?.InnerText; |
|
|
|
var targetFramework = document.SelectSingleNode("//TargetFramework")?.InnerText ?? |
|
|
|
document.SelectNodes("//TargetFrameworks")[0].InnerText; |
|
|
|
var currentCliVersion = await CliVersionService.GetCurrentCliVersionAsync(); |
|
|
|
|
|
|
|
if (targetFramework.IsNullOrWhiteSpace() || |
|
|
|
!targetFramework.StartsWith($"net{currentCliVersion.Major}", StringComparison.OrdinalIgnoreCase)) |
|
|
|
targetFramework.IndexOf($"net{currentCliVersion.Major}.0", StringComparison.OrdinalIgnoreCase) < 0) |
|
|
|
{ |
|
|
|
throw new BundlingException($"Your project target framework is {targetFramework}. " + Environment.NewLine + |
|
|
|
$"ABP CLI version is {currentCliVersion}. " + Environment.NewLine + |
|
|
|
throw new BundlingException($"Your project({projectFilePath}) target framework is {targetFramework}. " + Environment.NewLine + |
|
|
|
$"But ABP CLI version is {currentCliVersion}. " + Environment.NewLine + |
|
|
|
$"Please use the ABP CLI that is compatible with your project target framework."); |
|
|
|
} |
|
|
|
} |
|
|
|
|