itsmattkc / dotnet9x

Backport of .NET 2.0 - 3.5 to Windows 9x
2.25k stars 148 forks source link

Managed DLLs are not `ngen`'d #20

Open WamWooWam opened 5 months ago

WamWooWam commented 5 months ago

.NET includes ngen, the Native Image Generator, it's run during the install process and compiles much of the MSIL bytecode into x86 assembly code ahead of time, however this process isn't done during the dotnet9x setup, and after setup appears to fail in an odd way.

When running ngen install "mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" as the original setup would, it prints a lot of (expected) warnings to the console, compilation appears to complete? However installation to the assembly cache fails with E_INVALIDARG, this appears to happen for every assembly:

Examples on Windows 98 (where this should definitely work): image image

ngen, while not needed does drastically improve startup performance where available and would be especially helpful on older, slower machines running Windows 9x.