Reputation: 130
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.
In Views it works fine.
I have check similar issue and try suggested solution but it didn't work.
Can anyone please help me with this.
Upvotes: 5
Views: 6619
Reputation: 537
Make sure that your Controller is derived as
public class YourController : Controller
Upvotes: 5
Reputation: 2079
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
Upvotes: 1