DotNetNuke 7 Module Templates
I wanted to stick with the environment setup I have been using which is a host name of dnn7 or dnndev. Working in IIS and modifying my host file is not an issue for me. If you are looking for a way to create a new module directly within the DotNetNuke CMS environment, you could give this extension a try: DNN Module Creator.
Download Source Code for Christoc’s DotNetNuke Module Development Template at http://christoctemplate.codeplex.com/
This post is based on the DotNetNuke 7 Project Templates V2.0 for VS2012, Thu Jan 24, 2013. Newer 2.x versions of this template project may have somewhat different node or node block keys in the csproj files for the environment variables we are modifying in this guide. The premise is still the same and this information should be enough to help make the changes as needed.
You will need this to modify and rebuild the source: Microsoft Visual Studio 2012 SDK http://www.microsoft.com/en-us/download/details.aspx?id=30668 Filename: vssdk_full.exe
Modified these two template project files
CSharp-Template.csproj
CSharp-DAL2-Template.csproj
In these two nodes
WebProjectProperties/IISUrl
WebProjectProperties/IISAppRootUrl
Replace
$devenvironmenturl$
with
dnndev
REPLACED
<WebProjectProperties>
<UseIIS>True</UseIIS>
<AutoAssignPort>True</AutoAssignPort>
<DevelopmentServerPort>62640</DevelopmentServerPort>
<DevelopmentServerVPath>/</DevelopmentServerVPath>
<IISUrl>http://$devenvironmenturl$/desktopmodules/$safeprojectname$</IISUrl>
<OverrideIISAppRootUrl>True</OverrideIISAppRootUrl>
<IISAppRootUrl>http://$devenvironmenturl$/</IISAppRootUrl>
<NTLMAuthentication>False</NTLMAuthentication>
<UseCustomServer>False</UseCustomServer>
<CustomServerUrl>
</CustomServerUrl>
<SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
</WebProjectProperties>
WITH
<WebProjectProperties>
<UseIIS>True</UseIIS>
<AutoAssignPort>False</AutoAssignPort>
<DevelopmentServerPort />
<DevelopmentServerVPath />
<IISUrl>http://dnndev/desktopmodules/$safeprojectname$</IISUrl>
<OverrideIISAppRootUrl>True</OverrideIISAppRootUrl>
<IISAppRootUrl>http://dnndev</IISAppRootUrl>
<NTLMAuthentication>False</NTLMAuthentication>
<UseCustomServer>False</UseCustomServer>
<CustomServerUrl>
</CustomServerUrl>
<SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
</WebProjectProperties>
I don’t use the Visual Basic templates so I left those projects AS IS
I needed to also update the MSBuildTasks version numbers in the templates. For the version 1.4.0.56 of MSBuildTasks I installed today from nuget using the Package Manager Console in Visual Studio [code][/code]PM> Install-Package MSBuildTasks[code][/code] Opened Template Solution DNNTemplates.sln Searched Entire Solution Find in Files MSBuildTasks.1.4.0.45 Replace with MSBuildTasks.1.4.0.56 SAVE ALL / REBUILD SOLUTION