Port #4403 back into the main source code.
This change was lost when we converted the MSBuild "run3" verb to just "run". Fix #6076
This commit is contained in:
parent
1574349a59
commit
55eb812664
5 changed files with 71 additions and 38 deletions
|
@ -145,5 +145,23 @@ namespace Microsoft.DotNet.Cli.Run.Tests
|
|||
.Should().Pass()
|
||||
.And.HaveStdOutContaining("Hello World");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void ItReportsAGoodErrorWhenProjectHasMultipleFrameworks()
|
||||
{
|
||||
var testAppName = "MSBuildAppWithMultipleFrameworks";
|
||||
var testInstance = TestAssets.Get(testAppName)
|
||||
.CreateInstance()
|
||||
.WithSourceFiles()
|
||||
.WithRestoreFiles();
|
||||
|
||||
// use --no-build so this test can run on all platforms.
|
||||
// the test app targets net451, which can't be built on non-Windows
|
||||
new RunCommand()
|
||||
.WithWorkingDirectory(testInstance.Root)
|
||||
.ExecuteWithCapturedOutput("--no-build")
|
||||
.Should().Fail()
|
||||
.And.HaveStdErrContaining("--framework");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue