Add F# webapi template tests
- Dominant language
- C#
- Stars
- 38.4k
- Forks
- 10.9k
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 281
Description
A change to the F# template - https://github.com/dotnet/aspnetcore/pull/46443 - broke the installer build - https://github.com/dotnet/installer/pull/15564#issuecomment-1432071126
```
ItCanCreateAndBuildTemplatesWithDefaultFramework(templateName: "webapi", language: "F#")
Expected command to pass but it did not.
File Name: /__w/1/s/artifacts/bin/redist/Debug/dotnet/dotnet
Arguments: build --framework net8.0 /p:_NETCoreSdkIsPreview=true
WorkingDir:: /__w/1/s/artifacts/bin/EndToEnd.Tests/Debug/net8.0/Tests/EndToEnd.Tests/TestTemplateCreateAndBuildwebapi[F#]
Exit Code: 1
StdOut:
MSBuild version 17.6.0-preview-23115-01+dfd8f413a for .NET
Determining projects to restore...
Restored /__w/1/s/artifacts/bin/EndToEnd.Tests/Debug/net8.0/Tests/EndToEnd.Tests/TestTemplateCreateAndBuildwebapi[F#]/TestTemplateCreateAndBuildwebapi[F#].fsproj (in 278 ms).
/__w/1/s/artifacts/bin/redist/Debug/dotnet/sdk/8.0.100-ci/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.RuntimeIdentifierInference.targets(287,5): message NETSDK1057: You are using a preview version of .NET. See: https://aka.ms/dotnet-support-policy [/__w/1/s/artifacts/bin/EndToEnd.Tests/Debug/net8.0/Tests/EndToEnd.Tests/TestTemplateCreateAndBuildwebapi[F#]/TestTemplateCreateAndBuildwebapi[F#].fsproj]
/__w/1/s/artifacts/bin/EndToEnd.Tests/Debug/net8.0/Tests/EndToEnd.Tests/TestTemplateCreateAndBuildwebapi[F#]/Controllers/WeatherForecastController.fs(9,42): error FS0039: The type 'ILogger' is not defined. [/__w/1/s/artifacts/bin/EndToEnd.Tests/Debug/net8.0/Tests/EndToEnd.Tests/TestTemplateCreateAndBuildwebapi[F#]/TestTemplateCreateAndBuildwebapi[F#].fsproj]
Build FAILED.
```
There should be tests for this template in our repo CI so we know if something has broken. Then we can change F# templates with confidence.
Contributor guide
Assessment
This issue has not been assessed yet.