Using the new Module Development Templates for DotNetNuke 7

imageWith the release of DotNetNuke 7.0 (and now the more recent 7.0.2), it was time to update my module development project templates. If you have worked with my module development templates before, here are the major changes for this release. If you haven’t worked with them before please read this whole blog post as I discuss how to get up and running with the templates.

What’s New

This section will cover some of the “new” features of this template release. If you’re familiar with my previous releases this will hopefully get you up to speed on what is new. If you are new to the whole process it will help you understand a few of the features in the templates.

New DAL2 Templates

The biggest change for the project is that I have added two new DAL2 templates to the project, one for C# and one for VB.Net. These new templates are called DotNetNuke 7 C# DAL2 Compiled Module and DotNetNuke 7 VB.Net DAL2 Compiled Module respectively. As you can see by the name, they use the new DAL2 data access layer available in DotNetNuke 7. Basically you can create a project from one of these two templates and you will have a functioning module (after you build and install of course, see below for those steps) that allows you to create/edit/delete an Item. The Item in the module is pretty simple, with just a few properties, and an ItemController that provides the interaction with the DAL2 and the database. These two templates are a change from previous releases of my template project where the projects you create from the template are empty modules that you have to populate for functionality. With the DAL2 templates it only made sense to provide some out of the box functionality to get you going. You can obviously change the names of the object (Item) and objectcontroller (ItemController) and add additional properties as necessary, be sure to update the SQL script though for any new properties, it can be found in the providers/dataprovider/sqldataprovider folder. For more information on DAL2 check out some of Charles Nurse’s posts here, here, here and here.

New URL (dnndev.me)

imageFor some people getting the development environment setup has been the most difficult part of the use of these templates. The old templates used a URL that required you to configure your HOSTS file to spoof a DNS entry, with the new templates you don’t have to do that. The new templates use DNNDEV.ME as the website name/domain name. The public DNS for dnndev.me actually points to 127.0.0.1, so no matter where you try to access that domain from it will always resolve to your loopback address, perfect for people who have trouble modifying the DNS via the HOSTS file. If you already have your environment setup at DNNDEV you can simply add another host binding in IIS to that same website with the name DNNDEV.ME. If you are new to development, see more information below about configuring your environment.

Support for Visual Studio 2012 Express for Web

One of the requests for the last few releases of the templates has been support for the Visual Studio Express sku. After quite a bit of testing I figured out that the Visual Studio Gallery will not allow my templates to work for both the paid and free SKUs for Visual Studio 2012. I have however come up with a work around for this. If you download the VSIX file from Codeplex you can install the templates in a way that they should work with Express. If you download the template from the Visual Studio Gallery however they won’t. If you don’t need the Express support you can still grab the templates from the gallery which should actually prompt you to upgrade now that a new release is out, if you had the previous release installed.

How to use the Templates

Getting up and running with the templates is actually fairly easy, but you should follow some very specific steps, not following the steps makes it hard for anyone else to be able to assist you as you can configure things any number of ways that might cause problems.

Configuring your Development Environment

This is one of the most important steps of the process, the templates are configured to run in a website under the URL http://dnndev.me/ There are a couple of resources for setting up your environment, including this Wiki page, but the easiest approach would likely be to watch this 4 part video series I created for DNN7, as it walks you through setting up a website at http://dnndev.me. The important thing for the new release of the templates is that you must have DNN 7.0.2 (or a newer release as they come) running at dnndev.me, unless of course you modify the templates yourself, but that is outside of the scope of this blog post.

Installing the Templates

