Merge pull request #9847 from peterhuene/update-sdk

Fix test with framework-dependent apphost.
This commit is contained in:
Peter Huene 2018-08-15 17:26:21 -07:00 committed by GitHub
commit d13334ad0c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 5 deletions

View file

@ -23,7 +23,7 @@
<MicrosoftNETCoreCompilersPackageVersion>$(MicrosoftCodeAnalysisCSharpPackageVersion)</MicrosoftNETCoreCompilersPackageVersion>
<MicrosoftCodeAnalysisBuildTasksPackageVersion>$(MicrosoftCodeAnalysisCSharpPackageVersion)</MicrosoftCodeAnalysisBuildTasksPackageVersion>
<MicrosoftNetCompilersNetcorePackageVersion>$(MicrosoftCodeAnalysisCSharpPackageVersion)</MicrosoftNetCompilersNetcorePackageVersion>
<MicrosoftNETSdkPackageVersion>2.2.100-preview1-63130-08</MicrosoftNETSdkPackageVersion>
<MicrosoftNETSdkPackageVersion>2.2.100-preview1-63215-01</MicrosoftNETSdkPackageVersion>
<MicrosoftNETBuildExtensionsPackageVersion>$(MicrosoftNETSdkPackageVersion)</MicrosoftNETBuildExtensionsPackageVersion>
<MicrosoftNETSdkRazorPackageVersion>2.1.1</MicrosoftNETSdkRazorPackageVersion>
<MicrosoftNETSdkWebPackageVersion>2.1.400-preview1-20180705-1834985</MicrosoftNETSdkWebPackageVersion>

View file

@ -123,6 +123,7 @@ namespace Microsoft.DotNet.Cli.Publish.Tests
var outputDirectory = PublishApp(testAppName, rid, args);
outputDirectory.Should().OnlyHaveFiles(new[] {
$"{testAppName}{Constants.ExeSuffix}",
$"{testAppName}.dll",
$"{testAppName}.pdb",
$"{testAppName}.deps.json",
@ -131,10 +132,14 @@ namespace Microsoft.DotNet.Cli.Publish.Tests
var outputProgram = Path.Combine(outputDirectory.FullName, $"{testAppName}{Constants.ExeSuffix}");
new DotnetCommand()
.ExecuteWithCapturedOutput(Path.Combine(outputDirectory.FullName, $"{testAppName}.dll"))
.Should().Pass()
.And.HaveStdOutContaining("Hello World");
var command = new TestCommand(outputProgram);
command.Environment[Environment.Is64BitProcess ? "DOTNET_ROOT" : "DOTNET_ROOT(x86)"] =
new RepoDirectoriesProvider().DotnetRoot;
command.ExecuteWithCapturedOutput()
.Should()
.Pass()
.And
.HaveStdOutContaining("Hello World");
}
[Theory]