Ionide-vscode-fsharp: Stringinterpolation requires langVersion in .NET 5

Created on 11 Nov 2020  路  8Comments  路  Source: ionide/ionide-vscode-fsharp

Describe the bug
If I want to use string interpolation from F# 5 in a new .NET 5 project, I get an error in the editor that tells me, that string interpolation is not available in F# 4.7. As far as I know, F# 5 is now the default language version and dotnet build runs successfully without this error.

To Reproduce
Steps to reproduce the behaviour:

  1. Use string interpolation in an net5.0 project without LangVersion
  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>net5.0</TargetFramework>
    <RootNamespace>test</RootNamespace>
  </PropertyGroup>
let test = "test"
$"%s{test}"

Expected behaviour
I would expect that the language version is the same for editor and compiler.

Screenshots
string_interpolation

Environment (please complete the following information):

  • OS: Windows (but inside of a mcr.microsoft.com/dotnet/sdk:5.0-focal dev container)
  • Ionide version: 4.17.0
  • VSCode version: Version: 1.51.0 (user setup)
  • dotnet SDK version: 5.0.100
  • mono / .Net Framework version: -

Additional context
I created a reproduction repo here: https://github.com/NicoVIII/repro-bug

I don't rule out that I do something wrong. If this is the case: Sorry!

Most helpful comment

We're actively working on this, you can follow the status here: https://github.com/fsharp/FsAutoComplete/pull/656

All 8 comments

Hey @NicoVIII :wave:,

Thank you for opening an issue. We will get back to you as
soon as we can. Also, check out our OpenCollective and consider
backing us.

https://opencollective.com/ionide

PS.: We offer backer support for all backers. Don't forget to add backer label when you start backing us :smile:

We're actively working on this, you can follow the status here: https://github.com/fsharp/FsAutoComplete/pull/656

Thank you! I wasn't sure, if this is another thing, which belongs to FsAutoComplete and not directly to Ionide, so I opened the bug here :)

This is fixed in Ionide 5.0 preview

is this fixed also for linux/ubuntu ? have v.5.5.4 installed running ubuntu on windows in this case (net 5 sdk)

image

removing the string interpolation sign makes the error disappear

image

Works for me with 5.5.5 and on Manjaro with target framework net5.0.

That's correct, this is implemented in all ionide 5.x versions.

it worked after uninstall of vscode and ionide as well and clean re'install, not sure what was causing it

Was this page helpful?
0 / 5 - 0 ratings

Related issues

vasily-kirichenko picture vasily-kirichenko  路  6Comments

sergey-tihon picture sergey-tihon  路  6Comments

cloudRoutine picture cloudRoutine  路  5Comments

sivabudh picture sivabudh  路  3Comments

MikaelUmaN picture MikaelUmaN  路  5Comments