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:
parent
b16ecff0e9
commit
35ef45306a
7 changed files with 283 additions and 185 deletions
|
@ -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")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue