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 Monday, January 28, 2013 6:01 AM
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 Monday, January 28, 2013 11:04 AM
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 Tuesday, January 29, 2013 12:37 AM
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 Tuesday, January 29, 2013 12:45 AM
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 Wednesday, January 30, 2013 11:19 AM
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 Thursday, January 31, 2013 1:34 PM
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 Friday, February 01, 2013 7:29 PM
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 Saturday, February 02, 2013 12:35 AM
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 Sunday, February 03, 2013 6:53 AM
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 Sunday, February 03, 2013 11:27 AM
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 Sunday, February 03, 2013 2:05 PM
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 Sunday, February 03, 2013 2:14 PM
OOPS! I meant to say that I created the project in Visual Studio 2012!
Posted By: Allen Foster on Sunday, February 03, 2013 2:15 PM
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 Monday, February 04, 2013 3:43 AM
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 Monday, February 04, 2013 9:57 AM
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 Friday, February 08, 2013 3:58 AM
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 Friday, February 08, 2013 11:47 AM
Do these templates built around WebAPI/MVC or more for web forms modules?
Posted By: Mustaffa MacGregor on Wednesday, March 06, 2013 3:12 PM
@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 Wednesday, March 06, 2013 3:32 PM
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 Wednesday, March 13, 2013 11:30 AM
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 Sunday, March 17, 2013 11:33 AM
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 Friday, March 29, 2013 7:35 AM
Danny, I don't know what causes that error unfortunately.
Posted By: Christopher Hammond on Friday, March 29, 2013 8:44 AM
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 Tuesday, April 02, 2013 4:57 AM
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 Tuesday, April 02, 2013 10:58 AM
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 Thursday, April 11, 2013 5:03 PM
Michele, that question would be better asked over on http://www.dnnchat.com/
Posted By: Chris Hammond on Thursday, April 11, 2013 5:13 PM
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 Tuesday, April 23, 2013 5:47 PM
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 Tuesday, April 23, 2013 5:43 PM
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 Tuesday, April 23, 2013 11:20 PM
Hi, I get the same error in release mode as Rodney
Posted By: Alois kleine on Saturday, April 27, 2013 4:21 PM
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 Saturday, April 27, 2013 6:09 PM
**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 Tuesday, May 07, 2013 2:37 AM
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 Wednesday, May 08, 2013 12:18 PM
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 Wednesday, May 08, 2013 12:27 PM
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 Sunday, May 26, 2013 12:17 PM
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 Sunday, May 26, 2013 12:10 PM
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 Monday, June 17, 2013 3:53 AM
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 Monday, June 17, 2013 11:16 AM
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 Monday, June 17, 2013 3:00 PM
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 Monday, June 17, 2013 3:05 PM
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 Thursday, June 27, 2013 1:37 PM
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 Thursday, June 27, 2013 2:47 PM
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 Wednesday, July 24, 2013 6:24 PM
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 Wednesday, August 28, 2013 9:25 AM
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 Wednesday, August 28, 2013 10:42 AM
Thanks for the updated templates Chris! Keep it up!
Posted By: Rouan van Niekerk on Wednesday, September 04, 2013 6:24 AM
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 Monday, September 02, 2013 9:43 AM
Thank you and keep up the good work!
Posted By: Adron Yusuf on Tuesday, September 24, 2013 7:36 PM
Good work Chris. Thanks for the update.
Posted By: Oscar Moreno on Tuesday, October 01, 2013 11:21 PM
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 Wednesday, October 02, 2013 11:34 AM
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 Monday, November 11, 2013 11:49 PM
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 Monday, November 18, 2013 3:18 PM
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 Tuesday, November 26, 2013 3:49 PM
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 Friday, November 29, 2013 5:20 AM
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 Saturday, January 04, 2014 4:36 PM
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 Saturday, January 04, 2014 8:56 PM
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 Friday, February 28, 2014 1:55 PM
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 Sunday, March 02, 2014 11:22 AM
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 Monday, June 02, 2014 4:11 PM
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 Thursday, September 04, 2014 2:13 PM
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 Wednesday, March 11, 2015 10:39 AM
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 Monday, May 04, 2015 6:01 AM
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 Tuesday, May 05, 2015 12:57 PM
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 Tuesday, May 05, 2015 10:53 PM
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 Sunday, May 31, 2015 11:42 AM
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 Monday, June 01, 2015 8:49 AM
Please ignore, my previous comment. Error: id10t - User down loading the wrong verion.
Posted By: Garth Almond on Friday, June 26, 2015 6:54 AM
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 Friday, June 26, 2015 6:47 AM
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 Tuesday, December 22, 2015 11:19 AM
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 Sunday, November 15, 2015 12:29 PM
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 Monday, January 25, 2016 11:12 AM
Tareq, are you positive you're switching to RELEASE mode when building?
Posted By: Chris Hammond on Monday, January 25, 2016 12:09 PM

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 Sunday, June 12, 2016 5:26 PM

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 Saturday, July 29, 2017 9:12 AM

Thanks for the updated templates Chris

Posted By: Ratin Edmond on Sunday, October 15, 2017 7:57 AM

thanks for this post

Posted By: ratin ratin on Sunday, October 15, 2017 7:54 AM

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 email address so that we may contact you if necessary. We will also use this for your Gravatar.
Enter the URL to your website. URLs may be removed from comments.
Enter your comment here.
If you can't type Human in, you can't post, plain and simple.
Submit Comment Cancel

Chris Hammond is a father, husband, leader, developer and car guy. Chris has long specialized in ASP.NET and DotNetNuke development, so you will find a variety of topics here on the website. For more information check out the about me page.

If you are looking for DotNetNuke consulting please visit my business website at http://www.christoc.com/

Any blog posts here are solely the opinion and views of Chris Hammond only. Comments on blog posts are the opinion of the commenter, and not Chris Hammond.

This website is managed by Christoc.com Software Solutions

Hosting for this website is provided by AppliedI.Net. Be sure to visit them for all your DotNetNuke Hosting needs.