From b66c8964b00e33595ddbb3f6eb351acaa0b0b81a Mon Sep 17 00:00:00 2001 From: "nikita.romanov" Date: Tue, 19 Nov 2024 23:28:54 +0400 Subject: [PATCH] Fallback to default targetFramework for desktop platforms --- .../controllers/configurationController.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/VSCode.Extension/controllers/configurationController.ts b/src/VSCode.Extension/controllers/configurationController.ts index 3d43716..ec63924 100644 --- a/src/VSCode.Extension/controllers/configurationController.ts +++ b/src/VSCode.Extension/controllers/configurationController.ts @@ -76,9 +76,11 @@ export class ConfigurationController { return ConfigurationController.getSetting(res.configIdUninstallApplicationBeforeInstalling, true); } public static getTargetFramework(): string | undefined { - return ConfigurationController.project?.frameworks.find(it => { - return it.includes(ConfigurationController.device?.platform ?? 'undefined'); - }); + const framework = ConfigurationController.project?.frameworks.find(it => it.includes(ConfigurationController.device?.platform ?? 'undefined')); + if (framework === undefined && (ConfigurationController.isWindows() || ConfigurationController.isMacCatalyst())) + return ConfigurationController.project?.frameworks.find(it => !it.includes('-')); + + return framework; } public static getDebuggerOptions(): any { return {