title: The name 'ViewBag' does not exist in the current context - Visual Studio 2015
body: <p>I'm starting to develop in ASP.NET again and I ran into a small error within Visual Studio. My .cshtml files show errors when using a few razor functions. For example "The name 'ViewBag' does not exist in the current context". Here is a picture: </p>
  
  <p><a href="https://i.stack.imgur.com/K03nW.png" rel="noreferrer"><img src="https://i.stack.imgur.com/K03nW.png" alt="screenshot of problem in visual studio 2015"></a></p>
  
  <p>I am using a demo project. You can find the project here: <a href="https://github.com/Wintellect/Angular-MVC-Cookbook/tree/master/BasicProject" rel="noreferrer">https://github.com/Wintellect/Angular-MVC-Cookbook/tree/master/BasicProject</a></p>
  
  <p>I have looked through several other threads and most suggest to update the web.config file(s). These 2 config files are already present and since it's a pretty popular demo I assume it has all the required configuration in it. I have of course looked through these config files and they do indeed include the suggested solutions. </p>
  
  <p>Other details: </p>
  
  <ul>
  <li>I have already used clean &amp; rebuild on the solution but that changed nothing. </li>
  <li>When I create a completely new MVC project it does work</li>
  <li>My friend has the same problem and we both use VS 2015 and Windows 10</li>
  <li>I can still run the application and it does work. </li>
  </ul>
  
  <p>Thanks in advance.</p>