From 10d10100cf6b282e54b716b720157eeffcac002d Mon Sep 17 00:00:00 2001 From: Ben Brown Date: Mon, 3 May 2021 12:16:37 -0500 Subject: [PATCH 1/3] Adjust build command used for dotnet functions --- extensions/runtimes/src/index.ts | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) 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, }); From 889121ed5d06ea8ef5f10e37a6ec68ca502176bd Mon Sep 17 00:00:00 2001 From: Ben Brown Date: Mon, 3 May 2021 16:02:29 -0500 Subject: [PATCH 2/3] pass in the appid/passwd to functions --- extensions/azurePublish/src/node/provision.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/extensions/azurePublish/src/node/provision.ts b/extensions/azurePublish/src/node/provision.ts index ba36091835..a9d67eb787 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: config.appId, + appPwd: config.appPassword, }); provisionResults.webApp = { hostname: functionsHostName, From 933a86069f501398e180906a846d11bbd98a11bb Mon Sep 17 00:00:00 2001 From: Ben Brown Date: Mon, 3 May 2021 16:13:23 -0500 Subject: [PATCH 3/3] correct source of appid/password ford func deploy --- extensions/azurePublish/src/node/provision.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extensions/azurePublish/src/node/provision.ts b/extensions/azurePublish/src/node/provision.ts index a9d67eb787..cbe81ec43a 100644 --- a/extensions/azurePublish/src/node/provision.ts +++ b/extensions/azurePublish/src/node/provision.ts @@ -333,8 +333,8 @@ export class BotProjectProvision { location: config.location ?? provisionResults.resourceGroup.location, name: config.hostname, workerRuntime: config.workerRuntime, - appId: config.appId, - appPwd: config.appPassword, + appId: provisionResults.appId, + appPwd: provisionResults.appPassword, }); provisionResults.webApp = { hostname: functionsHostName,