2014-01-27 74 views
1

我有一個分成2個項目的ASP.NET MVC應用程序。該項目的1只是一個ASP.NET MVC項目,另一個是我放置共享代碼的類庫。類庫使用RazorGenerator來編譯我的視圖。未找到入口點。

在MVC應用程序中,我使用EmbeddedResourceVirtualPathProvider,因此我可以訪問在類lib中添加的資源文件。我還使用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 
+1

檢查:http://stackoverflow.com/questions/13154241/entry-point-was-not-發現的異常 –

回答

0

這是我如何修復它。

假設該項目引用都沒事......

  • 註釋掉所有在web.config中<dependentAssembly>...</dependentAssembly>部分。
  • 右鍵單擊該項目並進入「管理的NuGet包」
  • 卸下所有已安裝的庫,並重新添加回來

...這將重新所有<dependentAssembly>...</dependentAssembly>部分,你應該是好的去。

如果項目引用是不對的......然後卸載所有MVC相關的庫,並重新安裝

相關問題