Updated an existing Web Site project type Visual Studio 2015, I changed the Framework to 4.6.
I then expected to have all those new features available in my
Possible solutions, taken from the comments on ScottGu's blog posting (search for "8026" on the page):
Add these RTM code dom elements to web.config:
Then add the Roslyn and Microsoft.CodeDom.Providers.*.dll stuff into your BIN directory.
It is easy enough to setup, but just was strange to me that the default template wasn't set up for it if you selected .NET 4.6 when creating a new "Web Site" in VS 2015 RTM.
Further to David Taylor's comment above, it looks like the system.codedom settings are correct when a Web App is created with the TargetFramework as the default v4.5.2. Changing the TargetFramework to v4.6 appears to modify the compiler settings for CSharp, in a way that causes an issue.
My workarounds was as follows:
Home Page should load as expected.
For info, the system.codedom contents immediately after changing TargetFramework to v4.6. was as follows (note use of the Type "Microsoft.CSharp.CSharpCodeProvider"):