Getting error: CS1061

Refer to Good and full implementation of RSS feeds in ASP.net MVC

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=" with "System.Web.Mvc, Version="

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 to _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'.


  • How To retrieve a control in a Master Page from Content Page
  • Synchronous XHR deprecation
  • EntityFramework enable-migrations ArgumentException
  • Custom Animation Object for Transition in Android?
  • Sitecore using Glass mapper and MVC
  • UITableView Multiselect in MonoTouch
  • Play HTML audio in Internet Explorer?
  • ViewData, ViewBag and TempData violates MVC? [closed]
  • Getting EOFError along with exceptions when using ftplib
  • How to open multiple instances of a program in Linux
  • Regex for URL rewrite with optional query string parameters
  • Efficient algorithm to find additions and removals from 2 collections
  • What is corresponding c++ data type to SQL numeric(18,0) data type?
  • Other than Linq to SQL does anything else consume INotifyPropertyChanging?
  • KnockoutObservableArray with typed elements in TypeScript
  • Switch to popup in python using selenium
  • NUnit 3.0 TestCase const custom object arguments
  • What does 'Language neutral' mean with regard to MAKELANGID?
  • Android activity accessing service's static reference before the service is ready
  • Switching to Release Build causes runtime error in Web Reference
  • R - Combining Columns to String Based on Logical Match
  • Read text file and split every line in MSBuild
  • htaccess rewriting URLs with multiple forward slashes
  • Display Images one by one with next and previous functionality
  • How to make Safari send if-modified-since header?
  • Web-crawler for facebook in python
  • Return words with double consecutive letters
  • How to pass list parameters for each object using Spring MVC?
  • how to add data labels for bar graph in matlab
  • Cannot Parse HTML Data Using Android / JSOUP
  • A cron job substitute?
  • How get height of the a view with gone visibility and height defined as wrap_content in xml?
  • Getting Messege Twice Using IMvxMessenger
  • Setting background image for body element in xhtml (for different monitors and resolutions)
  • JaxB to read class hierarchy
  • costura.fody for a dll that references another dll
  • Observable and ngFor in Angular 2
  • UserPrincipal.Current returns apppool on IIS
  • java string with new operator and a literal
  • How to load view controller without button in storyboard?