The Type or namespace RssNews cannot be found

20 Views Asked by At

I am trying to restore an Umbraco site that was developed by someone else.

While trying to restore the project in Visual Studio, I was given access to the project source (even though outdated) as well as the compiled and remaining assets of the live site environment.

I merged the contents, adding to the Umbraco folder of the project the assets from the live environment.

When I try to compile the project in Visual Studio, I get an error regarding a single class, and I am trying to figure out where that came from. There are actually 2 errors in this page, and I am unsure if they are related.

The first one was the lack of a reference to UmbracoModules.Objects

However, this import was not being used (greyed out in the .cshtml file) so I just removed it.

The second error is

Here is a snippet of the offending code (List<RssNews> newsFeed):

using (var reader = new StreamReader(response.GetResponseStream()))
{
    var feedContents = reader.ReadToEnd();

    XDocument document = XDocument.Parse(feedContents);

    List<RssNews> newsFeed = (from descendant in document.Descendants("item")
                              select new RssNews()
                              {
                                  Description = WebUtility.HtmlDecode(descendant.Element("description").Value),
                                  Title = WebUtility.HtmlDecode(descendant.Element("title").Value),
                                  PublicationDate = descendant.Element("pubDate").Value,
                                  Link = descendant.Element("link").Value
                              }).ToList();

Where the hell should I get the reference to that from? I have been searching google but could not find where that class exists.

0

There are 0 best solutions below