Project

Profile

Help

Feature #2871

closed

.NET Core support

Added by Yvonne Arnoldus over 7 years ago. Updated about 2 years ago.

Status:
Resolved
Priority:
Low
Assignee:
-
Category:
-
Sprint/Milestone:
-
Start date:
2016-08-09
Due date:
% Done:

0%

Estimated time:
Legacy ID:
Applies to branch:
9.7
Fix Committed on Branch:
Fixed in Maintenance Release:
Platforms:

Description

Hi,

We are working on an application in .NET Core and would like to use Saxon. If we target the .net framework 4.5.1 in our project we can use Saxon. But as off .NET Core 1.0 we have to copy the 'saxon9he-api.dll' dll by hand to the build/publish directory by hand.

After some googling we found the same issue we have on github in the Microsoft CLI repository. (https://github.com/dotnet/cli/issues/3929). A solution is given in this issue, but this is something that should be done in the nuget packaging of the Saxon packages.

Could you use this solution to create a package for Saxon so we don't need to copy the 'saxon9he-api.dll' to make our project work.

Actions #1

Updated by Michael Kay over 7 years ago

We need to establish whether IKVMC supports .NET Core and if not, whether there are any plans for it to do so.

Actions #2

Updated by Yvonne Arnoldus over 7 years ago

Michael,

Are you actively investigating if IKVMC supports .NET Core and if not, is the investigation on the road map?

Actions #3

Updated by Michael Kay over 7 years ago

  • Status changed from New to Won't fix

I'm afraid the bad news is that Jeroen Frijters, the lead developer of IKVMC, tells us that .NET Core is not currently supported as a target platform by IKVMC, and that supporting it is a lot of work and won't happen any time soon. Saxon on .NET is totally dependent on IKVMC, and is therefore not supported on this platform.

Actions #4

Updated by Max Toro about 4 years ago

FYI, Microsoft announced .NET 5 a while ago, promising:

  • Multiple runtime support (.NET Core, Mono)
  • Java interoperability, based on Mono's fork of IKVM
Actions #5

Updated by Michael Kay about 4 years ago

  • Description updated (diff)

Thank you, we are aware of this announcement and we are keenly awaiting more detail on exactly what Microsoft plan to deliver under the heading of "Java interoperability". As far as I'm aware, there has been speculation that this will be based on IKVM, but I haven't seen any statement from Microsoft. In fact, I haven't seen anything from MS since the May 2019 announcement. If you're aware of any technical detail that we've missed, please share!

Meanwhile we have started assessing the feasibility of other possible ways forward, including source code conversion.

Actions #6

Updated by Martin Honnen about 4 years ago

It seems Microsoft has provided a preview of .NET 5 in March 2020 but unfortunately the plans to support Java compatibility seem to have been axed: https://devblogs.microsoft.com/dotnet/announcing-net-5-0-preview-1/#comment-4932:

... when we will start to see the Java interoperability features for .NET 5? ... We had to scope that out of the .NET 5.0 release in order to build everything else

Actions #7

Updated by Michael Kay about 4 years ago

Thanks, yes, I saw that too. I have raised an enquiry with Microsoft, so far without response.

Actions #8

Updated by Vladimir Nesterovsky about 4 years ago

There is an alternative route to reach the target auditory. This way Language Services API now is used to integrate to plug languages into IDEs, or how Google Chrome splits rendering engine from script engine and from browsing context.

So, basic idea is to create surface API that will start separate process where Saxon runs, and where real work is done. That process may die when idle.

Communication can be done in a number of ways: sockets, pipes, shared memory, memory mapped files, REST.

As an ultimate solution it's possible to create a server (service) that always runs and is ready to accept requests. This close to database and web servers.

The advantage of such concept could be:

  • a better separation, which might be good for stability and security;
  • speed, as running service may accept repeated request faster, without JVM startup impact;
  • speed, as service may collect analytics, and cache data structures to serve better;
  • single main code base for the product, and thin communication API per host language.
Actions #9

Updated by Sylvain Pointeau over 3 years ago

things are encouraging, see https://github.com/ikvm-revived/ikvm/issues/20 it seems that ikvm is being running on .net standard 2.0 / 2.1

Actions #10

Updated by Martin Honnen about 3 years ago

If I understand https://devblogs.microsoft.com/dotnet/announcing-net-6-preview-1/#comment-8433 correctly than .NET 6 will not provide any Java interop either, although already planned for .NET 5 but later cut.

Actions #11

Updated by Michael Kay about 3 years ago

Thanks. We're currently working on an approach for future .NET versions that isn't dependent on anything coming out of Microsoft, or on developments to IKVM, nor on run-time JVM interop solutions: specifically, we're working on source-to-source Java to C# conversion. Will report on progress when we're a bit further down the road, but we've convinced ourselves that it's feasible.

Actions #12

Updated by Sylvain Pointeau about 3 years ago

That's really great to hear because we are transitioning to .net core and at the same time we will use xsl-fo, so we need saxon. Are you developing the source to source compiler in a private repo or open-source ?

Actions #13

Updated by Michael Kay about 3 years ago

The transpiler code is being developed on the assumption that it's for our own use only -- I'm following the maxim from Fred Brooks' mythical man month that writing a program that does exactly what you need and is intended only for your own use is one tenth the effort of writing code that other people can use for different tasks.

Actions #14

Updated by Sylvain Pointeau about 3 years ago

I hope you made great progress, I desesperately need saxon for .net core. Do you have any date or timeline ?

Actions #15

Updated by Sylvain Pointeau about 3 years ago

Sylvain Pointeau wrote:

I hope you made great progress, I desesperately need saxon for .net core. Do you have any date or timeline?

Actions #16

Updated by Michael Kay about 3 years ago

No, sorry, we don't do that kind of planning because there are still far too many uncertainties to make any predictions realistic. Let's say some time in 2021, hopefully.

Actions #17

Updated by Colin Mackenzie about 2 years ago

Does the release of Saxon 11.1 help resolve this?

Actions #18

Updated by Michael Kay about 2 years ago

  • Status changed from Won't fix to Resolved

Indeed so: in fact SaxonCS 11.0 resolved it.

Actions #19

Updated by Colin Mackenzie about 2 years ago

Thanks Michael

.Net Core is becoming the deployment environment of choice in the organisation I am working with and so this is a great step forward, well done.

Please register to edit this issue

Also available in: Atom PDF