I am working on a SXA (Sitecore Experience Accelerator) project, where until now, never had the requirement to use composite components.
For the first time, used Tabs component. As soon as I added the component on a page, it breaks.

As I can’t get much information from the exception, open the page in normal mode, then there it is, an exception on the view page.

But why it complains about “does not contain a definition for Sitecore“, as this is out of the box SXA component.
After further digging into the issue, as it says, Sitecore definition is not present. Then it hit me. Usually we get this error, if we miss adding Sitecore name space in web.config file, present under views folder. A very common error with the new component development in Visual Studio.

Quickly verified views\web.config file in my deploy location. There it is the default one got overwritten and a new file does not contain Sitecore name spaces. So added Sitecore name spaces, it resolved the issue.

Long story, short, few new web projects got added in our VS solution, where one of the views\web.config is having Build action set to Content. So this replaced the default one in the deploy location.
