Home > Asp.net, DotNetNuke > Start your DotNetNuke Module Development.

Start your DotNetNuke Module Development.

Here is the step to start DNN Module Development using C#
1.Install DNN starter kit for DNN Module Template
2.Create a new project (Select DotNetNuke Compiled Module template) and change the project location to {DotNetNukeRoot}\DesktopModules,you need to untick the create directory for solution option.The reason for that is that when you compile your project,the compiled dll have to go to [DotNetNukeRoot]/Bin folder ,the default DNN Module template project has the build setting to output the dll to ..\..\bin\.If you tick the create directory for solution option,the dll will not be able to make it to the [DotNetNukeRoot]/Bin folder
DnnModuleDev
3.Once you create the module ,you need to change the assembly name and default name space according to your project or you could go to
AssemblyInfo.cs to change it.
ModificationToModuleTemplate
4.Since the default targeted .NET Version is 2.0,you might want to change this to .NET 3.5.There is Gotcha when you change the targeted framework to .NET 3.5,it will add a web.config into your project.You will get the following error if you install your module to DNN now.I nomrally just delete the web.config to make it work,not sure it is best thing to do but it works.The web.config is also added if you drag a ajax control toolkit control from the tool box the first time and the same fix apply.There is another Gotcha waiting for you if you delete the web.config.Since you are compiling your module in .Net 3.5, but the DotNetNuke core in older version is not.You need to add assemblyBinding in your site web.config file.

<runtime>
<assemblyBinding xmlns=”urn:schemas-microsoft-com:asm.v1″>
<dependentAssembly>
<assemblyIdentity name=”System.Web.Extensions” publicKeyToken=”31bf3856ad364e35″/>
<bindingRedirect oldVersion=”1.0.0.0-1.1.0.0″ newVersion=”3.5.0.0″/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name=”System.Web.Extensions.Design” publicKeyToken=”31bf3856ad364e35″/>
<bindingRedirect oldVersion=”1.0.0.0-1.1.0.0″ newVersion=”3.5.0.0″/>
</dependentAssembly>
</assemblyBinding>
</runtime>

webcoinfigerror
5.Sometimes the newly created Module does not have the correct references path for DotNetNuke.dll and Microsoft.ApplicationBlocks.Data.Dll,you can find the dlls from {DotNetNukeRoot}\Bin
CorrectRef
6.Delete all the code in page_load and other events which are not requried(what I normally do) or you can run the sql script and then build your solution if no errors you are ready to start your DNN Module Development. :)

kick it on DotNetKicks.com

About these ads
Categories: Asp.net, DotNetNuke
  1. No comments yet.
  1. October 5, 2009 at 1:55 am

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 163 other followers