Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Has .Net IL changed at all since .Net 2.0?

Tags:

.net

cil

history

I've heard the claim before that .Net 3.5 made no changes to the IL that it compiles to. Upon thinking through all of the compiler features that I know were introduced, it does, in fact, seem that they could all be implemented in the same old IL, but I can't find an official source to corroborate this claim. Is it true?

like image 912
sblom Avatar asked Jun 07 '09 07:06

sblom


People also ask

Is .NET 5.0 the same as .NET Core?

ASP.NET Core 5.0 is based on . NET 5 but retains the name "Core" to avoid confusing it with ASP.NET MVC 5. Likewise, Entity Framework Core 5.0 retains the name "Core" to avoid confusing it with Entity Framework 5 and 6.

Is .NET standard 2.0 still supported?

Most general-purpose libraries should not need APIs outside of . NET Standard 2.0. . NET Standard 2.0 is supported by all modern platforms and is the recommended way to support multiple platforms with one target.

Is .NET 6.0 the same as .NET Core?

NET 6, though, is ASP.NET Core 6, a major upgrade of Microsoft's open source framework for building modern web applications. ASP.NET Core 6 is built on top of the . NET Core runtime and allows you to build and run applications on Windows, Linux, and macOS. ASP.NET Core 6 combines the features of Web API and MVC.


1 Answers

I think that there haven't been any IL changes as such, but there have been significant changes within the CLR implementation to make dynamic methods more efficient, allow for expression tree compilation etc. I seem to remember there have been changes around security of building dynamic methods, to make it feasible for lambda expressions generating expression trees to call private methods to work even in relatively low trust environments. The compiler knows that it's valid to call the private method because the point at which the source code is compiled has access to it. Proving that is tricky though :) See this note by Eric Lippert.

like image 122
Jon Skeet Avatar answered Sep 28 '22 06:09

Jon Skeet