From 874258c5f8fe536d62889ff6fcdd14e4b5a44911 Mon Sep 17 00:00:00 2001 From: Shad Storhaug Date: Thu, 21 Aug 2014 23:51:36 +0700 Subject: [PATCH] Fixes #342, removed direct dependency on WebActivator.dll from MvcSiteMapProvider.dll. The WebActivator dependency was moved to a new library MvcSiteMapProvider.WebActivator.dll that is deployed as part of the optional MvcSiteMapProvider.MVCx NuGet package. --- build/runbuild.ps1 | 70 +++++++++++----- .../MvcSiteMapProvider.Core.Shared.nuspec | 2 - .../MvcSiteMapProvider.Shared.nuspec | 2 + .../MvcSiteMapProvider_Temp_ReadMe.txt | 1 - nuget/mvcsitemapprovider/tools/install.ps1 | 3 - .../CodeAsConfiguration/Shared/Shared.csproj | 4 - .../MvcMenuTest/MvcMenuTest.csproj | 4 + src/MvcSiteMapProvider/MvcMenuTest/Web.config | 8 +- .../MvcMusicStore/MvcMusicStore.csproj | 4 + .../Bootstrapper.cs | 4 + .../MvcSiteMapProvider.WebActivator.csproj | 79 +++++++++++++++++++ .../Properties/AssemblyInfo.cs | 11 +++ .../packages.config | 5 ++ src/MvcSiteMapProvider/MvcSiteMapProvider.sln | 7 ++ .../MvcSiteMapProvider/DI/Composer.cs | 5 -- .../MvcSiteMapProvider.csproj | 7 +- .../Resources/Messages.Designer.cs | 10 ++- .../Resources/Messages.resx | 8 +- .../MvcSiteMapProvider/packages.config | 1 - 19 files changed, 188 insertions(+), 47 deletions(-) delete mode 100644 nuget/mvcsitemapprovider/content/MvcSiteMapProvider_Temp_ReadMe.txt create mode 100644 src/MvcSiteMapProvider/MvcSiteMapProvider.WebActivator/Bootstrapper.cs create mode 100644 src/MvcSiteMapProvider/MvcSiteMapProvider.WebActivator/MvcSiteMapProvider.WebActivator.csproj create mode 100644 src/MvcSiteMapProvider/MvcSiteMapProvider.WebActivator/Properties/AssemblyInfo.cs create mode 100644 src/MvcSiteMapProvider/MvcSiteMapProvider.WebActivator/packages.config diff --git a/build/runbuild.ps1 b/build/runbuild.ps1 index c2f7258e..91d01794 100644 --- a/build/runbuild.ps1 +++ b/build/runbuild.ps1 @@ -52,10 +52,10 @@ task Compile -depends Clean, Init, Restore -description "This task compiles the Write-Host "Compiling..." -ForegroundColor Green - Build-MvcSiteMapProvider-Core-Versions ("net35", "net40", "net45") -mvc_version "2" - Build-MvcSiteMapProvider-Core-Versions ("net40", "net45") -mvc_version "3" - Build-MvcSiteMapProvider-Core-Versions ("net40", "net45") -mvc_version "4" - Build-MvcSiteMapProvider-Core-Versions ("net45") -mvc_version "5" + Build-MvcSiteMapProvider-Versions ("net35", "net40", "net45") -mvc_version "2" + Build-MvcSiteMapProvider-Versions ("net40", "net45") -mvc_version "3" + Build-MvcSiteMapProvider-Versions ("net40", "net45") -mvc_version "4" + Build-MvcSiteMapProvider-Versions ("net45") -mvc_version "5" } task NuGet -depends Compile -description "This tasks makes creates the NuGet packages" { @@ -131,28 +131,21 @@ function Tokenize-Namespaces ([string] $source) { } | Set-Content $source -Force } -function Build-MvcSiteMapProvider-Core-Versions ([string[]] $net_versions, [string] $mvc_version) { +function Build-MvcSiteMapProvider-Versions ([string[]] $net_versions, [string] $mvc_version) { #create the build for each version of the framework foreach ($net_version in $net_versions) { - Build-MvcSiteMapProvider-Core-Version $net_version $mvc_version + Build-MvcSiteMapProvider-Version $net_version $mvc_version + Build-MvcSiteMapProvider-WebActivator-Version $net_version $mvc_version } } -function Build-MvcSiteMapProvider-Core-Version ([string] $net_version, [string] $mvc_version) { +function Build-MvcSiteMapProvider-Version ([string] $net_version, [string] $mvc_version) { $net_version_upper = $net_version.toUpper() Write-Host "Compiling MvcSiteMapProvider for $net_version_upper, MVC$mvc_version" -ForegroundColor Blue $outdir = "$build_directory\mvcsitemapprovider.mvc$mvc_version.core\lib\$net_version\" $documentation_file = $outdir + "MvcSiteMapProvider.xml" - - if ($net_version -eq "net35") { - $targetFramework = "v3.5" - } - if ($net_version -eq "net40") { - $targetFramework = "v4.0" - } - if ($net_version -eq "net45") { - $targetFramework = "v4.5" - } + $targetFramework = Get-TargetFramework-Version $net_version + Write-Host "Targeting framework $targetFramework" -ForegroundColor Cyan exec { msbuild $source_directory\MvcSiteMapProvider\MvcSiteMapProvider.csproj ` @@ -163,13 +156,38 @@ function Build-MvcSiteMapProvider-Core-Version ([string] $net_version, [string] /property:WarningLevel=3 ` /property:DefineConstants=`" MVC$mvc_version`;$net_version_upper`" ` /property:TargetFrameworkVersion=$targetFramework ` - /property:EnableNuGetPackageRestore=true ` /property:DocumentationFile=`"$documentation_file`" } - + dir $outdir | ?{ -not($_.Name -match 'MvcSiteMapProvider') } | %{ del $_.FullName } } +function Build-MvcSiteMapProvider-WebActivator-Version ([string] $net_version, [string] $mvc_version) { + $net_version_upper = $net_version.toUpper() + Write-Host "Compiling MvcSiteMapProvider.WebActivator for $net_version_upper, MVC$mvc_version" -ForegroundColor Blue + $outdir = "$build_directory\mvcsitemapprovider.mvc$mvc_version\lib\$net_version\" + $documentation_file = $outdir + "MvcSiteMapProvider.WebActivator.xml" + $targetFramework = Get-TargetFramework-Version $net_version + Write-Host "Targeting framework $targetFramework" -ForegroundColor Cyan + + #Create a webactivator for all versions except .NET 3.5 + if ($net_version -ne "net35") { + exec { + msbuild $source_directory\MvcSiteMapProvider.WebActivator\MvcSiteMapProvider.WebActivator.csproj ` + /property:outdir=$outdir ` + /verbosity:quiet ` + /property:Configuration=$configuration ` + "/t:Clean;Rebuild" ` + /property:WarningLevel=3 ` + /property:DefineConstants=`" MVC$mvc_version`;$net_version_upper`" ` + /property:TargetFrameworkVersion=$targetFramework ` + /property:DocumentationFile=`"$documentation_file`" + } + + dir $outdir | ?{ -not($_.Name -match 'MvcSiteMapProvider.WebActivator') } | %{ del $_.FullName } + } +} + function Create-MvcSiteMapProvider-Legacy-Package ([string] $mvc_version) { $output_nuspec_file = "$build_directory\mvcsitemapprovider\mvcsitemapprovider.nuspec" Ensure-Directory-Exists $output_nuspec_file @@ -418,4 +436,18 @@ function Get-Prerelease-Text { return ".0$prerelease" } return "" +} + +function Get-TargetFramework-Version ([string] $net_version) { + $targetFramework = "v4.0" + if ($net_version -eq "net35") { + $targetFramework = "v3.5" + } + if ($net_version -eq "net40") { + $targetFramework = "v4.0" + } + if ($net_version -eq "net45") { + $targetFramework = "v4.5" + } + return $targetFramework } \ No newline at end of file diff --git a/nuget/mvcsitemapprovider.core/MvcSiteMapProvider.Core.Shared.nuspec b/nuget/mvcsitemapprovider.core/MvcSiteMapProvider.Core.Shared.nuspec index c64780c0..beff8c7f 100644 --- a/nuget/mvcsitemapprovider.core/MvcSiteMapProvider.Core.Shared.nuspec +++ b/nuget/mvcsitemapprovider.core/MvcSiteMapProvider.Core.Shared.nuspec @@ -17,10 +17,8 @@ - - diff --git a/nuget/mvcsitemapprovider/MvcSiteMapProvider.Shared.nuspec b/nuget/mvcsitemapprovider/MvcSiteMapProvider.Shared.nuspec index 3af52262..265ba2f0 100644 --- a/nuget/mvcsitemapprovider/MvcSiteMapProvider.Shared.nuspec +++ b/nuget/mvcsitemapprovider/MvcSiteMapProvider.Shared.nuspec @@ -23,11 +23,13 @@ + + diff --git a/nuget/mvcsitemapprovider/content/MvcSiteMapProvider_Temp_ReadMe.txt b/nuget/mvcsitemapprovider/content/MvcSiteMapProvider_Temp_ReadMe.txt deleted file mode 100644 index 19b1d65d..00000000 --- a/nuget/mvcsitemapprovider/content/MvcSiteMapProvider_Temp_ReadMe.txt +++ /dev/null @@ -1 +0,0 @@ -This is a dummy file that is required to get install.ps1 to run. \ No newline at end of file diff --git a/nuget/mvcsitemapprovider/tools/install.ps1 b/nuget/mvcsitemapprovider/tools/install.ps1 index 25bdc0a7..90987558 100644 --- a/nuget/mvcsitemapprovider/tools/install.ps1 +++ b/nuget/mvcsitemapprovider/tools/install.ps1 @@ -1,7 +1,4 @@ # install.ps1 param($rootPath, $toolsPath, $package, $project) -#Delete the dummy readme file -(Get-Project).ProjectItems | ?{ $_.Name -eq "MvcSiteMapProvider_Temp_ReadMe.txt" } | %{ $_.Delete() } - $DTE.ItemOperations.Navigate("http://maartenba.github.io/MvcSiteMapProvider/getting-started.html", $DTE.vsNavigateOptions.vsNavigateOptionsNewWindow) diff --git a/src/MvcSiteMapProvider/CodeAsConfiguration/Shared/Shared.csproj b/src/MvcSiteMapProvider/CodeAsConfiguration/Shared/Shared.csproj index 9fd0fd9a..2308a4fa 100644 --- a/src/MvcSiteMapProvider/CodeAsConfiguration/Shared/Shared.csproj +++ b/src/MvcSiteMapProvider/CodeAsConfiguration/Shared/Shared.csproj @@ -34,10 +34,6 @@ false - - True - ..\..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll - diff --git a/src/MvcSiteMapProvider/MvcMenuTest/MvcMenuTest.csproj b/src/MvcSiteMapProvider/MvcMenuTest/MvcMenuTest.csproj index d0c14fb6..59503efc 100644 --- a/src/MvcSiteMapProvider/MvcMenuTest/MvcMenuTest.csproj +++ b/src/MvcSiteMapProvider/MvcMenuTest/MvcMenuTest.csproj @@ -332,6 +332,10 @@ + + {312503cd-bfda-4a09-8299-2b0c09a1239f} + MvcSiteMapProvider.WebActivator + {8625fb9c-be71-41ef-993d-3c05ea11def4} MvcSiteMapProvider diff --git a/src/MvcSiteMapProvider/MvcMenuTest/Web.config b/src/MvcSiteMapProvider/MvcMenuTest/Web.config index 6a3d36a0..6c58d752 100644 --- a/src/MvcSiteMapProvider/MvcMenuTest/Web.config +++ b/src/MvcSiteMapProvider/MvcMenuTest/Web.config @@ -60,11 +60,11 @@ - + - + @@ -72,7 +72,7 @@ - + @@ -80,7 +80,7 @@ - + diff --git a/src/MvcSiteMapProvider/MvcMusicStore/MvcMusicStore.csproj b/src/MvcSiteMapProvider/MvcMusicStore/MvcMusicStore.csproj index b2152847..45313bf3 100644 --- a/src/MvcSiteMapProvider/MvcMusicStore/MvcMusicStore.csproj +++ b/src/MvcSiteMapProvider/MvcMusicStore/MvcMusicStore.csproj @@ -406,6 +406,10 @@ configured in the compilation constants --> + + {312503cd-bfda-4a09-8299-2b0c09a1239f} + MvcSiteMapProvider.WebActivator + {8625FB9C-BE71-41EF-993D-3C05EA11DEF4} MvcSiteMapProvider diff --git a/src/MvcSiteMapProvider/MvcSiteMapProvider.WebActivator/Bootstrapper.cs b/src/MvcSiteMapProvider/MvcSiteMapProvider.WebActivator/Bootstrapper.cs new file mode 100644 index 00000000..a5a02a94 --- /dev/null +++ b/src/MvcSiteMapProvider/MvcSiteMapProvider.WebActivator/Bootstrapper.cs @@ -0,0 +1,4 @@ +using System; + +// Startup using WebActivatorEx (which allows multiple things to be started up, as opposed to the System.Web version). +[assembly: WebActivatorEx.PostApplicationStartMethod(typeof(MvcSiteMapProvider.DI.Composer), "Compose")] diff --git a/src/MvcSiteMapProvider/MvcSiteMapProvider.WebActivator/MvcSiteMapProvider.WebActivator.csproj b/src/MvcSiteMapProvider/MvcSiteMapProvider.WebActivator/MvcSiteMapProvider.WebActivator.csproj new file mode 100644 index 00000000..d59e1cf7 --- /dev/null +++ b/src/MvcSiteMapProvider/MvcSiteMapProvider.WebActivator/MvcSiteMapProvider.WebActivator.csproj @@ -0,0 +1,79 @@ + + + + + Debug + AnyCPU + {312503CD-BFDA-4A09-8299-2B0C09A1239F} + Library + Properties + MvcSiteMapProvider.WebActivator + MvcSiteMapProvider.WebActivator + v4.0 + 512 + + + + true + full + false + bin\Debug\ + NET40; + prompt + 4 + + + pdbonly + true + bin\Release\ + NET40; + prompt + 4 + + + $(DefineConstants);$(TargetFrameworkVersion.Replace("v", "NET").Replace(".", "")); + $(DefineConstants.Remove($(DefineConstants.LastIndexOf(";NET"))));$(TargetFrameworkVersion.Replace("v", "NET").Replace(".", "")); + + + + True + ..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll + + + + + + + + + + + False + ..\packages\WebActivatorEx.2.0.1\lib\net40\WebActivatorEx.dll + + + + + Properties\CommonAssemblyInfo.cs + + + + + + + {8625fb9c-be71-41ef-993d-3c05ea11def4} + MvcSiteMapProvider + + + + + + + + \ No newline at end of file diff --git a/src/MvcSiteMapProvider/MvcSiteMapProvider.WebActivator/Properties/AssemblyInfo.cs b/src/MvcSiteMapProvider/MvcSiteMapProvider.WebActivator/Properties/AssemblyInfo.cs new file mode 100644 index 00000000..12eec855 --- /dev/null +++ b/src/MvcSiteMapProvider/MvcSiteMapProvider.WebActivator/Properties/AssemblyInfo.cs @@ -0,0 +1,11 @@ +using System; +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("MvcSiteMapProvider.WebActivator")] +[assembly: AssemblyDescription("Bootstrapper for MvcSiteMapProvider when installed in an ASP.NET client project.")] +[assembly: AssemblyProduct("MvcSiteMapProvider.WebActivator")] diff --git a/src/MvcSiteMapProvider/MvcSiteMapProvider.WebActivator/packages.config b/src/MvcSiteMapProvider/MvcSiteMapProvider.WebActivator/packages.config new file mode 100644 index 00000000..76a14e81 --- /dev/null +++ b/src/MvcSiteMapProvider/MvcSiteMapProvider.WebActivator/packages.config @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/src/MvcSiteMapProvider/MvcSiteMapProvider.sln b/src/MvcSiteMapProvider/MvcSiteMapProvider.sln index 6469691b..dd5117c8 100644 --- a/src/MvcSiteMapProvider/MvcSiteMapProvider.sln +++ b/src/MvcSiteMapProvider/MvcSiteMapProvider.sln @@ -46,6 +46,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SimpleInjector", "CodeAsCon EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MvcMenuTest", "MvcMenuTest\MvcMenuTest.csproj", "{36B7ABBC-F8D8-4BF1-9E47-31A0DA11B225}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MvcSiteMapProvider.WebActivator", "MvcSiteMapProvider.WebActivator\MvcSiteMapProvider.WebActivator.csproj", "{312503CD-BFDA-4A09-8299-2B0C09A1239F}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -92,6 +94,10 @@ Global {36B7ABBC-F8D8-4BF1-9E47-31A0DA11B225}.Debug|Any CPU.Build.0 = Debug|Any CPU {36B7ABBC-F8D8-4BF1-9E47-31A0DA11B225}.Release|Any CPU.ActiveCfg = Release|Any CPU {36B7ABBC-F8D8-4BF1-9E47-31A0DA11B225}.Release|Any CPU.Build.0 = Release|Any CPU + {312503CD-BFDA-4A09-8299-2B0C09A1239F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {312503CD-BFDA-4A09-8299-2B0C09A1239F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {312503CD-BFDA-4A09-8299-2B0C09A1239F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {312503CD-BFDA-4A09-8299-2B0C09A1239F}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -100,6 +106,7 @@ Global {C83FE52C-47DD-4433-B34E-9C9D72BBFFA1} = {0EC6B430-52BD-4514-9174-8BE70C3029E3} {36B7ABBC-F8D8-4BF1-9E47-31A0DA11B225} = {0EC6B430-52BD-4514-9174-8BE70C3029E3} {8625FB9C-BE71-41EF-993D-3C05EA11DEF4} = {EBBE2F83-8F97-4A25-BF8C-C6A43112926A} + {312503CD-BFDA-4A09-8299-2B0C09A1239F} = {EBBE2F83-8F97-4A25-BF8C-C6A43112926A} {406FDBF5-BD07-4BCD-8801-BDC3F22E152F} = {7DFCAC9C-4458-457F-9F1A-EA7637653D31} {7C763B28-50B2-4201-9BD0-659FC155E5F3} = {FAADDBE0-A4D5-4EEE-A924-FE2582D734A9} {2282E09D-96D4-4173-96CA-ED716B72AAB4} = {FAADDBE0-A4D5-4EEE-A924-FE2582D734A9} diff --git a/src/MvcSiteMapProvider/MvcSiteMapProvider/DI/Composer.cs b/src/MvcSiteMapProvider/MvcSiteMapProvider/DI/Composer.cs index 42cfce64..03f4a301 100644 --- a/src/MvcSiteMapProvider/MvcSiteMapProvider/DI/Composer.cs +++ b/src/MvcSiteMapProvider/MvcSiteMapProvider/DI/Composer.cs @@ -8,11 +8,6 @@ using System.Web.WebPages.Razor; #endif -#if !NET35 -// Startup using WebActivatorEx (which allows multiple things to be started up, as opposed to the System.Web version). - [assembly: WebActivatorEx.PostApplicationStartMethod(typeof(MvcSiteMapProvider.DI.Composer), "Compose")] -#endif - namespace MvcSiteMapProvider.DI { /// diff --git a/src/MvcSiteMapProvider/MvcSiteMapProvider/MvcSiteMapProvider.csproj b/src/MvcSiteMapProvider/MvcSiteMapProvider/MvcSiteMapProvider.csproj index 9996f9cf..410e1ed7 100644 --- a/src/MvcSiteMapProvider/MvcSiteMapProvider/MvcSiteMapProvider.csproj +++ b/src/MvcSiteMapProvider/MvcSiteMapProvider/MvcSiteMapProvider.csproj @@ -42,8 +42,8 @@ ..\Shared\MvcSiteMapProvider.snk - $(DefineConstants);$(TargetFrameworkVersion.Replace("v", "NET").Replace(".", "")) - $(DefineConstants.Remove($(DefineConstants.LastIndexOf(";NET"))));$(TargetFrameworkVersion.Replace("v", "NET").Replace(".", "")) + $(DefineConstants);$(TargetFrameworkVersion.Replace("v", "NET").Replace(".", "")); + $(DefineConstants.Remove($(DefineConstants.LastIndexOf(";NET"))));$(TargetFrameworkVersion.Replace("v", "NET").Replace(".", "")); @@ -97,9 +97,6 @@ True ..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll - - ..\packages\WebActivatorEx.2.0.1\lib\net40\WebActivatorEx.dll - diff --git a/src/MvcSiteMapProvider/MvcSiteMapProvider/Resources/Messages.Designer.cs b/src/MvcSiteMapProvider/MvcSiteMapProvider/Resources/Messages.Designer.cs index 29208bb6..1fdc4bb1 100644 --- a/src/MvcSiteMapProvider/MvcSiteMapProvider/Resources/Messages.Designer.cs +++ b/src/MvcSiteMapProvider/MvcSiteMapProvider/Resources/Messages.Designer.cs @@ -1,7 +1,7 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:4.0.30319.34011 +// Runtime Version:4.0.30319.34014 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -406,7 +406,13 @@ internal static string SiteMapLoaderAlreadySet { } /// - /// Looks up a localized string similar to The SiteMapLoader has not been initialized. You must set the SiteMaps.Loader property during Application_Start in Global.asax if the 'MvcSiteMapProvider_UseExternalDIContainer' setting is set to 'true' in the AppSettings section of web.config.. + /// Looks up a localized string similar to The SiteMapLoader has not been initialized. + /// + ///Check the 'MvcSiteMapProvider_UseExternalDIContainer' setting in the AppSettings section of web.config. + /// + ///If the setting is set to 'false', you will need to call the MvcSiteMapProvider.DI.Composer.Compose() method at the end of Application_Start in the Global.asax file. Alternatively, if you are using .NET 4.0 or higher you can install the MvcSiteMapProvider.MVCx NuGet package corresponding to your MVC version. + /// + ///If the setting is set to 'true', you must set [rest of string was truncated]";. /// internal static string SiteMapLoaderNotInitialized { get { diff --git a/src/MvcSiteMapProvider/MvcSiteMapProvider/Resources/Messages.resx b/src/MvcSiteMapProvider/MvcSiteMapProvider/Resources/Messages.resx index 537040af..251cc0a2 100644 --- a/src/MvcSiteMapProvider/MvcSiteMapProvider/Resources/Messages.resx +++ b/src/MvcSiteMapProvider/MvcSiteMapProvider/Resources/Messages.resx @@ -204,7 +204,13 @@ Make sure your configuration includes a root node by ensuring there is exactly 1 The builder set instance named '{0}' was not found. Check your DI configuration to ensure a builder set instance with this name exists. - The SiteMapLoader has not been initialized. You must set the SiteMaps.Loader property during Application_Start in Global.asax if the 'MvcSiteMapProvider_UseExternalDIContainer' setting is set to 'true' in the AppSettings section of web.config. + The SiteMapLoader has not been initialized. + +Check the 'MvcSiteMapProvider_UseExternalDIContainer' setting in the AppSettings section of web.config. + +If the setting is set to 'false', you will need to call the MvcSiteMapProvider.DI.Composer.Compose() method at the end of Application_Start in the Global.asax file. Alternatively, if you are using .NET 4.0 or higher you can install the MvcSiteMapProvider.MVCx NuGet package corresponding to your MVC version. + +If the setting is set to 'true', you must set the SiteMaps.Loader property during Application_Start in Global.asax to an instance of the built-in SiteMapLoader type or a custom ISiteMapLoader instance. This can be achieved most easily by using your external DI container. Field '{0}' was not found in Type '{1}'. diff --git a/src/MvcSiteMapProvider/MvcSiteMapProvider/packages.config b/src/MvcSiteMapProvider/MvcSiteMapProvider/packages.config index a9c8f3ab..adc38601 100644 --- a/src/MvcSiteMapProvider/MvcSiteMapProvider/packages.config +++ b/src/MvcSiteMapProvider/MvcSiteMapProvider/packages.config @@ -9,5 +9,4 @@ - \ No newline at end of file