Fix unix bug.
crossgen fails on unix if there is an empty path passed as input to "-platform_assemblies_paths".
This commit is contained in:
parent
59f81484bb
commit
afafe80084
1 changed files with 5 additions and 2 deletions
|
@ -92,11 +92,14 @@ namespace Microsoft.DotNet.Cli.Build
|
||||||
// The right fix -
|
// The right fix -
|
||||||
// If the assembly has deps.json then parse the json file to get all the dependencies. Pass these dependencies as input to crossgen.
|
// If the assembly has deps.json then parse the json file to get all the dependencies. Pass these dependencies as input to crossgen.
|
||||||
// else pass the current directory of assembly as input to crossgen.
|
// else pass the current directory of assembly as input to crossgen.
|
||||||
string addtionalPaths = string.Join(";", Directory.GetDirectories(pathToAssemblies, "*", SearchOption.AllDirectories));
|
var addtionalPaths = Directory.GetDirectories(pathToAssemblies, "*", SearchOption.AllDirectories).ToList();
|
||||||
|
var paths = new List<string>() { sharedFxPath, pathToAssemblies };
|
||||||
|
paths.AddRange(addtionalPaths);
|
||||||
|
var platformAssembliesPaths = string.Join(";", paths.Distinct());
|
||||||
|
|
||||||
IList<string> crossgenArgs = new List<string> {
|
IList<string> crossgenArgs = new List<string> {
|
||||||
"-readytorun", "-in", file, "-out", tempPathName,
|
"-readytorun", "-in", file, "-out", tempPathName,
|
||||||
"-platform_assemblies_paths", $"{sharedFxPath};{pathToAssemblies};{addtionalPaths}"
|
"-platform_assemblies_paths", platformAssembliesPaths
|
||||||
};
|
};
|
||||||
|
|
||||||
var env = new Dictionary<string, string>()
|
var env = new Dictionary<string, string>()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue