Issue Description
We currently load SDK resolvers using Assembly.LoadFrom on .NET Framework, which disqualifies it from using native images even if they existed. We should:
- Figure out a way to use regular
Assembly.Load, e.g. load into a separate appdomain with a generated app config.
- Make sure the .NET SDK resolver and the NuGet SDK resolver assemblies are added to the NGEN queue by Visual Studio installer and produce usable images.
The potential perf gain is about 300 ms of JITting saved, out of 1100 ms total for a simple app build using MSBuild.exe. It should also lay some groundwork for eliminating another big chunk of JITting: Microsoft.NET.Build.Tasks.dll.
Steps to Reproduce
Collect JIT stats of:
> MSBuild.exe SimpleProject.csproj
Data

Analysis
No response
Versions & Configurations
No response
Regression
Regression Details
No response