From 8acc50ec692d1f77ea1b87e4801984e616f6c38d Mon Sep 17 00:00:00 2001 From: Ben Brown Date: Tue, 4 May 2021 16:11:59 -0500 Subject: [PATCH] fix: Adjust build command used for dotnet functions (#7557) * Adjust build command used for dotnet functions * pass in the appid/passwd to functions * correct source of appid/password ford func deploy Co-authored-by: Soroush Co-authored-by: Chris Whitten --- extensions/azurePublish/src/node/provision.ts | 2 ++ extensions/runtimes/src/index.ts | 12 +----------- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/extensions/azurePublish/src/node/provision.ts b/extensions/azurePublish/src/node/provision.ts index ba36091835..cbe81ec43a 100644 --- a/extensions/azurePublish/src/node/provision.ts +++ b/extensions/azurePublish/src/node/provision.ts @@ -333,6 +333,8 @@ export class BotProjectProvision { location: config.location ?? provisionResults.resourceGroup.location, name: config.hostname, workerRuntime: config.workerRuntime, + appId: provisionResults.appId, + appPwd: provisionResults.appPassword, }); provisionResults.webApp = { hostname: functionsHostName, diff --git a/extensions/runtimes/src/index.ts b/extensions/runtimes/src/index.ts index b63b878801..0555740a1f 100644 --- a/extensions/runtimes/src/index.ts +++ b/extensions/runtimes/src/index.ts @@ -535,17 +535,7 @@ export default async (composer: any): Promise => { // do the dotnet publish try { - const configuration = JSON.parse(profile.configuration); - const runtimeIdentifier = configuration.runtimeIdentifier; - - // TODO: swap these lines??? ben to confirm - // Don't set self-contained and runtimeIdentifier for AzureFunctions. - // let buildCommand = `dotnet publish "${dotnetProjectPath}" -c release -o "${publishFolder}" -v q`; - // if runtime identifier set, make dotnet runtime to self contained, default runtime identifier is win-x64, please refer to https://docs.microsoft.com/en-us/dotnet/core/rid-catalog - const buildCommand = `dotnet publish "${dotnetProjectPath}" -c release -o "${publishFolder}" -v q --self-contained true -r ${ - runtimeIdentifier ?? 'win-x64' - }`; - // } + const buildCommand = `dotnet publish "${dotnetProjectPath}" -c release -o "${publishFolder}" -v q`; const { stdout, stderr } = await execAsync(buildCommand, { cwd: runtimePath, });