Installation of the templates is pretty easy, there are multiple ways to do this, choose one of the three options below and perform the steps listed for the option you choose. You only need to do one of these options, not all three.

  1. Install using the Tools\Extensions and Updates menu in Visual Studio 2012
    1. Mouse over the Tools menu
    2. Click on Extensions and Updates
    3. Search for DotNetNuke
    4. Choose the Install button for the DotNetNuke Project Templates option
  2. Install manually by downloading the VSIX file from the online gallery
    1. Visit the Visual Studio Gallery – DotNetNuke Project Templates page
    2. Download the VSIX file via the Download link.
    3. Double click on the downloaded file to install the templates.
  3. Install manually by downloading from Codeplex
    1. Download the VSIX file from Codeplex
    2. UPDATED - Right Click on the downloaded VSIX and choose Properties
    3. Click on the UNBLOCK button before proceeding
    4. Double click on the downloaded file to install the templates.

Creating your Visual Studio Project

Once you’ve installed the templates, you can setup a project based on the templates. To do so you should follow the steps below

  1. Install Visual Studio 2012 (you should have this done already)
  2. Install the project templates as instructed above
  3. Setup your DotNetNuke Development Environment as instructed above
  4. Run Visual Studio 2012 as an Administrator (right click on the shortcut to do so)
  5. File –> New Project
  6. Choose either C# or VB.Net from the Languages section of the new project dialog
  7. Select the DotNetNuke Folder under your preferred language (C# or Visual Basic)
  8. Choose either DotNetNuke C# Compiled Module, DotNetNuke VB.Net Compiled Module, DotNetNuke 7 C# DAL2 Compiled Module or DotNetNuke 7 VB.Net DAL2 Compiled Module for your project template.
  9. imageFor the new project creation screen using the following settings
    1. Name: ModuleName (something unique here, example MyModule)
    2. Location: c:\websites\dnndev.me\desktopmodules\ (this assumes you setup your development environment as instructed in Step 3)
    3. Solution: Create new solution (this option might not be displayed, that is okay)
    4. Create directory for solution : Unchecked (this will cause path problems if checked, the templates assume the SLN is in the same folder as the project file)
    5. Add to source control: Unchecked (I typically get my project running before adding it to source control)
    6. Click OK
  10. In some cases Visual Studio will turn the DesktopModules folder in to a Virtual Directory, this will cause problems with your DNNDEV.me environment, load IIS Manager (start>run>INETMGR) and remove the Virtual Directory if it appears as one there.

Installing your Module in Development

After you create your project in Visual Studio 2012 the module will exist in the c:\websites\dnndev.me\desktopmodules\MyModule folder, but it is not technically installed and registered with DotNetNuke. To do that you need to perform the follow steps.

  1. Build your project in DEBUG mode.
  2. Change to Release mode and build again.
  3. Login to your development website in a browser, using a HOST/SuperUser account.
  4. Navigate to the Host/Extensions page
  5. Choose the Install Extension Wizard option
  6. Click Choose File
  7. Browse to your c:\websites\dnndev.me\desktopmodules\MyModule\Install\ and choose either the INSTALL or SOURCE package to upload.
  8. Go through the steps for the installation wizard (if the module fails to install, try closing Visual Studio first, then install the module)
  9. Place your module on a page (I typically create a new page for each module in my development environment for testing purposes).

Installing your Module in Production

To install your module in production you will follow the same steps as installing it in your development environment, except you will almost NEVER use the SOURCE package of a module in production, it just isn’t necessary.

What’s Next?

So I finally got the 7.0 (7.0.2) templates out the door, what is next? Reworking the DNNTaskManager module that I created a module development tutorial for back in 2011. The plan is to actually rewrite that module from the ground up using DNN 7.0, in three different iterations. 1) Using the original DAL model in DotNetNuke, 2) Using the new DAL2 template, 3) Using ContentItems in DotNetNuke 7. Stay tuned to my blogs for more information as those tutorials are created.

If you like the templates, please give them a rating, either on Codeplex or on the VS Gallery.

Recent Comments

