Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/258.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/asp.net-mvc/15.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 未找到入口点。_C#_Asp.net Mvc_Asp.net Mvc 4 - Fatal编程技术网

C# 未找到入口点。

C# 未找到入口点。,c#,asp.net-mvc,asp.net-mvc-4,C#,Asp.net Mvc,Asp.net Mvc 4,我有一个ASP.NETMVC应用程序,分为两个项目。其中一个项目只是一个ASP.NETMVC项目,另一个项目是一个类库,我在其中放置了共享代码。类库正在使用RazorGenerator编译我的视图 在MVC应用程序中,我使用EmbeddedResourceVirtualPathProvider,以便访问添加在类库中的资源文件。我还使用oauth提供者登录到应用程序 当我试图启动我的应用程序时,我得到以下异常 [EntryPointNotFoundException: Entry point wa

我有一个ASP.NETMVC应用程序,分为两个项目。其中一个项目只是一个ASP.NETMVC项目,另一个项目是一个类库,我在其中放置了共享代码。类库正在使用RazorGenerator编译我的视图

在MVC应用程序中,我使用EmbeddedResourceVirtualPathProvider,以便访问添加在类库中的资源文件。我还使用oauth提供者登录到应用程序

当我试图启动我的应用程序时,我得到以下异常

[EntryPointNotFoundException: Entry point was not found.]
System.Web.WebPages.IVirtualPathFactory.Exists(String virtualPath) +0
System.Web.WebPages.<>c__DisplayClass1.<Exists>b__0(IVirtualPathFactory factory) +15
System.Linq.Enumerable.Any(IEnumerable`1 source, Func`2 predicate) +146
System.Web.WebPages.VirtualPathFactoryManager.Exists(String virtualPath) +72
System.Web.WebPages.StartPage.GetStartPage(WebPageRenderingBase page, IVirtualPathFactory virtualPathFactory, String appDomainAppVirtualPath, String fileName, IEnumerable`1 supportedExtensions) +131
System.Web.WebPages.StartPage.GetStartPage(WebPageRenderingBase page, String fileName, IEn umerable`1 supportedExtensions) +13 2
System.Web.Mvc.RazorView.RenderView(ViewContext viewContext, TextWriter writer, Object instance) +200
System.Web.Mvc.BuildManagerCompiledView.Render(ViewContext viewContext, TextWriter writer) +115
System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context) +294
System.Web.Mvc.ControllerActionInvoker.InvokeActionResult(ControllerContext controllerContext, ActionResult actionResult) +13
System.Web.Mvc.<>c__DisplayClass1a.<InvokeActionResultWithFilters>b__17() +23
System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +242
System.Web.Mvc.<>c__DisplayClass1c.<InvokeActionResultWithFilters>b__19() +21
System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +242
System.Web.Mvc.<>c__DisplayClass1c.<InvokeActionResultWithFilters>b__19() +21
System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList`1 filters, ActionResult actionResult) +175
System.Web.Mvc.Async.<>c__DisplayClass2a.<BeginInvokeAction>b__20() +89
System.Web.Mvc.Async.<>c__DisplayClass25.<BeginInvokeAction>b__22(IAsyncResult asyncResult) +102
System.Web.Mvc.Async.WrappedAsyncResult`1.End() +57
System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult) +43
System.Web.Mvc.<>c__DisplayClass1d.<BeginExecuteCore>b__18(IAsyncResult asyncResult) +14
System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +23
System.Web.Mvc.Async.WrappedAsyncResult`1.End() +62
System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +57
System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +23
System.Web.Mvc.Async.WrappedAsyncResult`1.End() +62
System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult) +47
System.Web.Mvc.Controller.System.Web.Mvc.Async.IAsyncController.EndExecute(IAsyncResult asyncResult) +10
System.Web.Mvc.<>c__DisplayClass8.<BeginProcessRequest>b__3(IAsyncResult asyncResult) +25
System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +23
System.Web.Mvc.Async.WrappedAsyncResult`1.End() +62
System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +47
System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result) +9
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +9688704
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +155
[EntryPointNotFoundException:未找到入口点。]
System.Web.WebPages.ivirtualPath.Exists(字符串virtualPath)+0
System.Web.WebPages.c__显示Class1.b__0(IVirtualPathFactory)+15
System.Linq.Enumerable.Any(IEnumerable`1源,Func`2谓词)+146
System.Web.WebPages.virtualPath工厂管理器.Exists(字符串virtualPath)+72
System.Web.WebPages.StartPage.GetStartPage(WebPagerUnderingBase页、IVirtualPath工厂VirtualPath工厂、字符串appDomainAppVirtualPath、字符串文件名、IEnumerable`1 supportedExtensions)+131
System.Web.WebPages.StartPage.GetStartPage(WebPagerUnderingBase页,字符串文件名,IEn numerable`1 supportedExtensions)+13 2
System.Web.Mvc.RazorView.RenderView(ViewContext、TextWriter、Object实例)+200
System.Web.Mvc.buildmanager compiledview.Render(ViewContext、TextWriter)+115
System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext上下文)+294
System.Web.Mvc.ControllerActionInvoker.InvokeActionResult(ControllerContext ControllerContext,ActionResult ActionResult)+13
System.Web.Mvc.c__显示Class1A.b_17()+23
System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter筛选器,ResultExecutingContext预文本,Func`1 continuation)+242
System.Web.Mvc.c__显示Class1C.b__19()+21
System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter筛选器,ResultExecutingContext预文本,Func`1 continuation)+242
System.Web.Mvc.c__显示Class1C.b__19()+21
System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext ControllerContext,IList`1过滤器,ActionResult ActionResult)+175
System.Web.Mvc.Async.c__DisplayClass2a.b__20()+89
System.Web.Mvc.Async.c__显示类25.b__22(IAsyncResult asyncResult)+102
System.Web.Mvc.Async.WrappedAsyncResult`1.End()+57
System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult)+43
System.Web.Mvc.c__;u displayClassId.b__u18(IAsyncResult asyncResult)+14
System.Web.Mvc.Async.c__显示类4.b__3(IAsyncResult ar)+23
System.Web.Mvc.Async.WrappedAsyncResult`1.End()+62
System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult)+57
System.Web.Mvc.Async.c__显示类4.b__3(IAsyncResult ar)+23
System.Web.Mvc.Async.WrappedAsyncResult`1.End()+62
System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult)+47
System.Web.Mvc.Controller.System.Web.Mvc.Async.IAsyncController.EndExecute(IAsyncResult asyncResult)+10
System.Web.Mvc.c__;u DisplayClass8.b__;u 3(IAsyncResult asyncResult)+25
System.Web.Mvc.Async.c__显示类4.b__3(IAsyncResult ar)+23
System.Web.Mvc.Async.WrappedAsyncResult`1.End()+62
System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult)+47
System.Web.Mvc.MvcHandler.System.Web.IHTTPassynchandler.EndProcessRequest(IAsyncResult结果)+9
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()+9688704
System.Web.HttpApplication.ExecuteStep(IExecutionStep步骤,布尔值&同步完成)+155

以下是我如何修复它的

假设项目参考是正确的

  • 注释掉web.config中的所有
    部分
  • 右键单击项目并进入“管理Nuget软件包”
  • 删除所有已安装的库并重新添加
。。。这将重新创建所有
部分,您应该可以开始了

如果项目引用不正确。。。然后卸载所有与mvc相关的库并重新安装

检查此项: