Namespace does not work correctly / BC30002: Type 'Prod' is not set

Asked

Viewed 217 times

2

I was invited to solve a problem in a client’s system in Asp.net (Language in which I do not dominate). Without further ado...

My.aspx product file has the following directive

<%@ Import Namespace="Sitefeito.Mkraeprod" %>

some lines down I have this other:

Dim Component as new prod()

To which returns the following error:

BC30002: Type 'Prod' is not defined.

I don’t understand why, because at the same file level I have Vb/addproduto.Vb

containing:

Namespace Sitefeito.Mkraeprod
Public Class prod

As an attempt at solution:

In the web.config file (at the root of the project) I added

<pages>
    <namespaces>
      <add namespace="Sitefeito.Mkraeprod" />
    </namespaces>
  </pages>

As seen in this tutorial: http://www.devtrends.co.uk/blog/importing-namespaces-into-razor-views-in-asp.net-mvc-3

But to no avail

  • Tried to do so? Dim Component as new Sitefeito.Mkraeprod.Prod()

  • Yes, unfortunately nothing! The problem arose after I was forced to change the migration from Windows 2003 to Windows 2007. Given the lack of support of my resale.

1 answer

2

As the problem arose with the server version change, check how the MVC build is in the project, what the framework is and if the references for MVC are ok in the solution. What version of the MVC?

If you comment on this page or delete it from the build, does the whole project work normally? It’s a one-off problem?

If there are no references in the project the application will search in the server GAC and may not find the version you need.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.