Tagged Posts

VS2015-Templates

I’ve been maintaining my DotNetNuke Visual Studio project templates for a number of years now, one of the things they have sorely been lacking is the ability to “customize” the templates without having to crack open the full source code of the VSIX project, making changes, and then recompiling everything. There are 5 specific strings/values that were ripe for customization, but simply were not easily accessible.

  • Root NameSpace – The Namespace for the project, all of the files were populated with this namespace.
  • Owner Name – A DNN Manifest property that is used to provide information on who either developed the module, or commissioned the module development. This also gets used in all of the Copyright statements built into the templates.
  • Owner Email – Another DNN Manifest property, used to provide an Email address for contacting the owner/developer of a module.
  • Owner Website – The URL of the package’s owner, for further contact and information.
  • Local DEV URL – The URL of your local development environment.

Of all of those items, the one that has likely caused the most headache over the years is the Local DEV URL property, that was set at DNNDEV.ME, which if you followed along with my various tutorials, was the URL I always use for local development, that domain name points to 127.0.0.1. This actually works out great, but some people choose not to follow my tutorials or already have existing development environments configured, yet still want to use my templates. You could still use them, but you had to make some modifications to the PROJ files after creation in order to get things working.

With the latest release of the templates, when you create a project using one of the 6 included templates, you will then be prompted with a Wizard interface (single step) that will allow you to customize these fields.

TemplateCapture

As always, you can download the latest “release” of the templates from the DNN Store, or from the Visual Studio Online Gallery if you want to get creative, you can check out the Repo on GitHub

With the release of DNN Platform 8 last week it is now possible to develop modules using SPA and MVC patterns within the DNN platform. As Part of the buildup of the DNN 8 release, Will Strohl provided a Pull request to my DNN Extension Project Templates project to help clean up some of the basic module templates to work better on Windows Azure environments, and to prep them for inclusion of new DNN 8 specific templates for SPA and MVC modules. Early in the fall Joe Brinkman provided a partial SPA project, with the intention of it becoming a project template. I had a little time when it was initially submitted to work on it, but wasn’t able to get everything squared away on the template until early December. It wasn’t until last week that I got additional time to do further testing on the template and fix a few issues that occurred during the conversion to a project template.
If you’re a developer who frequently creates DotNetNuke Module Projects, than you likely realize DNN is far easier to work with when you run Visual Studio as an Administrator. Why? Because DNN, and the method of module development that I preach, requires your environment to use IIS locally, not with dynamically assigned ports and such that IIS Express will use.

This blog post is no longer being maintained, visit the Christoc.com Tutorial for customizing the module development templates.

With the 2.0 release of my module development project templates last week I’ve had a few inquiries into how to customize the templates. You can download the templates from http://christoctemplate.codeplex.com/

Why Modify the Templates?

First, why might you want to modify the custom templates? The main reason is that these templates are defined using a specific namespace, DotNetNuke.Modules.*, which is fine in most cases, but what if you want to use your own namespace? Well you have to create a project, then search/replace all instances of that namespace, while not removing any DNN references at the same time. Customizing the project templates will allow you to define your own company namespace, email address, website, and even copyright information, in the template so that you do not have to search/replace every time you create a new project.

RSS URL

Chris Hammond is

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/

Disclaimer

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.

Powered By

This website is managed by Christoc.com Software Solutions

Find Me