1

我有一个 ASP.NET WebForms 解决方案,它由 5 个 VB.NET 项目(1 个 WebForms 项目和 4 个类库项目)组成。通常,当我更改代码并构建项目并从 Chrome 启动它时,我会收到以下异常:

System.Web.HttpCompileException (0x80004005): D:\myprojectfolder\AccSubManage1.aspx(1): error BC30456: 'InitializeCulture' is not a member of 'ASP.accsubmanage1_aspx'.
at System.Web.Compilation.AssemblyBuilder.Compile()
at System.Web.Compilation.BuildProvidersCompiler.PerformBuild()
at System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath)
at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate)
at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate)
at System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(VirtualPath virtualPath, HttpContext context, Boolean allowCrossApp, Boolean throwIfNotFound)
at System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp)
at System.Web.UI.PageHandlerFactory.GetHandlerHelper(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath)
at System.Web.UI.PageHandlerFactory.GetHandler(HttpContext context, String requestType, String virtualPath, String path)
at System.Web.HttpApplication.MaterializeHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

如果我然后回到 VS 2012,运行“清洁解决方案”,然后再次构建,那么一切都会正常工作。换句话说,Clean and Build 似乎解决了这个问题,但我不知道为什么。

另请注意,运行“全部重建”并不能解决问题,除非我在全部重建之前也运行干净构建。

有任何想法吗?

4

0 回答 0