Skip to content

Commit

Permalink
Fixed install.ps1 in MvcSiteMapProvider.Web to install the system.web…
Browse files Browse the repository at this point in the history
…Server config sections (#124).
  • Loading branch information
NightOwl888 committed Oct 31, 2013
1 parent fda3c1b commit f6e8416
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion nuget/mvcsitemapprovider.web/tools/install.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -301,12 +301,17 @@ if ([string](InferPreferredViewEngine) -eq 'aspx') {
(Get-Project).ProjectItems | ?{ $_.Name -eq "Views" } | %{ $_.ProjectItems | ?{ $_.Name -eq "Shared" } } | %{ $_.ProjectItems | ?{ $_.Name -eq "DisplayTemplates" } } | %{ $_.ProjectItems | ?{ $_.Name -eq "MenuHelperModel.ascx" -or $_.Name -eq "SiteMapHelperModel.ascx" -or $_.Name -eq "SiteMapNodeModel.ascx" -or $_.Name -eq "SiteMapNodeModelList.ascx" -or $_.Name -eq "SiteMapPathHelperModel.ascx" -or $_.Name -eq "SiteMapTitleHelperModel.ascx" -or $_.Name -eq "CanonicalHelperModel.ascx" -or $_.Name -eq "MetaRobotsHelperModel.ascx" } } | %{ $_.Delete() }
}

# If MVC 4, install web.config section to fix 404 not found on sitemap.xml (#124)
# If MVC 4 or higher, install web.config section to fix 404 not found on sitemap.xml (#124)
if ($project.Object.References.Find("System.Web.Mvc").Version -eq "4.0.0.0")
{
Write-Host "Detected MVC 4"
Add-MVC4-Config-Sections
}
if ($project.Object.References.Find("System.Web.Mvc").Version -eq "5.0.0.0")
{
Write-Host "Detected MVC 5"
Add-MVC4-Config-Sections
}

# Fixup the web.config files
Add-Or-Update-AppSettings
Expand Down

0 comments on commit f6e8416

Please sign in to comment.