/// <summary>
 /// Set the profile optimization root on the appropriate load context
 /// </summary>
 /// <remarks>
 /// When using PS ALC as a full fledged ALC in OPS, we don't enable profile optimization.
 /// This is because PS assemblies will be recorded in the profile, and the next time OPS
 /// starts up, the default context will load the PS assemblies pretty early to ngen them
 /// in another CPU core, so our Load override won't track the loading of them, and thus
 /// OPS will fail to work.
 /// The root cause is that dotnet.exe put all PS assemblies in TPA list. If PS assemblies
 /// are not in TPA list, then we can enable profile optimization without a problem.
 /// </remarks>
 internal void SetProfileOptimizationRootImpl(string directoryPath)
 {
     if (_useResolvingHandlerOnly)
     {
         _activeLoadContext.SetProfileOptimizationRoot(directoryPath);
     }
 }