Saturday, February 13, 2016

Making Sitecore Habitat work with C# 6

Issue:


Post installation of Sitecore habitat locally, I was facing issues with runtime view compilations which are related to new C# syntax introduced in C# 6.0. The snapshot of an issue is shown below



Sitecore Habitat runtime issue related to C# 6.0
Yellow screen of death



Solution:


For this to work with ASP.NET MVC 5.x, you need to refer to the new CodeDom package from microsoft which adds compiler configuration to refer to the new codedom.

Add this section in your Habitat web.config inside configuration element