Re:How Microsoft rewrote its C# compiler in C# and made it o...
by fultonfaknem42 on Tuesday February 11, 2020 @01:29PM
(#22301069)
Maybe Assembly unloading, in which case if you wanted to swap out new dlls in memory you'd have to tear down the process and restart it. Definitely not sexy. That being said: I think Assembly Unloading is a thing now (and AppDomains don't exist in .NET Core last I heard).
[ Parent
| on HN ]
Re:How Microsoft rewrote its C# compiler in C# and made it o...
by teh_klev on Tuesday February 11, 2020 @03:14PM
(#22302302)
In .NET standard (i.e. not .NET Core) you can load and unload assemblies without tearing down whole processes by creating AppDomains within a process. You then load your desired assemblies into these app domain(s), consume and when you need to load say a newer DLL version you just tear down the AppDomain and create a new one for the new DLL's.
It's a feature that's been around since .NET 1.1 and I used to use heavily 10+ years ago.
https://docs.microsoft.com/en-us/dotnet/api/system.appdomain...
Re:How Microsoft rewrote its C# compiler in C# and made it o...
by rafaelvasco on Tuesday February 11, 2020 @01:36PM
(#22301175)
Yeah, if I remember correctly it's indeed a thing in latest versions of .NET Core;
Re:How Microsoft rewrote its C# compiler in C# and made it o...
by fultonfaknem42 on Tuesday February 11, 2020 @01:48PM
(#22301314)
This looks like a pretty cool demonstration of what we're talking about: https://www.strathweb.com/2019/01/collectible-assemblies-in-...
See the section titled: Collecting a dynamically emitted assembly
Re:How Microsoft rewrote its C# compiler in C# and made it o...
by rafaelvasco on Tuesday February 11, 2020 @02:46PM
(#22301992)
Yeah that's exactly it. Thanks!