Hi Chris - thanks for this great post. I have installed the new template and it works great. One thing I wanted you to confirm please is how I customize the templates. I amended the Template file to point to my URL and amended the custom parameters. i then build the relevant c sharp project. then release and build again. I then picked up the zipped template files from the install folder and place then in my Visual studio directory. Can you confirm this is the correct way to customize the templates??( I have used it since and it worked fine just wanted confirmation). Secondly have you done any post/video on DAL2?
Posted By: Atif Mir on Jan 2013
Atif, I will post instructions for how to modify these templates, but unfortunately the approach you took is not it. I need to post some additional files to the "release" in order for it to be easy for people to make their changes.
Posted By: Chris Hammond on Jan 2013
Hi Chris, I believe I have followed all the steps your posted in this blog. However, when I try to create a new project with the template. I get a popup message box from VS2012 saying "The Web Application Project MyModule is configured to use IIS. The Web server 'http://dnndev.me/desktopmodules/MyModule' could not be found." After closing the popup, VS2012 does not have anything displayed. But, the project is actually created under the c:\websites\dnndev.me\DesktopModules\. I get the same popup if I try to open the project in VS2012. Any idea what I am missing? Thanks. -Rich
Posted By: Rich Zhai on Jan 2013
Rich, be sure that you have added DNNDEV.ME as a HOST BINDING in IIS. Even if you can access the website in a browser, VS requires that you have IIS configured properly in order to open the project.
Posted By: Chris Hammond on Jan 2013
Hi. I dont write english good. Excuse me... So... Ever I worked with DNN. Now I am faced with making a website with e-commerce. And the payment system to use is one particular of Colombia. I considered buying e-commerce module, but I think these modules are flexible but will not let me do the integration with the payment system of Colombia. So I decided to develop my own e-commerce module. And I'm glad you have this blog with an explanation of how to develop a module. I appreciate the links they deem appropriate that I can see to develop a module from 0. Thank you very much.
Posted By: Elkin C on Jan 2013
I'm quite fascinated with the new DAL2 Templates and New URL (dnndev.me) of this particular update. I'll try to follow all the installation steps you have given and let you know about the problems I encounter.
Posted By: Al Breader on Jan 2013
My SQL Server 2008 is located on another machine in my domain. How do I grant my local development account IIS APPPool\dnndev.me owner role?
Posted By: Tom Thomas on Feb 2013
If your SQL server is on another machine you should use SQL authentication instead of Windows Authentication and create a new SQL User/password to connect with.
Posted By: Chris Hammond on Feb 2013
Would you cater for enterprise developpers still obliged to work with VS2010 ? or are they doomed to use DNN 6 ?
Posted By: Peter Chan on Feb 2013
For those of you who want templates for VS2010, feel free to continue to use the V.9 release, they will work fine. But going forward I don't see any reason to try and maintain templates for both releases.
Posted By: Chris Hammond on Feb 2013
Chris, Thanks for continuing this excellent work on the templates. I'm having a problem after I have a running DNN 7.02 website. I create a project in VisStudio 2010 using the c# w/Dal template. When I attempt to build the project the references for DotNetNuke.dll and DotNetNuke.WebUtility.dll are broken. So I updated the references from the DNNDEV.ME /bin folder. I'm running Win 7 64bit. Then When I run the website it comes up with the generic error page. When run from Visual Studio an exception is evident in the OnInit event for Default.aspx - something to do with the line: ctlSkin = IsPopUp ? UI.Skins.Skin.GetPopUpSkin(this) : UI.Skins.Skin.GetSkin(this); I should also mention that I used MikeVDM's utility to install DNN - that seemed to work fine as the site installed and ran as expected until i tried to run my new module project. Any thoughts? thanks!
Posted By: Allen Foster on Feb 2013
FYI (directed at Alan, but for everyone else as well) For some reason, one I haven't been able to track down yet, the DESKTOPMODULES folder randomly gets turned into a Virtual Directory, that will cause problems with the site. Try removing the Virtual Directory in IIS and see if that fixes your problem.
Posted By: Chris Hammond on Feb 2013
OOPS! I meant to say that I created the project in Visual Studio 2012!
Posted By: Allen Foster on Feb 2013
Using Templates V0.9 for VS 2010 and DNN7.0.2 (Set to use .NET 2.0) I get 25 errors of the kind: C#file: View.ascx.cs using DotNetNuke.Services.Exceptions; Error (translated from French) The namespace "Services" does not exist in the namespace DotNetNuke (an assembly reference is missing ?) I tried to remove and re-add the reference to DotNetNuke in the solution explorer. But I can't see this object in the Objects Explorer. Any hints for VS2010 users ? after all we're all still using MSSS 2008 ;-)
Posted By: Peter Chan on Feb 2013
If you are using VS2010 and getting namespace issues please check to make sure all the References in the project are configured properly. You might need to add the dotnetnuke.dll reference again.
Posted By: Chris Hammond on Feb 2013
Sorry, I said that I removed and re-added the reference to DotNetNuke dll. OK, you convinced me to move to VS2012. When are you planning to drop support for Sql Server 2008 ?
Posted By: Peter Chan on Feb 2013
DOtNetNuke just dropped support for SQL 2005, based on that, I wouldn't see SQL 2008 dropping anytime too soon.
Posted By: Chris Hammond on Feb 2013
Do these templates built around WebAPI/MVC or more for web forms modules?
Posted By: Mustaffa MacGregor on Mar 2013
@Mustaffa these templates are for the front end module dev, if you want to create services using WebAPI/MVC you definitely can do so with them, but they don't have any of the bits for that included by default.
Posted By: Chris Hammond on Mar 2013
Hi, i am trying to create the two files in packages folder of the custom module using the template from Extensions menu of Visual Studio 2012 (.NET framework 4). When i Build in Debug and Release mode i have no errors (only the warning; Assembly generation -- The version '00.00.01.*' specified for the 'file version' is not in the normal 'major.minor.build.revision' format ) But in my module packages folder there aren't the two files (install.zip e source.zip): there is only the folder MSBuildTasks.1.4.0.45 with the repositories.config file. Can you help me? Thank You
Posted By: Matteo Piergianni on Mar 2013
Matteo, look in the INSTALL folder the templates were modified 9 months ago to use that folder instead of packages.
Posted By: Chris Hammond on Mar 2013
Hello, after creating a project using DNN-VB-DAL2-Module, I get Error HRESULT E_FAIL has been returned from a call to a COM component in Edit.ascx and View.ascx. Also I am unable to create a new control. What is causing this problem. Thanks.
Posted By: danny ching on Mar 2013
Danny, I don't know what causes that error unfortunately.
Posted By: Christopher Hammond on Mar 2013
Hi Chris, I have also the Error (The version '00.00.01.*' specified for the 'file version' is not in the normal 'major.minor.build.revision' format) What can i do? my next Problem with the Template is i cannot Drag and Drop an asp:panel or any other Component from Microsoft in my view.ascx Page ?? also i cannot insert a Component by Hand.. i become always an Error... What can i do to insert asp Components like asp:panel in my view.ascx Page and also have a correct HTML Preview of the Page??
Posted By: Bernd Wachter on Apr 2013
Bernd, the first message isn't an Error, just a warning, you can ignore that, or you can change the version format, that is up to you. As for the drag/drop options, I don't know what the cause of that is, but check out the discussion section of http://christoctemplate.codeplex.com
Posted By: Chris Hammond on Apr 2013
Thanks for this great post I would change the DAL2 template adding the possibility to save in the database binary data(in my case is a generated license file, but could be also image) Is it possible yo use DAL2 to save nvarbinary ? Thanks
Posted By: michele L. on Apr 2013
Michele, that question would be better asked over on http://www.dnnchat.com/
Posted By: Chris Hammond on Apr 2013
ps - I fixed that error by doing this from this comment: https://christoctemplate.codeplex.com/discussions/400980 I was able to overcome this issue by doing the following: From VS 2012 go to Tools > Library Package Manager > Package Manager Console After Package Manager Console loads, type the following command PM> Install-Package MSBuildTasks You should get the following messages: Successfully installed 'MSBuildTasks 1.4.0.45'. Successfully added 'MSBuildTasks 1.4.0.45' to ($CustomModule). Delete temporary file Copying MSBuild Community Tasks files to ($SolutionDir)\Website\DesktopModules\($CustomModule)\Build Don't forget to commit the Build folder Installing MSBuild Community Tasks Targets file import into project ($CustomModule) Import will be added for: $(SolutionDir)\Build\MSBuild.Community.Tasks.targets Import added! You should now be able to rebuild your module in Release mode.
Posted By: Rodney Joyce on Apr 2013
Hi Chris, thanks for these, just trying to set it up. Building in DEBUG mode works, however RELEASE mode throws this error (this is just after getting the base project opened): Error 2 The "MSBuild.Community.Tasks.XmlRead" task could not be loaded from the assembly C:\DNNDev.me\DesktopModules\Framework\\packages\MSBuildTasks.1.4.0.56\tools\MSBuild.Community.Tasks.dll. Could not load file or assembly 'file:///C:\DNNDev.me\DesktopModules\Framework\packages\MSBuildTasks.1.4.0.56\tools\MSBuild.Community.Tasks.dll' or one of its dependencies. The system cannot find the file specified. Confirm that the declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask. Framework Any ideas?
Posted By: Rodney Joyce on Apr 2013
Hi Chris, When I try to install the VIX to VS (running as Admin) I get this error message: Could not load file or assembly '.... http://screencast.com/t/u1lO52tZANQJ Note: It happens from the downloaded file and from the Extensions gallery. I have uninstalled, re-installed and repaired VS2012 (Update 2) and am out of ideas. It worked fine for me at home!
Posted By: Rodney Joyce on Apr 2013
Hi, I get the same error in release mode as Rodney
Posted By: Alois kleine on Apr 2013
Anyone looking for support for the module templates should go to http://www.dnnchat.com If I am there I will try to answer your questions
Posted By: Chris Hammond on Apr 2013
**i have a endpoint "www.my.myservices.com/interfaces/createstudent()". i want to call this end point from dotnetnuke and want to create web api functionality. can you help in this scenario.**
Posted By: venkata ghanitala on May 2013
First of all, I do appreciate the great module template. Having experienced some grief, I have a simple request... as this has been my first experience with DNN, its been terrible. And after three days of chasing random errors I found that it came from your note above about the "DESKTOPMODULES folder randomly gets turned into a Virtual Directory" This has fixed the problem. I am asking you to place that issue as part of the routine installation instructions, because I missed the 'FYI' in comments, and I truly wasted 3 days trying to figure out the various random errors that resulted. (the symptoms didn't lead me to the problem, until I a google search of 'UI.Skins.Skin.GetSkin(this);' brought me back to this page. Sorry for venting, I'm sure that DNN and your template are going to be great for our company's needs, but it's been a very painful start. Thanks.
Posted By: David B on May 2013
David, Thank you for that suggestion, I am making a documentation chage to the documentation.html file that gets loaded after the project is created to suggest people do that.
Posted By: Chris Hammond on May 2013
In other words, if I use the version 9 template to support VS 2010 (http://christoctemplate.codeplex.com/releases/view/93348), can I still benefit from all the "how-to's", and config and install info on this blog?
Posted By: Bo Weaver on May 2013
Hi Chris -- I am using DNN 7.0.x to build a website from scratch, and all fingers point to your templates as the starting point for generating custom modules. So thanks for your efforts! Before I dive in, are there any gotchas I need to be aware of if I choose to use VS 2010 professional as my IDE instead of VS 2012?
Posted By: Bo Weaver on May 2013
Hi Chris. I started developing my module using VS2012 and using your template v2.2, and i noticed that .ashx files are excluded. could you please help me add this into the build project? Kind Regards Bradley
Posted By: Bradley Petersen on Jun 2013
Bradley, you need to add the ASHX extension to the ModulePackage.Targets file in the buildscripts folder. I'll be writing a tutorial on this in the coming weeks.
Posted By: Chris Hammond on Jun 2013
Hi Chris, How can I add a separate dataprovider for my module that are not using the objectqualifier? I want the DNN tables to look like dnn_table and my own tables without the dnn_ prefix. Thanks, Michael
Posted By: Michael Bergqvist on Jun 2013
Michael, basically just remove any reference to objectQualifier from the module and you can avoid needing to have a totally new data provider. Remove it from the SQL scripts for your module, as well as the SQLDATAPROVIDER.cs file
Posted By: Chris Hammond on Jun 2013
Again, thanks for these module templates and the ability/instructions on customizing them. We now have a nice template customized for our organization, thanks. My question is, what does it take to create a module using WSP instead of WAP? I know deployment will be different, but since we aren't trying to distribute our modules outside of our own site, we don't necessarily need the packaging process.
Posted By: David B on Jun 2013
David, I don't recommend anyone do WSP development. If you really want to do anything like that, Check out Shaun's module builder module.
Posted By: Chris Hammond on Jun 2013
Thanks for the updated templates for the most recent iteration of DNN. My Module development environment in VS 2012 is all set and I have you to thank for making this an easy process.
Posted By: Ted Takacs on Jul 2013
Hi Chris, i'm starting in dnn module development and I am working with the new template. Actually, I'm having a problem when adding a folder containing images in the project. The folder is not included in the module after being released. Is there a specific way to include it? Thanks.
Posted By: Lou H on Aug 2013
Lou, you need to modify the modulepackage.targets file to tell it to include addition folders and files in the packaging process.
Posted By: Chris Hammond on Aug 2013
Thanks for the updated templates Chris! Keep it up!
Posted By: Rouan van Niekerk on Sep 2013
Thank you. I've only created the Project by now. And I have a question: I have a module I created using an .ascx and some LINQ TO SQL Class (following Washignton instructions). How can I use that .ascx, if possible? And the .dbml file? Thanks again! So much!
Posted By: Adrian Correa on Sep 2013
Thank you and keep up the good work!
Posted By: Adron Yusuf on Sep 2013
Good work Chris. Thanks for the update.
Posted By: Oscar Moreno on Oct 2013
Hi Rich Zhai, I ran into the same error you did about "The Web Application Project MyModule is configured to use IIS. The Web server 'http://dnndev.me/desktopmodules/MyModule' could not be found." I had to open up the .vsproj file in a text editor and find the xml node and change the value to "False", and that fixed it. Chuck Han
Posted By: Chuck Han on Oct 2013
I had a client ask me when the VS 2013 template for DNN 7.x would be available and I do not know so I pass the question to you? Best Regards, Robert J Collins, Netlogic Corporation
Posted By: Robert Collins on Nov 2013
The extension fails to install on VS 2013 Express for Web "because the following references are missing:" "-Visual Studio MPF 11.0"
Posted By: MIchael McCarver on Nov 2013
I have the same error "The Web Application Project MyModule is configured to use IIS. The Web server 'http://dnndev.me/desktopmodules/MyModule' could not be found." using VS 2012 and i add DNNDEV.ME as a HOST BINDING in IIS and it's runing ok from the url http://www.dnndev.me/ on my local computer so what is the missing Chris!! i need to solve that so soon
Posted By: mohamed adam on Nov 2013
I have download V2.5 from christoctemplate.codeplex.com, but can't install to VS2013 Express. Is this version can't install to Express Version. Error log: 29/11/2013 17:48:54 - Beginning to install extension to Microsoft Visual Studio Express 2013 for Web... 29/11/2013 17:48:54 - Install Error : Microsoft.VisualStudio.ExtensionManager.MissingReferencesException: This extension cannot be installed because the following references are missing: - Visual Studio MPF 11.0 Microsoft.VisualStudio.ExtensionManager.ExtensionManagerService.CheckForInstallBlockers(InstallableExtensionImpl extension, IInstalledExtensionList modifiedInstalledExtensionsList, Boolean isNestedExtension, Boolean& olderVersionInstalled) Microsoft.VisualStudio.ExtensionManager.ExtensionManagerService.InstallInternal(InstallableExtensionImpl extension, Boolean perMachine, Boolean isNestedExtension, IDictionary`2 extensionsInstalledSoFar, List`1 extensionsUninstalledSoFar, IInstalledExtensionList modifiedInstalledExtensionsList, AsyncOperation asyncOp, UInt64 totalBytesToWrite, UInt64& totalBytesWritten) Microsoft.VisualStudio.ExtensionManager.ExtensionManagerService.BeginInstall(IInstallableExtension installableExtension, Boolean perMachine, AsyncOperation asyncOp) Microsoft.VisualStudio.ExtensionManager.ExtensionManagerService.InstallWorker(IInstallableExtension extension, Boolean perMachine, AsyncOperation asyncOp)
Posted By: Jacky Sin on Nov 2013
Hi, we're using module project template to build the module as well as generate release zip file - works excellent. In order to test the module, the workflow right now is updating module's folder under DesktopModules - it's a frustration. Is there any better way of debugging custom built module?
Posted By: Ostap R on Jan 2014
If you aren't using the module template in the desktopmodules/ModuleName folder, and you have to publish to there in order to debug, that right there is your problem. My instructions are pretty clear about where the module should be created.
Posted By: Chris Hammond on Jan 2014
I'm in the process of upgrading my CodeSmith templates to DNN 7 and I'm struggling a bit with the "best of show" layout. I can't really find a document that says the optimal layout for a project, and for a module. My stuff is currently based off DNN 4/5 with a view/list/edit on the UI, and a module controller. The DNN 7 layout used in your module templates seems better, but I can't really find any information on the optimal structure. Any hints for me?
Posted By: Keith Stone on Feb 2014
Keith, my personal opinion is that my templates take the best approach for anyone starting out in DNN module development.
Posted By: Chris Hammond on Mar 2014
Hi Chris, I have tried to create the new project using your template. However, It doesn't show me item.cs or itemController.cs file under component folder. Please let me know How do I get it? Thanks
Posted By: jignasha parekh on Jun 2014
I am trying to develop a new module using DNN Platform 7.03 to test out new functionality. We have been using DNN since version 4.x so I am familiar with how things should work. I have the dev environment set up and IIS setup. However, when I compile the project it changes the physical path to my website form http://www.dnndev.me to http://www.dnndev.me/DesktopModules/KGIS_SearchBar/ Do you have any suggestions? Thanks.
Posted By: Bryan Lynn on Sep 2014
I needed to add some third party assemblies into the module package. This required a bit of detective work. If anyone is interested in the steps I took, please drop me an email.
Posted By: Patrick Fischer on Mar 2015
The .vsix download from Codeplex doesn't install. I get the error: Install Error : Microsoft.VisualStudio.ExtensionManager.InstallByMsiException: The InstalledByMSI element in extension DotNetNuke Project Templates cannot be 'true' when installing an extension through the Extensions and Updates Installer. The element can only be 'true' when an MSI lays down the extension manifest file.
Posted By: George S on May 2015
Has anyone ever determined what causes Visual Studio to create the virtual directory (and in my case an application) in IIS? I'm working with Visual Studio 2013 and Evoq Engage v8 trying to edit a module that was originally created with Chris' template. I didn't create the solution, just inherited it. Every time I load the solution. Visual Studio turns DesktopModules into a virtual directory AND it creates an application in IIS under the DesktopModules folder of the name of my solution or project (they have the same name, but it is different than the name of the folder under DesktopModules where the solution resides. This is really getting annoying, especially when I try to flip the debug switch in the DNN web.config. DNN does things like render all of the controls on every page multiple times. If I delete the virtual directory and application, everything works fine. I was hoping someone would have figured out what causes this to happen by now.
Posted By: Jeron Coolman on May 2015
Jeron, One thing you might check is the project properties, make sure the URL for the project is the same URL that you have setup in IIS for the host bindings.
Posted By: Chris Hammond on May 2015
hi chris. i'm using vs2013 and install the vsix template successfully,but when i'm trying to create a new project, my project files get create in destination folder but the VS2013 get stopped and after that i cannot load again the project and if i wanna create another project the last scenario will be repeated. how i can fix this problem. thanks in advance.
Posted By: Mousa Khodaei on May 2015
Mousa, you will need to provide more detail as to what you are experiencing. I suggest you post in DNNCHAT.com and see if someone there can assist.
Posted By: Chris Hammond on Jun 2015
Please ignore, my previous comment. Error: id10t - User down loading the wrong verion.
Posted By: Garth Almond on Jun 2015
Hi I can't get the template to install on Visual Studio Premium 2012. the install log says: VSIXInstaller.NoApplicableSKUsException: This extension is not installable on any currently installed products.
Posted By: Garth Almond on Jun 2015
Hi Chris, I'm using your template + VS2015 + DNN 7.04.02. I was able to compile & install a basic component using the DAL2 template on my website. But unfortunately, if I drag the component to a page, nothing is shown (I was expecting to see at least the View.ascx content at least). However, if I create a different component, but using the DNN 7 Compiled template (not DAL2), the component title and menu settings is actually shown. Am I missing something? Is there any setting/configuration that I would be missing in order to display my component? Host > Extensions says that my component is already added to the page. Thanks!
Posted By: Claudio M. E. Bastos Iorio on Dec 2015
Hi, I follow the 4 videos instructions, but when I try to navigate to the dnn site for the first time I get the error: The page isn't redirecting properly. Firefox has detected that the server is redirecting the request for this address in a way that will never complete. And the same for chrome and IE. In the database I don´t have tables yet. If someone has an idea what I have to check it would be apprecite. Thanks in advance
Posted By: Mario Peña on Nov 2015
I followed the instruction, everything worked fine no problems but after the final build I do not see any install package being created. Is this something that can be done in Visual Studio 2015 Community
Posted By: Tareq M on Jan 2016
Tareq, are you positive you're switching to RELEASE mode when building?
Posted By: Chris Hammond on Jan 2016

Hello, I ran into a problem upgrading to VS2015 and DNN 8.03. Now I get a localization error on the DAL2 template edit.ascx page and it has lost functionality, i.e it compiles but wont write the record to the database, the dropdownlist Assigned UserID does not populate. Searched the net for several days and although this problem has been discussed before i dont see a resolution. It is a problem for my dnndev,me development environment - i dont get the same problem in my deployed server?? Any help?

Posted By: John Richardson on Jun 2016

Hi Chris, 90% of modules I'm developing have MS ReportViewer reports included. What do I have to edit or where to save the report files to get them included in the install zip file. Now, after module instalation on production site I upload the reports manually. Thank you in advance.

Posted By: Kristian Radolovic on Jul 2017

Thanks for the updated templates Chris

Posted By: Ratin Edmond on Oct 2017

thanks for this post

Posted By: ratin ratin on Oct 2017

Good explanation. Thank you for sharing

Posted By: James David on Aug 2018

Settings class conflict in VS2019 with VB.Net Compile module template? The module template creates a class called "Settings". HOWEVER, if you add a setting to the project properties... VS2019 also creates a "Settings" class (expand "Project"). They conflict. How do you resolve that in your modules?

Posted By: Mike Brearton on Sep 2020

Add Comment

Please add your comment by filling out the field(s) below. Your comment may need to be approved before it becomes visible.
Enter your first name for display with the comment
Enter your last name for display with the comment.
Enter your comment here.
If you can't type Human2 in, you can't post, plain and simple.
Submit Comment Cancel

Chris Hammond

Chris Hammond

is a father, husband, leader, developer, photographer and car guy. Chris has long specialized in ASP.NET and DotNetNuke (DNN) development, so you will find a variety of posts relating to those topics. For more information check out the about Chris Hammond page.

If you are looking for DotNetNuke consulting please visit Christoc.com Software Solutions

Find me on Twitter, GitHub and LinkedIn.