Packaged Commands

This commit is contained in:
piotrp 2016-01-06 02:27:16 -08:00
parent ecda2a8106
commit 5cd64066c4
38 changed files with 805 additions and 360 deletions

View file

@ -6,10 +6,12 @@ using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using Microsoft.Dnx.Runtime.Common.CommandLine;
using Microsoft.DotNet.Cli.Compiler.Common;
using Microsoft.DotNet.Cli.Utils;
using Microsoft.DotNet.ProjectModel;
using Microsoft.DotNet.ProjectModel.Compilation;
using Microsoft.DotNet.ProjectModel.Graph;
using Microsoft.DotNet.ProjectModel.Utilities;
using NuGet.Frameworks;
using Microsoft.Extensions.DependencyModel;
@ -350,6 +352,17 @@ namespace Microsoft.DotNet.Tools.Compiler
runtimeContext
.MakeCompilationOutputRunnable(outputPath, args.ConfigValue);
}
else if (!string.IsNullOrEmpty(context.ProjectFile.TestRunner))
{
var projectContext =
ProjectContext.Create(context.ProjectDirectory, context.TargetFramework,
new[] {RuntimeIdentifier.Current});
projectContext
.CreateExporter(args.ConfigValue)
.GetDependencies(LibraryType.Package)
.WriteDepsTo(Path.Combine(outputPath, projectContext.ProjectFile.Name + FileNameSuffixes.Deps));
}
return PrintSummary(diagnostics, sw, success);
}