Skip to content
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

Remove old workaround for netFrameworkVersion that has been fixed #3847

Merged
merged 1 commit into from
Sep 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
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
9 changes: 2 additions & 7 deletions src/commands/createFunctionApp/FunctionAppCreateStep.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import { LocationListStep } from '@microsoft/vscode-azext-azureutils';
import { AzureWizardExecuteStep, parseError } from '@microsoft/vscode-azext-utils';
import { AppResource } from '@microsoft/vscode-azext-utils/hostapi';
import { Progress } from 'vscode';
import { ConnectionKey, contentConnectionStringKey, contentShareKey, extensionVersionKey, ProjectLanguage, runFromPackageKey, webProvider } from '../../constants';
import { ext } from '../../extensionVariables';
import { FuncVersion, getMajorVersion } from '../../FuncVersion';
import { ConnectionKey, ProjectLanguage, contentConnectionStringKey, contentShareKey, extensionVersionKey, runFromPackageKey, webProvider } from '../../constants';
import { ext } from '../../extensionVariables';
import { localize } from '../../localize';
import { createWebSiteClient } from '../../utils/azureClients';
import { getRandomHexString } from '../../utils/fs';
Expand Down Expand Up @@ -99,11 +99,6 @@ export class FunctionAppCreateStep extends AzureWizardExecuteStep<IFunctionAppWi

private async getNewSiteConfig(context: IFunctionAppWizardContext, stack: FullFunctionAppStack): Promise<SiteConfig> {
const stackSettings: FunctionAppRuntimeSettings = nonNullProp(stack.minorVersion.stackSettings, context.newSiteOS === WebsiteOS.linux ? 'linuxRuntimeSettings' : 'windowsRuntimeSettings');
// /~https://github.com/microsoft/vscode-azurefunctions/issues/2990
if (context.newSiteOS === 'windows' && context.version === FuncVersion.v4) {
stackSettings.siteConfigPropertiesDictionary.netFrameworkVersion = 'v6.0'
}

const newSiteConfig: SiteConfig = stackSettings.siteConfigPropertiesDictionary;
const storageConnectionString: string = (await getStorageConnectionString(context)).connectionString;

Expand Down
10 changes: 1 addition & 9 deletions src/commands/createFunctionApp/stacks/getStackPicks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { ServiceClient } from '@azure/core-client';
import { createPipelineRequest } from '@azure/core-rest-pipeline';
import { AzExtPipelineResponse, createGenericClient } from '@microsoft/vscode-azext-azureutils';
import { IAzureQuickPickItem, openUrl, parseError } from '@microsoft/vscode-azext-utils';
import { FuncVersion, funcVersionLink } from '../../../FuncVersion';
import { funcVersionLink } from '../../../FuncVersion';
import { hiddenStacksSetting, noRuntimeStacksAvailableLabel } from '../../../constants';
import { previewDescription } from '../../../constants-nls';
import { localize } from '../../../localize';
Expand Down Expand Up @@ -214,14 +214,6 @@ function removeHiddenStacksAndProperties(stacks: FunctionAppStack[]): void {
delete minor.stackSettings.windowsRuntimeSettings;
}
}

if (minor.stackSettings.windowsRuntimeSettings?.supportedFunctionsExtensionVersions.includes(FuncVersion.v3) &&
minor.stackSettings.windowsRuntimeSettings?.supportedFunctionsExtensionVersions.includes(FuncVersion.v4)) {
// Temporary workaround becausecurrently there are stacks that support both v3 and v4, but if netFrameworkVersion v6.0
// is set for ~3 app, it will break so delete the netFrameworkVersion and only set to v6.0 for ~4
// /~https://github.com/microsoft/vscode-azurefunctions/issues/2990
delete minor.stackSettings.windowsRuntimeSettings.siteConfigPropertiesDictionary.netFrameworkVersion;
}
}
}
}
Expand Down