Check the answer of Trevor de Koekkoek.
I am getting this error CS1061: 'object' does not contain a definition for 'Items' and no extension method 'Items' accepting a first argument of type 'object' could be found (are you missing a using directive or an assembly reference?)
Do you get that error in the view ? In that case, you need to make your view strongly typed with SyndicationFeed as your model.
This means you should declare your View (.aspx) as something along the lines of:
<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<System.ServiceModel.Syndication.SyndicationFeed>" %>
This tells the view that the type of ViewData.Model is SyndicationFeed, so that you can access its properties and methods without casting.
I had this problem. My fix was to search and replace all instances of "System.Web.Mvc, Version=184.108.40.206" with "System.Web.Mvc, Version=220.127.116.11"
There are multiple web.config files.
You may get this error if you have an MVC 2 project that at one point was an MVC 3 project.
This happened to me when I had to revert back to an MVC 2 version of an MVC 3 project. I had shelved my MVC 3.0 changes and brached the code in TFS (to make hotfixes to the MVC 2 version), but had leftover web.config files for my Razor Views. This was confusing the compiler.
<li>Search for web.config in your directory structure (in Windows explorer or Visual Studio's 'find in files'). Don't do 'Search in Solution' because you may have web.config files not present in the project. IIS will still load them even if they're not in your solution. Rename any web.config files containing
18.104.22.168to _web.config and it will stop looking. Then restart IIS.</li> </ul>
This should fix the problem.
If you still have the problem you may need to close all Visual Studio instances, stop IIS and delete temporary internet files. You can get the path to this directory by clicking the 'Show Detailed Compiler Output' link on the error page and searching for 'temporary'.