问题
There is a similar question to this here but I believe that involves a different cause.
I moved a class from a newer project into an older project. Both were targeting .net 4.6 however after the move I received the following error on build.
Feature 'interpolated strings' is not available in C# 5. Please use language version 6 or greater.
I tried setting my project to build with C# 6 in the properties window with no change.
回答1:
I eventually found the place to change it. It seems sometimes when you update your targets framework version this does not get changed.
回答2:
Install DotNetCompilerPlatform version 2.1.0
来源:https://stackoverflow.com/questions/35686990/feature-interpolated-strings-is-not-available-in-c-sharp-5-please-use-languag