0

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.

  • I was able to install package after updating Visual Studio (and consequently, Nuget), but once I try to run application it says it can't be resolved because of framework version mismatch. From the answer below, I'm assuming Saxon has never worked on .NET 2.0 and their documentation is "lying". http://www.saxonica.com/documentation9.5/about/installationdotnet.html – Andrea de'Rose Mar 05 '19 at 14:10

1 Answers1

0

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.

zivkan
  • 12,793
  • 2
  • 34
  • 51
  • I think it's possible that this may be correct. I think we might have moved forward to a new IKVM version in some maintenance release and failed to spot that this introduced a new .NET dependency. Testing on multiple versions of .NET is something we do from time to time but it's not a routine thing we do for every maintenance release. – Michael Kay Mar 01 '19 at 18:45
  • I would add though that the information on fuget.org was generated by third parties, and the fact that a dependency is stated there should not be treated as definitive. – Michael Kay Mar 05 '19 at 12:09
  • So shall I assume that Saxon never supported .NET 2.0? I've even tried downloading 9.2 (which is the oldest version available on SourceForge) and it points to 3.5 as well. If that is the case, I'll have to look for another xml + xslt 2.0 compiler... – Andrea de'Rose Mar 05 '19 at 13:59
  • However I still don't get why none of these versions is working with 2.0. On more than one page of their docs you can read it's told explicitally. Like here: [link](https://www.saxonica.com/html/documentation9.4/changes/intro91/dotnet91.html) _Saxon on .NET is now built and tested on .NET 2.0. It should be compatible with .NET 1.1 or .NET 3.5, but this cannot be guaranteed. Saxon is not tested on Mono, though users have reported running it successfully._ – Andrea de'Rose Mar 05 '19 at 14:16
  • The reason that NuGet doesn't allow using the package is because the dlls are in the `lib/net35/` folder in the nupkg. You could try manually downloading the nupkg, extract the dlls and add a reference to the dll, to see if that works. But unless the dll is moved to `lib/net20` in the nupkg, NuGet is being told that net35 is the minimum version. But why can't you upgrade to a newer .NET? 2.0 is many years old, and every supported version of Windows comes with higher versions of .NET. Older Windows don't get security updates, so you're at risk. – zivkan Mar 05 '19 at 14:23
  • That's what I did: I've downloaded oldest packages and moved .dll to packages\Saxon\lib and then added references to project, but it still comes out they're for 3.5. I asked my colleague about upgrading the framework, but she says she doesn't know how would server interaction work and we would have to do tests. – Andrea de'Rose Mar 05 '19 at 14:40