我最近从itext下载了试用许可文件。
我像这样加载许可文件:
LicenseKey.LoadLicenseFile("itextkey.xml");
这是我的
csproj
文件:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.1</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="itext7" Version="7.1.4" />
<PackageReference Include="itext7.licensekey" Version="3.0.4" />
<PackageReference Include="itext7.pdfhtml" Version="2.0.0" />
</ItemGroup>
</Project>
有了这个配置,一切都很好。
但是,如果我切换到
netcoreapp1.1
,代码中断,并出现以下错误:
iText.License.LicenseKeyException: Signature was corrupted.
at iText.License.Validators.LicenseKey7Validator.CheckLicenseeSignature(String signatureBuildString, String licenseeSignature)
at iText.License.Validators.LicenseKey7Validator.LoadLicense(XmlElement licenseKeyRoot)
at iText.License.LicenseKey.LoadLicenseFileInternal(Stream licenseIs)
at iText.License.LicenseKey.LoadLicenseFile(String pathToLicFile)
我怎么能让这个工作
1.1
是吗?