3 ms·
surely this headline could be re-written as ".NET 7 introduces compilation"?
by RachelF 4y ago
surely this headline could be re-written as ".NET 7 introduces compilation"?
- meijer 4y agoThere has always been compilation to byte code in .NET.
- pjmlp 4y agoAnd to native with dynamic linking via NGEN at installation time.
- smcl 4y agoNot really - it already compiles C#, F# and VB.NET to .NET bytecode, which can be JIT compiled by the runtime to some optimized native code as the program runs. It's just that the native code can now be produced by the .NET SDK during the initial build ("ahead of time").
- RachelF 4y agoSo can it compile to native machine code as an executable file, link in all the needed libraries and just run as-is now? Or does it need a huge amount of supporting .NET libraries included also installed on the target?
- smcl 4y agoCheck the docs out: https://github.com/dotnet/runtime/blob/main/src/coreclr/nativeaot/docs/compiling.md https://github.com/dotnet/runtime/blob/main/src/coreclr/nati... Seems to be the case that you just need to install the Microsoft.DotNet.ILCompiler package, and then `dotnet publish...` with the desired target.
- pjmlp 4y agoCough, NGEN, MDIL, .NET Native and Xamarin.
- pjmlp 4y agoEven better, re-introduces AOT, given the history with other attempts.
- pjc50 4y agoIt was always compiled - to MSIL. "AOT" is the more useful term here.
- chrisseaton 4y ago.NET has included compilation to machine code via JIT since the start I think.