Reputation: 28807
After adding MVC MiniProfiler to my ASP.NET MVC 4 project, it complains about requiring System.Web.Mvc 3.0.0.0
.
Is there any way to use MiniProfiler with ASP.NET MVC 4?
The following assembly redirect is already defined in web.config
:
<dependentAssembly>
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0" />
</dependentAssembly>
Upvotes: 14
Views: 2677
Reputation: 8953
What setting do you have for MvcBuildViews
in your project file? If your build error message is whingeing about a view try setting MvcBuildViews
to false to get you through the compilation stage, then the binding redirect to MVC 4 should likely work as expected at run time.
BTW, to edit the MvcBuildViews
setting you'll have to unload the project and edit the .proj file direct, you can't change this setting via the project settings screen in VS.
Upvotes: 1
Reputation: 18877
I just created a new asp.net mvc 4 project and used nuget to grab the latest miniprofiler package. It started up just fine. Have you tried this? If you are using nuget, perhaps you should try to remove the mini profiler and then test, then add it back.
On difference in my project however is that my assemblyIdentity
line includes a culture:
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" culture="neutral" />
Upvotes: 2
Reputation: 53183
Have you tried adding an assembly binding redirect for System.Web.Mvc
?
Upvotes: 0