问题
Strange ASP.Net Error (WebForms): .net 4.6.1, VS2015
Error BC36716 Visual Basic 12.0 does not support interpolated strings.
No clue why i'm getting this. Why is it reporting VB 12.0 under VS2015?
<system.web>
<compilation debug="true" strict="true" explicit="true" targetFramework="4.6.1"/>
<httpRuntime targetFramework="4.6.1"/>
</system.web>
回答1:
Please look at the last answer at http://forums.asp.net/t/2061764.aspx?VS2015+claims+it+does+not+support+interpolated+strings
Found the answer here if anyone else has the same problem. It looks like the Roslyn compiler for Web Site project types is not icluded with VS2015 and must be downloaded separately. See: http://blogs.msdn.com/b/webdev/archive/2014/05/12/enabling-the-net-compiler-platform-roslyn-in-asp-net-applications.aspx
I hope it can help you.
回答2:
I tried everything! Until this worked. I removed two packages I had installed from NuGet. Both of them where from Microsoft, one was a Roslyn package and the other was a compiler. When I took those out of my project all my errors about interpolated strings went away. I am running Visual Studio 2017.
So look through your packages and remove ones you do not need (maybe leftover from an old setup like I had)...
I hope this helps someone.
来源:https://stackoverflow.com/questions/35127022/strange-asp-net-error-net-4-6-1-vs2015-interpolated-strings-not-supported