入口点未发现异常 [英] Entry point was not found exception

查看:882
本文介绍了入口点未发现异常的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经安装了 vs2012(11.0.50727.1)

我打开了一个新的 MVC4与.NET 4.5 解决方案,结果
我创建了一个简单的的HomeController 和我一直想在本地启动它,我收到这个非常奇怪的错误:结果
如何解决呢?这是什么错误以及它为什么会发生?

感谢您提前为您的帮助。

 在'/'应用程序的服务器错误。
入口点没有被发现。
说明:执行当前Web请求的执行过程中发生未处理的异常。请查看有关错误的详细信息的堆栈跟踪以及它起源于code。异常详细信息:System.EntryPointNotFoundException:入口点没有被发现。源错误:当前Web请求的执行过程中生成了未处理的异常。有关异常的来源和位置信息可以使用异常堆栈跟踪下面确定。堆栈跟踪:
[EntryPointNotFoundException:未找到入口点。]
   System.Web.Mvc.IDependencyResolver.GetService(类型的serviceType)+ 0
   System.Web.Mvc.DependencyResolverExtensions.GetService(的IDependencyResolver解析器)+56
   System.Web.Mvc.SingleServiceResolver`1.GetValueFromResolver()+44
   System.Lazy`1.CreateValue()180
   System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()+22
   System.Lazy`1.get_Value()10749357
   System.Web.Mvc.SingleServiceResolver`1.get_Current()+15
   System.Web.Mvc.MvcRouteHandler.GetSessionStateBehavior(RequestContext的的RequestContext)+121
   System.Web.Mvc.MvcRouteHandler.GetHttpHandler(RequestContext的RequestContext的)+33
   System.Web.Mvc.MvcRouteHandler.System.Web.Routing.IRouteHandler.GetHttpHandler(RequestContext的RequestContext的)+10
   System.Web.Routing.UrlRoutingModule.PostResolveRequestCache(HttpContextBase上下文)9709656
   System.Web.Routing.UrlRoutingModule.OnApplicationPostResolveRequestCache(对象发件人,EventArgs的发送)+82
   System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()+136
   System.Web.HttpApplication.ExecuteStep(IExecutionStep一步,布尔和放大器; completedSynchronously)+69
版本信息:Microsoft .NET Framework版本:4.0.30319; ASP.NET版本:4.0.30319.17929


解决方案

当你切换你的项目从MVC3到MVC4忘记改变System.Web.WebPages.Razor,版本= 1.0.0.0来出现同样的错误System.Web.WebPages.Razor,版本= 2.0.0.0,在web.config中。

I have installed vs2012 (11.0.50727.1),
I opened a new MVC4 with .NET 4.5 solution,
i create a simple HomeController and as I've wanted to start it locally, i have received this very strange error:
How can resolve it? What is this error and why it's happens???

Thank you in advance, for any of your help.

    Server Error in '/' Application.
Entry point was not found.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.EntryPointNotFoundException: Entry point was not found.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:


[EntryPointNotFoundException: Entry point was not found.]
   System.Web.Mvc.IDependencyResolver.GetService(Type serviceType) +0
   System.Web.Mvc.DependencyResolverExtensions.GetService(IDependencyResolver resolver) +56
   System.Web.Mvc.SingleServiceResolver`1.GetValueFromResolver() +44
   System.Lazy`1.CreateValue() +180
   System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() +22
   System.Lazy`1.get_Value() +10749357
   System.Web.Mvc.SingleServiceResolver`1.get_Current() +15
   System.Web.Mvc.MvcRouteHandler.GetSessionStateBehavior(RequestContext requestContext) +121
   System.Web.Mvc.MvcRouteHandler.GetHttpHandler(RequestContext requestContext) +33
   System.Web.Mvc.MvcRouteHandler.System.Web.Routing.IRouteHandler.GetHttpHandler(RequestContext requestContext) +10
   System.Web.Routing.UrlRoutingModule.PostResolveRequestCache(HttpContextBase context) +9709656
   System.Web.Routing.UrlRoutingModule.OnApplicationPostResolveRequestCache(Object sender, EventArgs e) +82
   System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +136
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +69


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.17929 

解决方案

The same error appears when you switch you project from MVC3 to MVC4 and forget to change "System.Web.WebPages.Razor, Version=1.0.0.0" to "System.Web.WebPages.Razor, Version=2.0.0.0" in the web.config.

这篇关于入口点未发现异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