-
Notifications
You must be signed in to change notification settings - Fork 133
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
Push Framework argument for .net7.0 #3273
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,7 +41,11 @@ export class DotnetProjectCreateStep extends ProjectCreateStepBase { | |
} | ||
const functionsVersion: string = 'v' + majorVersion; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. cc @liliankasem For Alex's context, this is a new change by Lilian to the .NET isolated templates. PR here: Azure/azure-functions-templates#1240. Basically, in the past the isolated worker only really supported one .NET version at a time (or at least only one we cared about for the sake of templates). Now, they support net48, net6.0, and net7.0 all at once which is why a new parameter was introduced. If the arg is not passed, it will currently default to net6.0. Also - it's important to note that the version of the |
||
const projTemplateKey = nonNullProp(context, 'projectTemplateKey'); | ||
await executeDotnetTemplateCommand(context, version, projTemplateKey, context.projectPath, 'create', '--identity', identity, '--arg:name', cpUtils.wrapArgInQuotes(projectName), '--arg:AzureFunctionsVersion', functionsVersion); | ||
const args = ['--identity', identity, '--arg:name', cpUtils.wrapArgInQuotes(projectName), '--arg:AzureFunctionsVersion', functionsVersion]; | ||
// defaults to net6.0 if there is no targetFramework | ||
args.push('--arg:Framework', cpUtils.wrapArgInQuotes(context.workerRuntime?.targetFramework)); | ||
|
||
await executeDotnetTemplateCommand(context, version, projTemplateKey, context.projectPath, 'create', ...args); | ||
|
||
await setLocalAppSetting(context, context.projectPath, azureWebJobsStorageKey, '', MismatchBehavior.Overwrite); | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes that is correct