Skip to content

Commit c2065bf

Browse files
committed
Add better msg on framework compatibility check
1 parent 80bb0f5 commit c2065bf

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/utils/terminal-cmd.provider.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,13 +89,19 @@ export class MinWebApiCommand extends Command {
8989
export class DefaultCommand extends Command {
9090
execute() {
9191
if (!this.isFrameworkCompatible()) {
92+
// Format list of compatible frameworks
93+
const compatibleFrameworks = TEMPLATE_COMPATIBILITY[this.message.template]
94+
.map((f) => `'${f.substring(3)}'`)
95+
.join(", ");
96+
9297
vscode.window.showWarningMessage(
93-
`Please select a compatible framework for ${this.message.template}`
98+
`Please select a compatible framework for ${this.message.template} - [${
99+
compatibleFrameworks || "None"
100+
}]`
94101
);
95102
return;
96103
}
97104

98-
console.log("Default command: ", this.message);
99105
this.executeCommonCommands();
100106
this.terminal.sendText(
101107
`dotnet new ${this.message.template} -n ${this.message.project} -o '${this.message.filepath}\\${this.message.solution}\\${this.message.project}' --framework ${this.message.framework} --force`

0 commit comments

Comments
 (0)