简体   繁体   中英

Strange ASP.Net Error: .net 4.6.1, VS2015 - interpolated strings not supported?

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>

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM