Fix tests and add diagnostic message

This commit is contained in:
Pavel Krymets 2016-02-09 10:51:03 -08:00
parent 055a0cd725
commit 3f058d4f32
2 changed files with 9 additions and 4 deletions

View file

@ -32,6 +32,11 @@ namespace Microsoft.Dotnet.Cli.Compiler.Common
public void MakeCompilationOutputRunnable()
{
if (string.IsNullOrEmpty(_context.RuntimeIdentifier))
{
throw new InvalidOperationException($"Can not make output runnable for framework {_context.TargetFramework}, because it doesn't have runtime target");
}
var outputPath = _outputPaths.RuntimeOutputPath;
CopyContentFiles(outputPath);

View file

@ -68,10 +68,10 @@ namespace Microsoft.DotNet.Tools.Builder.Tests
[Theory]
// global.json exists
[InlineData(true, null, null, "src/TestLibrary/bin/debug/{fw}", "src/TestApp/bin/debug/{fw}", "src/TestApp/bin/debug/{fw}/{rid}")]
[InlineData(true, "out", null, "src/TestLibrary/bin/debug/{fw}", "src/TestApp/bin/debug/{fw}", "out")]
[InlineData(true, null, "build", "build/src/TestLibrary/bin/debug/{fw}", "build/src/TestApp/bin/debug/{fw}", "build/src/TestApp/bin/debug/{fw}/{rid}")]
[InlineData(true, "out", "build", "build/src/TestLibrary/bin/debug/{fw}", "build/src/TestApp/bin/debug/{fw}", "out")]
[InlineData(true, null, null, "src/TestLibrary/bin/Debug/{fw}", "src/TestApp/bin/Debug/{fw}", "src/TestApp/bin/Debug/{fw}/{rid}")]
[InlineData(true, "out", null, "src/TestLibrary/bin/Debug/{fw}", "src/TestApp/bin/Debug/{fw}", "out")]
[InlineData(true, null, "build", "build/src/TestLibrary/bin/Debug/{fw}", "build/src/TestApp/bin/Debug/{fw}", "build/src/TestApp/bin/Debug/{fw}/{rid}")]
[InlineData(true, "out", "build", "build/src/TestLibrary/bin/Debug/{fw}", "build/src/TestApp/bin/Debug/{fw}", "out")]
//no global.json
//[InlineData(false, null, null, "src/TestLibrary/bin/debug/{fw}", "src/TestApp/bin/debug/{fw}", "src/TestApp/bin/debug/{fw}/{rid}")]
//[InlineData(false, "out", null, "src/TestLibrary/bin/debug/{fw}", "src/TestApp/bin/debug/{fw}", "out")]