简体   繁体   中英

Namespace in Code-Behind causing BC30456: 'InitializeCulture' is not a member of 'ASP.page_aspx' error

I am trying to get a web application processing through TFS and MS Release Management. The project builds fine and when run in debug mode from within Visual Studio - however when it comes to publishing it through TFS & Release Management I get the error:

BC30456: 'InitializeCulture' is not a member of 'ASP.ivmain_aspx'

I have been looking all over the place to find out what might be causing this but with not too much luck. This is a pretty big web application developed over the years by various developers and have found that some pages have a namespace declared within the Code-Behind... Those that do not were operating correctly so I removed the Namespace from my one problem page and it then loaded fine!

So, there is obviously something with the Namespace that is confusing the publication. I could just go through and find all codebehind files with Namespaces and take them out - but the three following reasons are putting me off doing so:

  • There may be genuine reasons these Namespaces were added
  • There are loads of these pages with Namespaces and it would be a mammoth task to go through them all.
  • Im still not really sure 'why' this is causing the problem - there may be a better/more appropriate fix to the actual problem.

Has anyone else experienced this same problem and have any advice?

EDIT


The top of the aspx page looks as follows:

<%@ Page Language="VB" MasterPageFile="~/Masters/DefaultMasterPage.master" AutoEventWireup="false" CodeFile="ivmain.aspx.vb" Inherits="iAssess.ivmain" %>

and the namespace is declared in the codebehind as follows:

Namespace iAssess

    Partial Public Class ivmain
        Inherits System.Web.UI.Page

If I however remove the namespace in the Inherits value and then remove it from the codebehind I get no problems.

I ended up removing the inherits namespace from all files that referenced it and then removed the namespace from each respective Code Behind file. It all seems to be working fine now.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM