Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Using Modules a...Using Modules a...Custom module: The type or namespace name Custom module: The type or namespace name '[X]' could not be found
Previous
 
Next
New Post
1/31/2012 6:42 AM
 
Hi,

I am new to DNN. I'm trying to learn how to use DNN Modules, but I can't seem to get away with it.

I installed DNN using the 06.01.02 starter kit. I work with Visual Studio 2010.

Everything worked at first, I created my portal, added a couple of pages, and customized them no problem, until I tried to add the new module. I called it "ConsultarMarcajes".

I was following your article. Errors started appearing once I had already added the module and got to the point "Rename "YourCompany" if desired". The article tells us to compile the project to make sure everything is OK... and I guess it was not in my case. When I compile my project, I get a lot of error messages saying:

"The type or namespace name '[X]' could not be found (are you missing a using directive or an assembly reference?)"

Where [X] is always "ConsultarMarcajesInfo", "ConsultarMarcajesController" or "DataProvider".

When the new module was added, a few filed where added to a folder named\PortalEmpleado\Portals\0\DesktopModules\ConsultarMarcajes: ConsultarMarcajes.dnn, ViewConsultarMarcajes.ascx, EditConsultarMarcajes.ascx, etc. and the following files containing classes were copied to PortalEmpleado\Portals\0\App_Code\ConsultarMarcajes: ConsultarMarcajesController.cs, ConsultarMarcajesInfo.cs, DataProvider.cs and SqlDataProvider.cs.

I guess, from the classes defined in \PortalEmpleado\Portals\0\DesktopModules\ConsultarMarcajes, I cannot access the classes defined in PortalEmpleado\Portals\0\App_Code\ConsultarMarcajes. Is there any reason for that?

The new namespace, after renaming the initial "Philip" namespace which VS2010 created by default, is "PortalEmpleado.Modules.ConsultarMarcajes". I checked all files belong to this same namespace.

I hope some can shed some light on this.

Thanks in advance,

Dani Carbonell
 
New Post
2/1/2012 7:44 PM
 
the classes cannot be defined in a file in desktopmodules - they either need to be dynamically compiled (and thus live in app_code) or compiled and will live as a dll file.

Buy the new Professional DNN7: Open Source .NET CMS Platform book Amazon US
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Using Modules a...Using Modules a...Custom module: The type or namespace name Custom module: The type or namespace name '[X]' could not be found


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out