5

I'm using VS2010 SP1, MVC3 and ReSharper 6.1.

In one of my projects I have following issue().

Cannot resolve symbol 'ViewBag'

I have this only in my Controllers.

enter image description here

In Views it works fine.

enter image description here

I have check similar issue and try suggested solution but it didn't work.

Can anyone please help me with this.

Community
  • 1
  • 1
davit_gri
  • 130
  • 1
  • 8

2 Answers2

5

Make sure that your Controller is derived as

public class YourController : Controller

Ganesh Todkar
  • 507
  • 5
  • 12
1

Make sure that you have a right MVC configuration. Ensure you have right config value with this tool http://blogs.msdn.com/b/marcinon/archive/2011/01/13/mvc-3-project-upgrade-tool.aspx

Bishnu Paudel
  • 2,083
  • 1
  • 21
  • 39