Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -346,9 +346,6 @@ private bool TryFindInGAC(AssemblyName assemblyName, out string assemblyFilePath
return false;
}

bool assemblyFound = false;
char dirSeparator = IO.Path.DirectorySeparatorChar;

if (string.IsNullOrEmpty(_winDir))
{
// cache value of '_winDir' folder in member variable.
Expand All @@ -358,10 +355,10 @@ private bool TryFindInGAC(AssemblyName assemblyName, out string assemblyFilePath
if (string.IsNullOrEmpty(_gacPathMSIL))
{
// cache value of '_gacPathMSIL' folder in member variable.
_gacPathMSIL = $"{_winDir}{dirSeparator}Microsoft.NET{dirSeparator}assembly{dirSeparator}GAC_MSIL";
_gacPathMSIL = Path.Join(_winDir, "Microsoft.NET", "assembly", "GAC_MSIL");
}

assemblyFound = FindInGac(_gacPathMSIL, assemblyName, out assemblyFilePath);
bool assemblyFound = FindInGac(_gacPathMSIL, assemblyName, out assemblyFilePath);

if (!assemblyFound)
{
Expand Down Expand Up @@ -399,8 +396,7 @@ private static bool FindInGac(string gacRoot, AssemblyName assemblyName, out str
bool assemblyFound = false;
assemblyPath = null;

char dirSeparator = IO.Path.DirectorySeparatorChar;
string tempAssemblyDirPath = $"{gacRoot}{dirSeparator}{assemblyName.Name}";
string tempAssemblyDirPath = Path.Join(gacRoot, assemblyName.Name);

if (Directory.Exists(tempAssemblyDirPath))
{
Expand Down