Context. Application WAS 4.5.1 using Microsoft.CodeDOM.Providers.DotNetCompilers. Had to upgrade to 4.6 to use a DLL from a small team that won't change back to 4.5. But now my Razor Views blow up when I try to use "version 6" features like null propagating operators.
if(Model.Object?.Property) {
//do stuff
}
Already seen this:
C# 6.0 Features Not Working with Visual Studio 2015
Tried building the project with VS2017 and still doesn't work.
Tried setting Project Properties => Build => Advanced => Language Verion to 6 (And 7) and still doesn't work.
Uninstalled CodeDOM.Compiler package, restarted VS, still doesn't work.
FWIW, Version 6 features DO work in .cs source files, this is ONLY affecting Razor views as far as I can tell.
I'm out of ideas. Anyone have a clue?