private static string Publish(string testRoot, bool isPortable)
        {
            string appName = Path.GetFileName(testRoot);

            var publishCmd = new PublishCommand(projectPath: testRoot, output: Path.Combine(testRoot, "bin"));
            var result     = publishCmd.ExecuteWithCapturedOutput();

            result.Should().Pass();

            var publishDir = publishCmd.GetOutputDirectory(portable: isPortable).FullName;

            return(Path.Combine(publishDir, appName + (isPortable ? ".dll" : FileNameSuffixes.CurrentPlatform.Exe)));
        }