title: References not being resolved for Saxon's Nuget package in ASP.NET Core Application
body: <p>I'm developing a .NET Web application that is relying on XSLT 2.0 and in turn <a href="https://www.nuget.org/packages/Saxon-HE/" rel="nofollow noreferrer">Saxon-HE NuGet</a>(version 9.8.0.12 - latest at the moment of writing this) from <a href="http://www.saxonica.com/welcome/welcome.xml" rel="nofollow noreferrer">Saxonica</a> is used for transformations because .NET supports only XSLT 1.0 at the moment (.NET Framework 4.7.1).</p>
  
  <p>When working with a <code>ASP.NET Core Application</code> targeting the <code>.NET Framework</code> and trying to instantiate a <code>Saxon.Api.Processor</code>, I get a runtime <code>System.IO.FileNotFoundException</code> saying: </p>
  
  <blockquote>
    <p>"Could not load file or assembly 'saxon9he' (...) The system cannot find the file specified."</p>
  </blockquote>
  
  <p>The necessary <code>.dll</code> is actually missing from <code>\bin</code> folder. I looked at <code>.nuspec</code> file for Saxon-HE nuget that's located in <code>\Users\MyUser\.nuget\packages\saxon-he\version-number</code> and it lacks references (or dependencies) to all necessary libraries, only the reference to <code>saxon9he-api.dll</code> is present.</p>
  
  <pre><code>&lt;references&gt;
      &lt;reference file="saxon9he-api.dll" /&gt;
  &lt;/references&gt;
  </code></pre>
  
  <p>When investigating the <code>\lib</code> folder of nuget I found that there are both saxon9he.dll and IKVM dll's that are required by the NuGet package. So I edited the <code>.nuspec</code> file and added missing references there.</p>
  
  <pre><code>&lt;references&gt;
    &lt;reference file="saxon9he-api.dll" /&gt;
    &lt;reference file="saxon9he.dll" /&gt;
    &lt;reference file="IKVM.Runtime.dll" /&gt;
    &lt;reference file="IKVM.OpenJDK.XML.API.dll" /&gt;
    &lt;reference file="IKVM.OpenJDK.Util.dll" /&gt;
    &lt;reference file="IKVM.OpenJDK.Text.dll" /&gt;
    &lt;reference file="IKVM.OpenJDK.Core.dll" /&gt;
    &lt;reference file="IKVM.OpenJDK.Charsets.dll" /&gt;
  &lt;/references&gt;
  </code></pre>
  
  <p>And now the Saxon's processor is instantiated without errors. The problem is that this is no good because NuGet updates will brake it and it will not work on other machines that will not have edited the <code>.nuspec</code> file (and that shouldn't be done in the first place).</p>
  
  <p>However, when doing the same thing in <code>ASP.NET Web Application (.NET Framework)</code> Saxon works as expected and dependencies are found. Difference here is that NuGet packages are kept in solution folder and I guess references are being resolved differently.</p>
  
  <p>Am I doing something wrong or is it a bad NuGet pakage?
  Is there a way to tell if NuGet package supports .NET Core Projects?
  Do you have any suggestions how to solve this?</p>