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

HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesCreating New Module - Could Not Load Type...Creating New Module - Could Not Load Type...
Previous
 
Next
New Post
11/22/2010 8:01 PM
 
Hello,

I am a newbie at creating modules. I am using the CodeEndeavors templates in VS2010 to create a test module. When I install it, I am getting a Could Not Load Type... error as below. It is complaining about a Parameter of Type cannot be null. Anyone know what this means? I know most say this is because it can't find the .dll, but I have confirmed the .dll is in the DNN bin directory and it is the correct version based on timestamp.

Any pointers or help is much appreciated. Thanks! Chad

AssemblyVersion: 5.5.1
PortalID: 0
PortalName: TheDynoRoom.com
UserID: -1
UserName:
ActiveTabID: 55
ActiveTabName: Log Viewer
RawURL: /dynodnn/Admin/LogViewer.aspx
AbsoluteURL: /DynoDNN/Default.aspx
AbsoluteURLReferrer: http://localhost/dynodnn/Host/Module%20Definitions/tabid/18/ctl/Install/rtab/18/portalid/0/Default.aspx
UserAgent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.2) Gecko/20100316 Firefox/3.6.2 ( .NET CLR 3.5.30729; .NET4.0E)
DefaultDataProvider: DotNetNuke.Data.SqlDataProvider, DotNetNuke.SqlDataProvider
ExceptionGUID: a6d6333c-0b20-4df4-9738-c1628f09a4e8
InnerException: Could not load type 'Incite.Modules.Dyno_Garage.Dyno_GarageController'.
FileName:
FileLineNumber: 0
FileColumnNumber: 0
Method: System.Web.Compilation.BuildManager.GetType
StackTrace:
Message: System.Web.HttpException: Could not load type 'Incite.Modules.Dyno_Garage.Dyno_GarageController'. at System.Web.Compilation.BuildManager.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase) at DotNetNuke.Framework.Reflection.CreateType(String TypeName, String CacheKey, Boolean UseCache, Boolean IgnoreErrors)
Source:
Server Name: CRICHARDSONV

AssemblyVersion: 5.5.1
PortalID: 0
PortalName: TheDynoRoom.com
UserID: -1
UserName:
ActiveTabID: 55
ActiveTabName: Log Viewer
RawURL: /dynodnn/Admin/LogViewer.aspx
AbsoluteURL: /DynoDNN/Default.aspx
AbsoluteURLReferrer: http://localhost/dynodnn/Host/Module%20Definitions/tabid/18/ctl/Install/rtab/18/portalid/0/Default.aspx
UserAgent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.2) Gecko/20100316 Firefox/3.6.2 ( .NET CLR 3.5.30729; .NET4.0E)
DefaultDataProvider: DotNetNuke.Data.SqlDataProvider, DotNetNuke.SqlDataProvider
ExceptionGUID: f411db36-fa4a-45f1-94f4-22f3ffa31168
InnerException: Value cannot be null. Parameter name: type
FileName:
FileLineNumber: 0
FileColumnNumber: 0
Method: System.Activator.CreateInstance
StackTrace:
Message: System.ArgumentNullException: Value cannot be null. Parameter name: type at System.Activator.CreateInstance(Type type, Boolean nonPublic) at DotNetNuke.Entities.Modules.EventMessageProcessor.UpgradeModule(EventMessage message)
Source:
Server Name: CRICHARDSONV

