Am working on a legacy solution which includes some VB.NET projects.
Code like this
Throw New InvalidOperationException($"Cannot update {entity.Id} because it does not yet exist.")
yields a red squiggly error "Unexpected token" at the dollar sign. I managed build the code by adding 14 to every build configuration in the relevant .vbproj file, but I am still haunted by these red squigglies. Not only under the $ dollar sign, but also under every End If/End Using/End Sub that follows it, which is considerably annoying.
Am using VS2015 Update 1, and the C# 6 language features, including string interpolation, have always just worked, even within this same solution.
I create File->New Project (implying, an entirely new solution) -> VB.NET Class library, and the code still builds fine but the IDE still gives me the squigglies. Perhaps the problem lies in some obscure machine.config setting? Some VS plugin I need to install?
entity.Idis declared (and if it isn't, I get a different error).