Skip to content

Commit ede3681

Browse files
committed
Resolve executable fixed
Resolve .net Standard assembly fixed
1 parent 2d5b247 commit ede3681

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

Core.Common.Standard/KY.Core.Common.Standard.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<TargetFramework>netstandard2.0</TargetFramework>
55
<RootNamespace>KY.Core</RootNamespace>
66
<AssemblyName>KY.Core.Common</AssemblyName>
7-
<Version>4.7.2</Version>
7+
<Version>4.7.3</Version>
88
<Authors>KY-Programming</Authors>
99
<Company>KY-Programmingp</Company>
1010
<Product>KY.Core</Product>

Core.Common.Standard/Nuget/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ public AssemblyInfo(string name, Version version = null, string path = null)
1515
this.Name = name;
1616
this.Version = version;
1717
this.Path = path ?? name;
18-
this.IsExecutable = this.Name.EndsWith(".exe");
19-
this.IsResource = this.Name.EndsWith(".resources");
18+
this.IsExecutable = this.Name.EndsWith(".exe") || this.Path.EndsWith(".exe");
19+
this.IsResource = this.Name.EndsWith(".resources") || this.Path.EndsWith(".resources");
2020
}
2121
}
2222
}

Core.Common.Standard/Nuget/NugetAssemblyLocator.cs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,10 @@ public Assembly Locate(string search, Version defaultVersion = null)
4747
return assembly;
4848
}
4949
Logger.Trace($"Try to find assembly {info.Name}-{info.Version}...");
50+
if (info.Path != null && info.Path.Contains(":"))
51+
{
52+
return this.TryFind(info, info.Path);
53+
}
5054
List<SearchLocation> locations = this.CleanLocations(this.Locations);
5155
foreach (SearchLocation location in locations)
5256
{
@@ -109,8 +113,9 @@ private Assembly TryFindExtended(AssemblyInfo info, params string[] chunks)
109113
string path = FileSystem.Combine(FileSystem.Combine(chunks));
110114
if (FileSystem.DirectoryExists(path))
111115
{
112-
DirectoryInfo[] directories = FileSystem.GetDirectoryInfos(path, "netcoreapp*");
113-
return directories.Select(directory => this.TryFind(info, directory.FullName, info.Name)).FirstOrDefault();
116+
DirectoryInfo[] directories = FileSystem.GetDirectoryInfos(path, "netcoreapp*").Concat(FileSystem.GetDirectoryInfos(path, "netstandard*")).ToArray();
117+
return directories.Select(directory => this.TryFind(info, directory.FullName, info.Name)).FirstOrDefault()
118+
?? this.TryFind(info, path, info.Name);
114119
}
115120
List<string> list = chunks.ToList();
116121
list.Add(info.Name);

0 commit comments

Comments
 (0)