copy the deps json for packaged commands
This commit is contained in:
parent
58a8a10d41
commit
1c44d2566e
1 changed files with 7 additions and 0 deletions
|
@ -162,14 +162,21 @@ namespace Microsoft.DotNet.Tools.Restore
|
|||
Path.GetDirectoryName(toolDescription.RuntimeAssemblies.First().Path),
|
||||
toolDescription.Identity.Name + FileNameSuffixes.Deps);
|
||||
|
||||
var depsJsonPath = Path.Combine(
|
||||
toolDescription.Path,
|
||||
Path.GetDirectoryName(toolDescription.RuntimeAssemblies.First().Path),
|
||||
toolDescription.Identity.Name + FileNameSuffixes.DepsJson);
|
||||
|
||||
var calculator = context.GetOutputPaths(Constants.DefaultConfiguration, buidBasePath: null, outputPath: context.ProjectDirectory);
|
||||
var executable = new Executable(context, calculator, context.CreateExporter(Constants.DefaultConfiguration), null);
|
||||
|
||||
executable.MakeCompilationOutputRunnable();
|
||||
|
||||
if (File.Exists(depsPath)) File.Delete(depsPath);
|
||||
if (File.Exists(depsJsonPath)) File.Delete(depsJsonPath);
|
||||
|
||||
File.Move(Path.Combine(calculator.RuntimeOutputPath, "bin" + FileNameSuffixes.Deps), depsPath);
|
||||
File.Move(Path.Combine(calculator.RuntimeOutputPath, "bin" + FileNameSuffixes.DepsJson), depsJsonPath);
|
||||
}
|
||||
|
||||
private static bool RestoreToolToPath(LibraryRange tooldep, IEnumerable<string> args, string tempPath, bool quiet)
|
||||
|
|
Loading…
Reference in a new issue