@@ -346,9 +346,6 @@ private bool TryFindInGAC(AssemblyName assemblyName, out string assemblyFilePath
346
346
return false ;
347
347
}
348
348
349
- bool assemblyFound = false ;
350
- char dirSeparator = IO . Path . DirectorySeparatorChar ;
351
-
352
349
if ( string . IsNullOrEmpty ( _winDir ) )
353
350
{
354
351
// cache value of '_winDir' folder in member variable.
@@ -358,10 +355,10 @@ private bool TryFindInGAC(AssemblyName assemblyName, out string assemblyFilePath
358
355
if ( string . IsNullOrEmpty ( _gacPathMSIL ) )
359
356
{
360
357
// cache value of '_gacPathMSIL' folder in member variable.
361
- _gacPathMSIL = $ " { _winDir } { dirSeparator } Microsoft.NET{ dirSeparator } assembly{ dirSeparator } GAC_MSIL";
358
+ _gacPathMSIL = Path . Join ( _winDir , " Microsoft.NET" , " assembly" , " GAC_MSIL") ;
362
359
}
363
360
364
- assemblyFound = FindInGac ( _gacPathMSIL , assemblyName , out assemblyFilePath ) ;
361
+ bool assemblyFound = FindInGac ( _gacPathMSIL , assemblyName , out assemblyFilePath ) ;
365
362
366
363
if ( ! assemblyFound )
367
364
{
@@ -399,8 +396,7 @@ private static bool FindInGac(string gacRoot, AssemblyName assemblyName, out str
399
396
bool assemblyFound = false ;
400
397
assemblyPath = null ;
401
398
402
- char dirSeparator = IO . Path . DirectorySeparatorChar ;
403
- string tempAssemblyDirPath = $ "{ gacRoot } { dirSeparator } { assemblyName . Name } ";
399
+ string tempAssemblyDirPath = Path . Join ( gacRoot , assemblyName . Name ) ;
404
400
405
401
if ( Directory . Exists ( tempAssemblyDirPath ) )
406
402
{
0 commit comments