0

I've got a new site that I'm creating in IIS 8.5 on Windows Server 2012 R2.

Using the info from here and here I was still getting an error trying to use interpolated strings.

From my error screenshot below, it appears to be still targeting the .NET v4.0 framework? I have checked and .NET 4.5.2 is definitely installed on the server.

Would greatly appreciate any help!

Error Advanced Settings App Pool Web.Config

Camilo Terevinto
  • 31,141
  • 6
  • 88
  • 120
Brendan Gooden
  • 1,460
  • 2
  • 21
  • 40
  • `.NET 4.5` means `.NET >= 4.5`, so that's not the problem – Camilo Terevinto Jan 08 '18 at 11:10
  • @CamiloTerevinto Yes but see the first screenshot, the version is .NET 4.0 ?? – Brendan Gooden Jan 08 '18 at 11:10
  • That's the CLR version. `4.0` = `.NET >= 4.0` – Camilo Terevinto Jan 08 '18 at 11:11
  • @CamiloTerevinto OK so what do you suggest the issue is? – Brendan Gooden Jan 08 '18 at 11:12
  • I assume you've deleted everything from your IIS site directory and republished a clean build of your app? – Eric Burdo Jan 08 '18 at 14:43
  • Not sure from where did you get this project. But the default templates from Visual Studio should include Roslyn as a dependency, https://blogs.msdn.microsoft.com/webdev/2014/05/12/enabling-the-net-compiler-platform-roslyn-in-asp-net-applications/, which should resolve the issue at runtime. If you don't bundle Roslyn, then the legacy compiler from .NET Framework installation would be used, which has no idea what C# 6 is, like I blogged in https://blog.lextudio.com/the-rough-history-of-the-so-many-c-compilers-f3a85500707c – Lex Li Jan 08 '18 at 18:03

0 Answers0