My .dnn Manifest is as follows:
<dotnetnuke version="3.0" type="Module">
  <folders>
    <folder>
      <name>Incite - The Dyno Room</name>
      <friendlyname>Incite - The Dyno Room</friendlyname>
      <foldername>TheDynoRoom</foldername>
      <modulename>Incite - The Dyno Room</modulename>
      <description>The Dyno Room module description</description>
      <dependencies>DotNetNuke.UI.Utilities.ControlMethodAttribute</dependencies>
        <businesscontrollerclass>Incite.Modules.Dyno_Garage.Dyno_GarageController</businesscontrollerclass>
        <businesscontrollerclassOLD>Incite.Modules.TheDynoRoom.TheDynoRoomController</businesscontrollerclassOLD>
      <modules>
        <module>
          <friendlyname>My Garage</friendlyname>
          <cachetime>0</cachetime>
          <controls>
            <control>
              <src>DesktopModules/TheDynoRoom/MyGarage2.ascx</src>
              <type>View</type>
              <helpurl></helpurl>
              <supportspartialrendering>true</supportspartialrendering>
            </control>
          </controls>
        </module>
      </modules>
        <modules>
            <module>
                <friendlyname>Dyno Search</friendlyname>
                <cachetime>0</cachetime>
                <controls>
                    <control>
                        <src>DesktopModules/TheDynoRoom/ViewDyno_Garage.ascx</src>
                        <type>View</type>
                        <helpurl></helpurl>
                        <supportspartialrendering>true</supportspartialrendering>

                    </control>
                    <control>
                        <key>Edit</key>
                        <title>Edit Content</title>
                        <src>DesktopModules/TheDynoRoom/EditDyno_Garage.ascx</src>
                        <type>Edit</type>
                        <helpurl></helpurl>
                    </control>
                    <control>
                        <key>Settings</key>
                        <title>Settings</title>
                        <src>DesktopModules/Dyno_Garage/EditDyno_Garage.ascx</src>
                        <type>Edit</type>
                        <helpurl></helpurl>
                    </control>
                </controls>
            </module>
        </modules>
      <files>
        <file>
            <name>Incite.TheDynoRoom.dll</name>
          </file>
        <file>
          <name>ShowPicture.aspx</name>
        </file>
          <file>
              <name>MyGarage2.ascx</name>
          </file>
        <file>
          <name>ViewDyno_Garage.ascx</name>
        </file>
        <file>
          <name>ViewDyno_Garage.ascx.js</name>
        </file>
        <file>
          <name>EditDyno_Garage.ascx</name>
        </file>
        <file>
          <name>EditDyno_Garage.ascx.js</name>
        </file>
        <file>
          <path>App_LocalResources</path>
          <name>ViewDyno_Garage.ascx.resx</name>
        </file>
        <file>
          <path>App_LocalResources</path>
          <name>EditDyno_Garage.ascx.resx</name>
        </file>
        <file>
          <name>module.css</name>
        </file>
        <file>
          <name>ajaxanim.gif</name>
        </file>
        <file>
          <name>01.00.00.SqlDataProvider</name>
        </file>
        <file>
          <name>Uninstall.SqlDataProvider</name>
        </file>
      </files>
    </folder>
  </folders>
</dotnetnuke>
 
New Post
11/22/2010 8:16 PM
 
This is usually due to the DataProvider type that's specified.  The data provider uses reflection to pull in the correct class, and if the static value in your abstract provider cannot find the concrete data provider, then you will get this error.  

Check out the source of a core DNN module to see what I mean.  Look at the DataProvider file, and note the value that's assigned for the Type of data provider.  Then, note the SqlDataProvider class as well.  You will want to mimic that architecture until you get more comfortable with development.

Will Strohl

Upendo Ventures Upendo Ventures
DNN experts since 2003
Official provider of the Hotcakes Commerce Cloud and SLA support
 
New Post
11/22/2010 8:54 PM
 
This appears to be a namespace mis-match between that specified in the manifest's <businesscontrollerclass> element (Incite.Modules.Dyno_Garage.Dyno_GarageController) and the actual namespace of the assembly contained in the file Incite.TheDynoRoom.dll. The second error log message is the key one as it indicates the error is being thrown as an attempt is made to create an instance of the business controller class during installation in support of the module's implementation of IUpgradable interface.

My guess is that you started with a namespace of Incite.Modules.TheDynoRoom then changed it to Incite.Modules.Dyno_Garage and/or changed the name of the controller class from TheDynoRoomController to Dyno_GarageController but did not change the name of the assembly to match. I also noticed that you are placing module controls in two child folders - TheDynoRoom and Dyno_Garage under DesktopModules while the module folder is specified as TheDynoRoom. Although that is not the cause of this issue, it will likely cause other issues, particularly when uninstalling the module.

Finally, I would recommend that you look into using the version 5 manifest format rather than the version 3.0 that you have used unless you must support installing your module on DotNetNuke 4.x sites. If that is the case, don't forget that you must compile your module against the LOWEST DotNetNuke version you will be supporting.

Bill, WESNet Designs
Team Lead - DotNetNuke Gallery Module Project (Not Actively Being Developed)
Extensions Forge Projects . . .
Current: UserExport, ContentDeJour, ePrayer, DNN NewsTicker, By Invitation
Coming Soon: FRBO-For Rent By Owner
 
New Post
11/22/2010 9:58 PM
 
William, you are onto something...I did change the name of the value in the BusinessController tag in the manifest. So when you mention changing it in the assembly, could you be more specific? How/where do I do that? If I look into the AssemblyInfo.vb file, there is no reference to this. If I go to the project properties>Application, the Assembly name is Incite.TheDynoRoom. I tried changing that to:Incite.Modules.TheDynoRoom but then the build process could not find the dll, because the .targets file is using a concatenation formula that doesn't equate to Incite.Modules.TheDynoRoom.dll.

Thanks for the other pointers to...I'll look into those after I get this one resolved :)

Chad
 
New Post
11/22/2010 9:58 PM
 
Oh, and the Root Name Space is blank...for what it's worth.
 
Previous
 
Next
HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesCreating New Module - Could Not Load Type...Creating New Module - Could Not Load Type...


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