I have been using .NET Core for some time now. And I have created a Console App. Everything works however I heard that I can compile .NET Core app assembly into a native assembly using CrossGen. Which quoting their documentation:
To help make your app start up faster, CoreCLR includes a tool called CrossGen, which can pre-compile the MSIL code into native code.
I have been trying for a long time right now and I have really no idea, how can I do this. There is really little documentation for CrossGen and even less questions here at StackOverflow.
How can I compile my .NET Core App to native code using CrossGen on a Mac? I'd appreciate if somebody could answer this question with given examples.
crossgen is a tool that comes bundled with CoreCLR in the NuGet package, or is built alongside it from source. The OSX runtime package for CoreCLR here has crossgen in tools/crossgen
path inside the nuget archive.
If you run the tool without any arguments, it should give you basic usage instructions. Generally, what you will want to do is run crossgen <path-to-your-app>
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With