-
Is it possible to compile a native binary that can run on the target machine without .NET? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
@habbes Photino.Native is exactly that and it's available as a NuGet package or you can build it from source. It runs on Windows, Linux and MacOS. Photino.NET is just a wrapper around it for .NET developers to use. |
Beta Was this translation helpful? Give feedback.
-
I'd add that there is full .NET Native AOT compilation with the latest releases of the framework, so it may be possible to use the wrapper and still have full native compilation. I do not know, out of the box, which features the wrapper may use that are incompatible with that compiler flag. If you are worried about managing a .NET deployment on the machine, a second possibility is that you could compile the .NET app as a) self-contained, such that it will package the runtime alongside the app in the deployment folder, and b) trimmed, such that unnecessary code will be removed to reduce the size of the package. |
Beta Was this translation helpful? Give feedback.
I'd add that there is full .NET Native AOT compilation with the latest releases of the framework, so it may be possible to use the wrapper and still have full native compilation. I do not know, out of the box, which features the wrapper may use that are incompatible with that compiler flag.
If you are worried about managing a .NET deployment on the machine, a second possibility is that you could compile the .NET app as a) self-contained, such that it will package the runtime alongside the app in the deployment folder, and b) trimmed, such that unnecessary code will be removed to reduce the size of the package.
https://learn.microsoft.com/en-us/dotnet/core/deploying/