-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(vscode): Introduce .NET 8 to custom code and extension dependenc…
…ies (#4947) * Add validation for multiple dotnet versions * Add comments and return in the await * Fix command execution * Add version to switch to nuget based * Add code to differentiate .net7 and netfx * Add .NET8 files and creation file decision * Update to function * Add selfContained * Remove .NET 6 * Move target framework step after workspace type step * Remove nuget config file * Upgrade packages * Add new dotnetMulti prop for manifest * Update pack command to build all projects for extension * Add comments and remove extra wizard context property
- Loading branch information
1 parent
b884d6f
commit d58f7eb
Showing
25 changed files
with
448 additions
and
189 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
...ommands/createNewCodeProject/createCodeProjectSteps/createFunction/TargetFrameworkStep.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/*--------------------------------------------------------------------------------------------- | ||
* Copyright (c) Microsoft Corporation. All rights reserved. | ||
* Licensed under the MIT License. See License.txt in the project root for license information. | ||
*--------------------------------------------------------------------------------------------*/ | ||
import { type IProjectWizardContext, TargetFramework, ProjectType } from '@microsoft/vscode-extension-logic-apps'; | ||
import { localize } from '../../../../../localize'; | ||
import { AzureWizardPromptStep, type IAzureQuickPickItem } from '@microsoft/vscode-azext-utils'; | ||
import { Platform } from '../../../../../constants'; | ||
|
||
/** | ||
* Represents a step in the project creation wizard for selecting the target framework. | ||
*/ | ||
export class TargetFrameworkStep extends AzureWizardPromptStep<IProjectWizardContext> { | ||
public hideStepCount = true; | ||
|
||
/** | ||
* Prompts the user to select a target framework. | ||
* @param {IProjectWizardContext} context - The project wizard context. | ||
*/ | ||
public async prompt(context: IProjectWizardContext): Promise<void> { | ||
const placeHolder: string = localize('selectTargetFramework', 'Select a target framework.'); | ||
const picks: IAzureQuickPickItem<TargetFramework>[] = [{ label: localize('Net8', '.NET 8'), data: TargetFramework.Net8 }]; | ||
if (process.platform === Platform.windows) { | ||
picks.unshift({ label: localize('NetFx', '.NET Framework'), data: TargetFramework.NetFx }); | ||
} | ||
context.targetFramework = (await context.ui.showQuickPick(picks, { placeHolder })).data; | ||
} | ||
|
||
/** | ||
* Determines whether this step should be prompted based on the project wizard context. | ||
* @param {IProjectWizardContext} context - The project wizard context. | ||
* @returns True if this step should be prompted, false otherwise. | ||
*/ | ||
public shouldPrompt(context: IProjectWizardContext): boolean { | ||
return context.projectType === ProjectType.customCode; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.