Skip to content
Original file line number Diff line number Diff line change
Expand Up @@ -365,14 +365,14 @@ private bool TryFindInGAC(AssemblyName assemblyName, out string assemblyFilePath

if (!assemblyFound)
{
string gacBitnessAwarePath = null;
string gacBitnessAwarePath;

if (Environment.Is64BitProcess)
{
if (string.IsNullOrEmpty(_gacPath64))
{
// cache value of '_gacPath64' folder in member variable.
_gacPath64 = $"{_winDir}{dirSeparator}Microsoft.NET{dirSeparator}assembly{dirSeparator}GAC_64";
var gacName = RuntimeInformation.ProcessArchitecture == Architecture.Arm64 ? "GAC_Arm64" : "GAC_64";
_gacPath64 = Path.Join(_winDir, "Microsoft.NET", "assembly", gacName);
}

gacBitnessAwarePath = _gacPath64;
Expand All @@ -381,8 +381,7 @@ private bool TryFindInGAC(AssemblyName assemblyName, out string assemblyFilePath
{
if (string.IsNullOrEmpty(_gacPath32))
{
// cache value of '_gacPath32' folder in member variable.
_gacPath32 = $"{_winDir}{dirSeparator}Microsoft.NET{dirSeparator}assembly{dirSeparator}GAC_32";
_gacPath32 = Path.Join(_winDir, "Microsoft.NET", "assembly", "GAC_32");
}

gacBitnessAwarePath = _gacPath32;
Expand Down