Copying project dependencies when the project is a test project. Without this, dotnet test will fail to find the P2P dependencies and crash.

Refactoring the MakeCompilationOutputRunnable code so that it is easier to move it to build. Making build stop passing runtime to compile. Moving the MakeCompilationOutputRunnable from compile to build.

Making WriteDepsFile create its directory if it does not exist.
This commit is contained in:
Livar Cunha 2016-01-29 18:21:37 -08:00
parent b16ecff0e9
commit 35ef45306a
7 changed files with 283 additions and 185 deletions

View file

@ -9,9 +9,17 @@ namespace Microsoft.DotNet.Cli.Compiler.Common
{
public static void WriteDepsTo(this IEnumerable<LibraryExport> exports, string path)
{
CreateDirectoryIfNotExists(path);
File.WriteAllLines(path, exports.SelectMany(GenerateLines));
}
private static void CreateDirectoryIfNotExists(string path)
{
var depsFile = new FileInfo(path);
depsFile.Directory.Create();
}
private static IEnumerable<string> GenerateLines(LibraryExport export)
{
return GenerateLines(export, export.RuntimeAssemblies, "runtime")