maartenba / MvcSiteMapProvider

An ASP.NET MVC SiteMapProvider implementation for the ASP.NET MVC framework.
Microsoft Public License
539 stars 218 forks source link

Installed MVC5 package and am getting Cannot resolve symbol DefaultSiteMapProvider #362

Closed natiki closed 10 years ago

natiki commented 10 years ago

Hi,

I have a new MVC5 project to which I have just added MVCSiteMapProvider. The project is a new one that has not used MvcSiteMapProvider before.

Interestingly the web.config sitemap node was not added so I added this myself. However I am now getting the error:

Cannot resolve symbol DefaultSiteMapProvider

This is similair to https://github.com/maartenba/MvcSiteMapProvider/issues/329 but in my case this is not an upgrade.

So what do I need to do to resolve the issue of being unable to resolve DefaultSiteMapProvider?

image

NightOwl888 commented 10 years ago

There is no type named DefaultSiteMapProvider in v4, and you should not be configuring the <sitemap> node in your web.config file because MvcSiteMapProvider v4 is not based on Microsoft's sitemap provider model.

The NuGet package (MvcSiteMapProvider.MVC5) installs all of the configuration that is necessary to wire up MvcSiteMapProvider. The only thing you need to do is add HTML helpers to your application and configure nodes (unless you want to do something really advanced).

https://github.com/maartenba/MvcSiteMapProvider/wiki/Configuring-MvcSiteMapProvider https://github.com/maartenba/MvcSiteMapProvider/wiki/Upgrading-from-v3-to-v4 http://www.shiningtreasures.com/post/2013/08/07/MvcSiteMapProvider-40-a-test-drive