The interpolated lines function is not available in C # 5. Please use language version 6 or later.

There is a similar question here, but I think this is due to another reason.

I moved the class from a newer project to an older project. Both were targeting .net 4.6, however after moving I got the following build error.

The interpolated lines function is not available in C # 5. Use language version 6 or higher.

I tried to configure my project to create with C # 6 in the properties window without changes.

+7
source share
2 answers

In the end, I found a place to change it. Sometimes, when you update the version of your target environment, it does not change. enter image description here

+10
source share

Install DotNetCompilerPlatform version 2.1.0

+3
source share

All Articles