Jenkins error : ‘1.1.5_’ is not a valid version string. (Parameter ‘value’)
Jenkins中错误信息
D:\code\Pipeline_Service.Basedata>dotnet publish .\src\Service.BaseData\BaseDataService.Host\BaseDataService.Host.csproj -c release -o basedata
Microsoft (R) Build Engine version 16.8.0+126527ff1 for .NET
Copyright (C) Microsoft Corporation. All rights reserved.
Determining projects to restore...
C:\Program Files\dotnet\sdk\5.0.100\NuGet.targets(131,5): error : '1.1.5_' is not a valid version string. (Parameter 'value') [D:\code\Pipeline_Service.Basedata\src\Service.BaseData\BaseDataService.Host\BaseDataService.Host.csproj]
问题定位
在Jenkins流水线中使用了变量PackageVersion
,就出现这个报错,error : ‘1.1.5_’ is not a valid version string. (Parameter ‘value’),改为ServicePackageVersion
就可以了,原因未知,猜想可能是与Jenkins的内置变量冲突了。