我正在尝试在 Visual Studio 2012 Professional 上安装 Saxon 9.5 HE(这是 .NET 2.0 支持的最后一个版本,您可以在其官方文档中看到)。这就是我得到的。
PM> Install-Package Saxon-HE -Version 9.5.1.1
Installing 'Saxon-HE 9.5.1.1' complete.
Uninstalling 'Saxon-HE 9.5.1.1' complete.
Install not successful. Restoring previous status...
Install-Package : Unable to install package 'Saxon-HE 9.5.1.1'. You're trying to install
package in a project with '.NETFramework,Version=v2.0', but package does not contain
referrals to assembly suitable with framework. For further information, contact package developer.
In riga:1 car:16
+ Install-Package <<<< Saxon-HE -Version 9.5.1.1
+ CategoryInfo : NotSpecified: (:) [Install-Package], InvalidOperationException
+ FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand
(我确实从意大利语翻译了这条痕迹)
我也尝试安装 9.4 和 9.3,但我得到了同样的错误。正如我所说,从 9.6 到最新版本需要 .NET 4.0,旧版本应该适合 2.0。