Closed Jak3b0 closed 10 years ago
So without BMVC you do not get this error?
No... The error comes from your DLL when the BeginForm is called.
Tell me if you want me to test more things...
Jacques On Oct 19, 2013 4:56 PM, "Dmitry A. Efimenko" notifications@github.com wrote:
So without BMVC you do not get this error?
— Reply to this email directly or view it on GitHubhttps://github.com/DmitryEfimenko/TwitterBootstrapMvc/issues/124#issuecomment-26658684 .
I just made a test project. I created an empty MVC project, added the TwitterBootstrap MVC Nuget package and created a HomeController with an Index view. I then put a Begin( new Form() )
in the view and when I run the app, I get the following exception.
System.IO.FileLoadException was unhandled by user code HResult=-2146234304 Message=Could not load file or assembly 'System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) Source=TwitterBootstrapMVC FileName=System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 FusionLog==== Pre-bind state information === LOG: DisplayName = System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 (Fully-specified) LOG: Appbase = file:///D:/Programming/Temp/WebApplication5/WebApplication5/ LOG: Initial PrivatePath = D:\Programming\Temp\WebApplication5\WebApplication5\bin
LOG: This bind starts in default load context. LOG: Using application configuration file: D:\Programming\Temp\WebApplication5\WebApplication5\web.config LOG: Using host configuration file: C:\Users\jacqu_000\Documents\IISExpress\config\aspnet.config LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config. LOG: Post-policy reference: System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 LOG: Attempting download of new URL file:///C:/Users/jacqu_000/AppData/Local/Temp/Temporary ASP.NET Files/root/d7223504/93493b0d/System.Web.Mvc.DLL. LOG: Attempting download of new URL file:///C:/Users/jacqu_000/AppData/Local/Temp/Temporary ASP.NET Files/root/d7223504/93493b0d/System.Web.Mvc/System.Web.Mvc.DLL. LOG: Attempting download of new URL file:///D:/Programming/Temp/WebApplication5/WebApplication5/bin/System.Web.Mvc.DLL. WRN: Comparing the assembly name resulted in the mismatch: Major Version ERR: Failed to complete setup of assembly (hr = 0x80131040). Probing terminated.
StackTrace:
at TwitterBootstrapMVC.Controls.FormBuilder1..ctor(HtmlHelper
1 htmlHelper, Form form)
at TwitterBootstrapMVC.BootstrapMethods.V3.Bootstrap1.Begin(Form form) at ASP._Page_Views_Home_Index_cshtml.Execute() in d:\Programming\Temp\WebApplication5\WebApplication5\Views\Home\Index.cshtml:line 8 at System.Web.WebPages.WebPageBase.ExecutePageHierarchy() at System.Web.Mvc.WebViewPage.ExecutePageHierarchy() at System.Web.WebPages.StartPage.RunPage() at System.Web.WebPages.StartPage.ExecutePageHierarchy() at System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) at System.Web.Mvc.RazorView.RenderView(ViewContext viewContext, TextWriter writer, Object instance) at System.Web.Mvc.BuildManagerCompiledView.Render(ViewContext viewContext, TextWriter writer) at System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context) at System.Web.Mvc.ControllerActionInvoker.InvokeActionResult(ControllerContext controllerContext, ActionResult actionResult) at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList
1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult)
at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult)
InnerException:
I think the exception does not have anything to do with the version of Visual Studio.
BMVC has system.web.mvc
referenced of version 4.0. Most likely your project is referencing system.web.mvc
of version 3.0 and that results in the conflict. Check if this is the case and if it is, see if you can upgrade it.
Your right. I was having other issues related to incorrect version of DLL and I had to add a binding redirect in the web.config to fix it. It also fixed the issue I was having with BMVC.
I was actually going to keep you posted on this. :)
Thanks!
Jacques On Oct 20, 2013 4:21 PM, "Dmitry A. Efimenko" notifications@github.com wrote:
I think the exception does not have anything to do with the version of Visual Studio. BMVC has system.web.mvc referenced of version 4.0. Most likely your project is referencing system.web.mvc of version 3.0 and that results in the conflict. Check if this is the case and if it is, see if you can upgrade it.
— Reply to this email directly or view it on GitHubhttps://github.com/DmitryEfimenko/TwitterBootstrapMvc/issues/124#issuecomment-26681654 .
Glad this worked out. Closing the issue.
Hi,
I just reinstalled my computer and I only installed VS2013 on it. When I use BMVC in my project, I get an exception stating that System.Web.Mvc version 3.0 cannot be found.
I know that with VS2012, both version (3.0 and 4.0) were installed but MS seem to have removed version 3.0 from VS2013.
Thank you!