Fix startup perf.
This commit is contained in:
Родитель
480d2c9e4e
Коммит
cab98c616e
|
@ -73,7 +73,20 @@ namespace Microsoft.Toolkit.Win32.UI.XamlHost
|
|||
// Reflection-based runtime metadata probing
|
||||
var currentDirectory = new FileInfo(typeof(MetadataProviderDiscovery).Assembly.Location).Directory;
|
||||
|
||||
foreach (var file in currentDirectory.EnumerateFiles("*.exe").Union(currentDirectory.EnumerateFiles("*.dll")))
|
||||
foreach (var assembly in GetAssemblies(currentDirectory, "*.exe"))
|
||||
{
|
||||
yield return assembly;
|
||||
}
|
||||
|
||||
foreach (var assembly in GetAssemblies(currentDirectory, "*.dll"))
|
||||
{
|
||||
yield return assembly;
|
||||
}
|
||||
}
|
||||
|
||||
private static IEnumerable<Assembly> GetAssemblies(DirectoryInfo folder, string fileFilter)
|
||||
{
|
||||
foreach (var file in folder.EnumerateFiles(fileFilter))
|
||||
{
|
||||
Assembly a = null;
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
<CreateItem Include="%(BuildOutputPaths.Identity)">
|
||||
<Output ItemName="BuildOutputs" TaskParameter="Include"/>
|
||||
</CreateItem>
|
||||
<CreateItem Include="%(BuildOutputs.RelativeDir)*.dll;%(BuildOutputs.RelativeDir)*.xbf;%(BuildOutputs.RelativeDir)*.pri">
|
||||
<CreateItem Include="%(BuildOutputs.RelativeDir)*.exe;%(BuildOutputs.RelativeDir)*.dll;%(BuildOutputs.RelativeDir)*.xbf;%(BuildOutputs.RelativeDir)*.pri">
|
||||
<Output ItemName="Filter" TaskParameter="Include"/>
|
||||
</CreateItem>
|
||||
<CreateItem Include="%(BuildOutputs.RelativeDir)AppxManifest*.xml">
|
||||
|
|
Загрузка…
Ссылка в новой задаче