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

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Type or Name space error with  new moduleType or Name space error with new module
Previous
 
Next
New Post
4/5/2008 1:32 AM
 

Hi attempting to create a custom module in C#.  However i cam getting an error that states "The type or namespace name 'Core' does not exist in the namespace 'Dizzy.Modules.MyModule' (are you missing an assembly reference?)" .  The source of the error is ViewMyModule.ascx.cs and the line it is complaining about is this line at the top:

using Dizzy.Modules.MyModule.Core.Business;

That namespace does exist, but in a nested subdirectory of my module folder. could this be the problem?  (I keep call code under DesktopModules instead of making use of App_Code).  Here is the layout and namespaces of the files in question:


DesktopModules/MyModule/

-ViewMyModule.ascx
-ViewMyModule.ascx.cs

DesktopModules/MyModule/Core/Business

-MyModuleInfo.cs (namespace: Dizzy.Modules.MyModule.Core.Business)
-MyModuleController.cs (namespace: Dizzy.Modules.MyModule.Core.Business)

DesktopModules/MyModule/Core/Data

-DataProvider.cs (namespace: Dizzy.Modules.MyModule.Core.Data)
-SqlDataProvider.cs (namespace: Dizzy.Modules.MyModule.Core.Data)


Can anyone tell me why this is happening?          

 
New Post
4/10/2008 4:49 PM
 

Your non-codebehind files (MyModuleInfo.cs, MyModuleController.cs, etc) are not being automatically compiled by ASP.NET, and thus no classes contained therein are available to your application.

You have two options:

1) Move these files into the App_Code directory.  Files here are automatically compiled.

2) Precompile these files, in a separate project, and add a reference to that project to your DNN website.

Hope this helps!

Brandon


Brandon Haynes
BrandonHaynes.org
 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Type or Name space error with  new moduleType or Name space error with new module


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