Skip to content

Enhance dotnet.generateAssets command to accept skipPrompt parameter for asset generation #8510

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Aug 13, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions src/lsptoolshost/debugger/debugger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ export function registerDebugger(
);

context.subscriptions.push(
vscode.commands.registerCommand('dotnet.generateAssets', async (selectedIndex) => {
if (!(await promptForDevKitDebugConfigurations())) {
vscode.commands.registerCommand('dotnet.generateAssets', async (selectedIndex, skipPrompt = false) => {
if (!(await promptForDevKitDebugConfigurations(skipPrompt))) {
return;
}

Expand All @@ -63,8 +63,13 @@ export function registerDebugger(
);
}

async function promptForDevKitDebugConfigurations(): Promise<boolean> {
async function promptForDevKitDebugConfigurations(skipPrompt: boolean = false): Promise<boolean> {
if (getCSharpDevKit()) {
// If skipPrompt is true, proceed with generating assets without showing the dialog
if (skipPrompt) {
return true;
}

let result: boolean | undefined = undefined;

while (result === undefined) {
Expand Down
Loading