【问题标题】:Strange ASP.Net Error: .net 4.6.1, VS2015 - interpolated strings not supported?奇怪的 ASP.Net 错误:.net 4.6.1,VS2015 - 不支持插值字符串?
【发布时间】:2016-05-09 16:43:40
【问题描述】:

奇怪的 ASP.Net 错误(WebForms):.net 4.6.1, VS2015

错误 BC36716 Visual Basic 12.0 不支持内插字符串。

不知道为什么我会得到这个。为什么VS2015下报VB 12.0?

  <system.web>
    <compilation debug="true" strict="true" explicit="true" targetFramework="4.6.1"/>
    <httpRuntime targetFramework="4.6.1"/>
  </system.web>

【问题讨论】:

    标签: asp.net vb.net webforms visual-studio-2015 .net-4.6


    【解决方案1】:

    我什么都试过了!直到这有效。我删除了从 NuGet 安装的两个包。它们都来自微软,一个是 Roslyn 包,另一个是编译器。当我把这些从我的项目中取出时,我所有关于插值字符串的错误都消失了。我正在运行 Visual Studio 2017。

    因此,请查看您的包并删除您不需要的包(可能是像我一样的旧设置留下的)...

    我希望这对某人有所帮助。

    【讨论】:

    • 你忘了提到要删除的包。
    【解决方案2】:

    请看最后一个答案 http://forums.asp.net/t/2061764.aspx?VS2015+claims+it+does+not+support+interpolated+strings

    如果其他人有同样的问题,请在此处找到答案。它看起来 不包括用于网站项目类型的 Roslyn 编译器 VS2015,必须单独下载。看: http://blogs.msdn.com/b/webdev/archive/2014/05/12/enabling-the-net-compiler-platform-roslyn-in-asp-net-applications.aspx

    希望对你有帮助。

    【讨论】:

    • 不鼓励仅链接的答案,因为链接会随着时间的推移而消失或更改。这些网站的说明应复制到此答案中。
    猜你喜欢
    • 1970-01-01
    • 2021-07-19
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-10-24
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多