https://saxonica.plan.io/https://saxonica.plan.io/favicon.ico2022-03-27T08:51:16ZSaxonica Developer CommunitySaxon - Bug #5403: SaxonCS NuGet SaxonCS.dll is for Amd64 processor architecture and that way doesn't work with Arm64 processors like Apple M1 and .NET 6https://saxonica.plan.io/issues/5403?journal_id=201742022-03-27T08:51:16ZMartin Honnenmartin.honnen@gmx.de
<ul></ul><p><a href="https://devblogs.microsoft.com/dotnet/dotnet-5-end-of-support-update/" class="external">https://devblogs.microsoft.com/dotnet/dotnet-5-end-of-support-update/</a> says: ".NET 5.0 will reach End of Support on May 08, 2022"</p> Saxon - Bug #5403: SaxonCS NuGet SaxonCS.dll is for Amd64 processor architecture and that way doesn't work with Arm64 processors like Apple M1 and .NET 6https://saxonica.plan.io/issues/5403?journal_id=203402022-04-09T19:05:01ZMartin Honnenmartin.honnen@gmx.de
<ul></ul><p>I updated my only Mac to OS 12 some days ago and now find that .NET 6 can run SaxonCS 11.3. No more System.BadImageFormatException.</p>
<p>Not sure whether .NET 6 on MacOS 12 is somehow smarter than .NET 6 on MacOS 11 to consume a NuGet package or whether SaxonCS has changed.</p>
<p>Based on Norm's comments elsewhere the SaxonCS 11.3 NuGet package was produced with the same tool chain as 11.2 so it might be that the MacOS version makes the difference.</p> Saxon - Bug #5403: SaxonCS NuGet SaxonCS.dll is for Amd64 processor architecture and that way doesn't work with Arm64 processors like Apple M1 and .NET 6https://saxonica.plan.io/issues/5403?journal_id=203412022-04-10T08:03:09ZNorm Tovey-Walsh
<ul></ul><p>I failed to update this bug, sorry.</p>
<p>While trying to construct the final release artifacts for 11.3, I was frustrated to discover that I was still getting 64-bit-only DLLs when you and I had (privately) exchanged a few examples where I was <em>not</em> getting those.</p>
<p>I worked out, after some trial and error, that building the release executable (which is 64 bit because that's the only option) <em>rewrites</em> the .nupkg package as a 64 bit only DLL. In other words, the <code>dotnetRelease</code> build target produces an architecture-independent DLL, the <code>dotnetPublish</code> target produces an executable <em>and</em> a 64 bit DLL.</p>
<p>My build process was to run the <code>dotnetPublish</code> target, which depends on the <code>dotnetRelease</code> target, and publish the resulting artifacts. That was the problem.</p>
<p>For 11.3, I changed things so that the <code>dotnetRelease</code> target copies it's output .nupkg package to a distributions directory before the <code>dotnetPublish</code> target scribbles all over it (Grrrrr...)</p>
<p>Unless you find that 11.2 now works for you, I think it's more likely that this is what fixed the problem. But it's all still a bit opaque, I confess.</p> Saxon - Bug #5403: SaxonCS NuGet SaxonCS.dll is for Amd64 processor architecture and that way doesn't work with Arm64 processors like Apple M1 and .NET 6https://saxonica.plan.io/issues/5403?journal_id=226462023-01-19T12:47:07ZMichael Kaymike@saxonica.com
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>Closed</i></li></ul><p>I believe this can be closed with no further action needed.</p>