private bool IsAutoPlatformDetectRequired( XPathNavigator navigator, out Architecture chosenPlatform) { bool required = true; chosenPlatform = Architecture.Default; if (commandLineOptions.IsDesignMode) { bool isValidPlatform = InferRunSettingsHelper.TryGetPlatformXml( navigator, out var platformXml); required = !isValidPlatform || string.IsNullOrWhiteSpace(platformXml); if (!required) { chosenPlatform = (Architecture)Enum.Parse( typeof(Architecture), platformXml, true); } } else if (!commandLineOptions.IsDesignMode && commandLineOptions.ArchitectureSpecified) { required = false; chosenPlatform = commandLineOptions.TargetArchitecture; } return(required); }