Search code examples
visual-studio-2012nuget.net-2.0saxonvisual-studio-package

Error installing Saxon 9.5 on .NET 2.0 project with package manager


I'm trying to install Saxon 9.5 HE (which is the last version being supported on .NET 2.0 as you can see on their official documentation) on Visual Studio 2012 Professional. This is what I get.

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

(I did translate this trace from italian)

I've also tried to install 9.4 and 9.3 but I get the same error. As I said, versions from 9.6 to latest require .NET 4.0, older should be suitable for 2.0.


Solution

  • You didn't link to their official documentation, but if it does indeed claim that their package with version 9.5.1.1 is compatible with .NET Framework 2.0, their documentation is wrong.

    Looking at the package on fuget.org, you can see the listed framework is .NET 3.5. In fact, even their oldest package targets .NET 3.5, so they have never had a package that works with .NET Framework 2.0.