.NET Native

This forum is meant for questions and discussions about the X# language and tools
Post Reply
User avatar
Plummet
Posts: 21
Joined: Tue Jan 19, 2016 4:18 pm

.NET Native

Post by Plummet »

Hi Robert,
Does X# support .NET Native yet?
Thanks,
Don
User avatar
robert
Posts: 4243
Joined: Fri Aug 21, 2015 10:57 am
Location: Netherlands

.NET Native

Post by robert »

Don,
.Net Native is not something the compiler does.
I know that Microsoft seems to suggest that the compiler does it, but it actually is an extra step that is running after the application is compiled. This is part of the "Publish" step inside MsBuild
This topic describes the process:
https://mattwarren.org/2018/06/07/CoreR ... e-for-AOT/
In the image you can see that the starting point for the .Net native compilation is the DLL with IL (Intermediate Language) produced by the C#, VB or F# compiler. You can add X# to this as well because our assemblies are virtually identical to C# since we are using the same underlying compiler technology.
The challenges here are:
- The Toolchain (msBuild support) to generate this. Once we have the MsBuild support for .Net core implemented, then you can do this too.
- Late bound code depends on reflection. That may be a problem with .Net native (see https://docs.microsoft.com/en-us/dotnet ... net-native)

I find this article very informative:
https://www.codeproject.com/Articles/52 ... -3-1-Proje

Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
User avatar
Plummet
Posts: 21
Joined: Tue Jan 19, 2016 4:18 pm

.NET Native

Post by Plummet »

OK Robert, thanks for your prompt reply.

It was just that, having a preference for fully compiled object code, I was reading about native compiling of .NET code recently and had seen you mention it in this doc back in 2015
https://www.xsharp.eu/itm-help/why-xsharp

.Net Native support is planned as well.

Thanks for the links, I will have a look.
Keep up the good work -
Don
Post Reply