You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Fix containerized .NET project creation failing with exit code 73
When creating a containerized .NET project, `func init` runs first and
creates files (.gitignore, .csproj, Program.cs, host.json, etc.). The
subsequent `dotnet new func` command then fails with exit code 73
because those files already exist.
Pass `--force` to `dotnet new` when creating containerized projects so
it overwrites the files created by the preceding `func init` step.
Fixes#4955
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Address PR feedback: use withFlagArg and always pass --force
- Use withFlagArg('--force', ...) instead of withArg('--force') as it
is purpose-built for boolean flags.
- Always pass force: true since the non-containerized path already
prompts the user via confirmOverwriteExisting before reaching
dotnet new, so --force is needed to match the confirmed intent.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Changes so that we are not force overwriting the files
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Nathan Turinski <naturins@microsoft.comm>
// For containerized function apps we need to call func init before intialization as we want the .csproj file to be overwritten with the correct version
39
-
// currentely the version created by func init is behind the template version
withNamedArg('--target-framework',runtime==='dotnet' ? undefined : nonNullValueAndProp(context.workerRuntime,'targetFramework')),// targetFramework is only supported for dotnet-isolated projects
0 commit comments