|
// when decompiling assemblies that target frameworks prior to 4.0, we can fall back to the 4.0 assemblies in case the target framework is not installed. |
|
// but when looking for Microsoft.Build.Framework, Version=15.0.0.0 we should not use the version 4.0 assembly here so that the LoadedAssembly logic can instead fall back to version 15.1.0.0 |
|
if (name.Version <= new Version(4, 0, 0, 0)) |
|
{ |
|
assembly = SearchDirectory(name, framework_dirs); |
|
if (assembly != null) |
|
return assembly; |
|
} |
|
|
|
if (throwOnError) |
|
throw new ResolutionException(name, null, null); |
|
return null; |
|
} |
Prior to 4.0 will fall back to .NET 6 rather than 4.0 as the comment indicate.
ILSpy/ICSharpCode.Decompiler/Metadata/UniversalAssemblyResolver.cs
Lines 430 to 442 in cbaf055
Prior to 4.0 will fall back to .NET 6 rather than 4.0 as the comment indicate.