Azure / Azure/azure-functions-core-tools

Selecting dotnet isolated and F# created a C# project

Open
#3,171 1 comment 5 reactions 0 assignees View on GitHub
bug
Dominant language
C#
Stars
1.5k
Forks
498
Avg merge
5d 4h
Merged PRs (30d)
15

Description

When using the `func init` command to create a new dotnet isolated project and selecting F# as the language, a C# template is used for the output files:

```
vscode@007cb021b112:~/fsharp$ func init
Select a number for worker runtime:
1. dotnet
2. dotnet (isolated process)
3. node
4. python
5. powershell
6. custom
Choose option: 2
dotnet-isolated
Select a number for language:
1. c#-isolated
2. f#-isolated
Choose option: 2
f#-isolated

Writing /home/vscode/fsharp/.vscode/extensions.json
vscode@007cb021b112:~/fsharp$ ls
Program.cs Properties fsharp.csproj host.json local.settings.json
vscode@007cb021b112:~/fsharp$ func --version
4.0.4785
```

Note that I selected the `f#-isolated` option when choosing the language but the files on disk are from the C# template. There is an F# template (https://github.com/Azure/azure-functions-templates/tree/dev/Functions.Templates/ProjectTemplate_v4.x/FSharp-Isolated) so it's likely that the `init` command isn't respecting the language selection.

Contributor guide

Open the contributing guide

Research direction

Start with the `func init` language-selection path and compare its output with `Functions.Templates/ProjectTemplate_v4.x/FSharp-Isolated`. Reproduce the dotnet isolated flow using the `f#-isolated` choice; done means the generated project uses the F# template rather than `Program.cs` and a C# project file.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, fsharp
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.