@@ -52,8 +52,8 @@ public Assembly Locate(string search, Version defaultVersion = null)
52
52
{
53
53
assembly = ( location . SearchLocal ? this . TryFind ( info , location . Path , info . Path ) : null )
54
54
?? ( location . SearchBin ? this . TryFind ( info , location . Path , "bin" , info . Path ) : null )
55
- ?? ( location . SearchBinDebug ? this . TryFind ( info , location . Path , "bin" , "debug" , info . Path ) : null )
56
- ?? ( location . SearchBinRelease ? this . TryFind ( info , location . Path , "bin" , "release" , info . Path ) : null ) ;
55
+ ?? ( location . SearchBinDebug ? this . TryFindExtended ( info , location . Path , "bin" , "debug" ) : null )
56
+ ?? ( location . SearchBinRelease ? this . TryFindExtended ( info , location . Path , "bin" , "release" ) : null ) ;
57
57
if ( assembly != null )
58
58
{
59
59
return assembly ;
@@ -104,6 +104,19 @@ public Assembly Locate(string search, Version defaultVersion = null)
104
104
return null ;
105
105
}
106
106
107
+ private Assembly TryFindExtended ( AssemblyInfo info , params string [ ] chunks )
108
+ {
109
+ string path = FileSystem . Combine ( FileSystem . Combine ( chunks ) ) ;
110
+ if ( FileSystem . DirectoryExists ( path ) )
111
+ {
112
+ DirectoryInfo [ ] directories = FileSystem . GetDirectoryInfos ( path , "netcoreapp*" ) ;
113
+ return directories . Select ( directory => this . TryFind ( info , directory . FullName , info . Name ) ) . FirstOrDefault ( ) ;
114
+ }
115
+ List < string > list = chunks . ToList ( ) ;
116
+ list . Add ( info . Name ) ;
117
+ return this . TryFind ( info , list . ToArray ( ) ) ;
118
+ }
119
+
107
120
private Assembly TryFind ( AssemblyInfo info , params string [ ] chunks )
108
121
{
109
122
string file = FileSystem . Combine ( chunks ) ;
0 commit comments