5

Hi i receive this error

Sharp architecture 2.0 works on mvc 3 the error is

Entry point was not found

I have both mvc 3 and mvc 4 installed on my Pc,as i un-install mvc 4 projects Work Correctly,but is there any one other way that can work i have tried to change assembly settings as well in web.config

Here is the Stack trace

[EntryPointNotFoundException: Entry point was not found.]
System.Web.Mvc.MvcRouteHandler.GetSessionStateBehavior(RequestContext requestContext) +159
System.Web.Mvc.MvcRouteHandler.GetHttpHandler(RequestContext requestContext) +41
System.Web.Mvc.MvcRouteHandler.System.Web.Routing.IRouteHandler.GetHttpHandler(RequestContext requestContext) +10
System.Web.Routing.UrlRoutingModule.PostResolveRequestCache(HttpContextBase context) +9024264
System.Web.Routing.UrlRoutingModule.OnApplicationPostResolveRequestCache(Object sender, EventArgs e) +86
System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +148 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75

abatishchev
  • 98,240
  • 88
  • 296
  • 433
  • I think that's a regasm issue – Joe Apr 10 '12 at 15:52
  • I have MVC4 installed and could not reproduce the problem :S First thing I would try is add an assembly binding in web.config from mvc 1-4 to go to mvc3. Is there a stack trace? maybe it will give us more detail about the problem. – Seif Attar Apr 10 '12 at 22:52
  • [As Refrence to This Thread](http://stackoverflow.com/questions/3508966/xval-and-asp-net-mvc-2-addmodelstateerrors-problem) , i tried to change assembly but its not working still get the same error of entry point not found – Muhammad Faizan Khatri Apr 11 '12 at 07:29

4 Answers4

4

Thanks , Resolved had to remove all Previous refrences of mvc3 and re-refrence it again from /ProgramFiles/ASP.NET MVC 3/System.Web.Mvc.dll as on default it shows assemblies of only mvc4

  • 1
    migrated my solution to vs2012 and automagically the System.Web.Mvc.dll from MVC 4 was referenced. Revert those references did the job for me. – Renato Heeb Oct 10 '12 at 09:23
3

There is another way to resolve the "Entry point not found exception", you can add the following section in your

<runtime>
        <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
            <dependentAssembly>
                <assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
                <bindingRedirect oldVersion="1.0.0.0-4.0.0.0" newVersion="4.0.0.0" />
            </dependentAssembly>
        </assemblyBinding>
    </runtime>

This will instruct the runtime to use MVC4 binaries. We are using this in our projects without any exceptions.

Sudhanshu Mishra
  • 6,523
  • 2
  • 59
  • 76
0

I had a similar error message and it was caused by the fact that I used nuget to get version 5.0.0.0 of System.Web.Mvc. I rolled back to an earlier version via package manager console like so: Install-Package Microsoft.AspNet.Mvc -Version 4.0.30506 and that solved the issue.

MrBoJangles
  • 12,127
  • 17
  • 61
  • 79
0

I was having the same problem, in Visual Studio you can fix this error with the Package Manager Console and the command:

update-package
Mr. DMX
  • 653
  • 2
  • 9
  • 20