public void PublishTest(string appname, bool portable, bool checkCompilation) { var testProjectPath = Path.Combine(RepoRoot, "TestAssets", "TestProjects", "DependencyContextValidator", appname); var testProject = Path.Combine(testProjectPath, "project.json"); var publishCommand = new PublishCommand(testProject); publishCommand.Execute().Should().Pass(); var exeName = portable ? publishCommand.GetPortableOutputName() : publishCommand.GetOutputExecutable(); var result = TestExecutable(publishCommand.GetOutputDirectory(portable).FullName, exeName, string.Empty); ValidateRuntimeLibraries(result, appname); if (checkCompilation) { ValidateCompilationLibraries(result, appname); } }
public void TestDotnetPublish() { var publishCommand = new PublishCommand(TestProject, output: OutputDirectory); publishCommand.Execute().Should().Pass(); TestExecutable(OutputDirectory, publishCommand.GetPortableOutputName(), s_expectedOutput); }