Feature 'interpolated strings' is not available in C# 5. Please use language version 6 or greater

戏子无情 提交于 2019-11-27 21:19:28

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!