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),
|
Path.GetDirectoryName(toolDescription.RuntimeAssemblies.First().Path),
|
||||||
toolDescription.Identity.Name + FileNameSuffixes.Deps);
|
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 calculator = context.GetOutputPaths(Constants.DefaultConfiguration, buidBasePath: null, outputPath: context.ProjectDirectory);
|
||||||
var executable = new Executable(context, calculator, context.CreateExporter(Constants.DefaultConfiguration), null);
|
var executable = new Executable(context, calculator, context.CreateExporter(Constants.DefaultConfiguration), null);
|
||||||
|
|
||||||
executable.MakeCompilationOutputRunnable();
|
executable.MakeCompilationOutputRunnable();
|
||||||
|
|
||||||
if (File.Exists(depsPath)) File.Delete(depsPath);
|
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.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)
|
private static bool RestoreToolToPath(LibraryRange tooldep, IEnumerable<string> args, string tempPath, bool quiet)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue