Latest Posts

Packaging your DotNetNuke Module using NANT

Last Updated Wednesday, January 23, 2008 4:51 PM


A few years back I was enlightened by Chris Paterra in the ways of using NANT scripts to aid in the packaging of DotNetNuke Modules. Using NANT to package your WAP (web application project) modules within Visual Studio 2005 is a snap, and can save you a LOT of time each time you have to come up with a new release.

Using NANT scripts we are able to create the Private Assembly Installation ZIP file and Source files for Engage: Publish by running a single command from the Command line. With our Publish module this process takes about 23 seconds on average, for our smaller modules such as Engage: F3 the process takes less than 2-3 seconds.

To get started with using NANT scripts in your own development environment you need to download the latest (0.85) release from SourceForge, you can visit the project page at http://sourceforge.net/projects/nant/

Once you've installed NANT on your machine (I install it on my C drive in a c:\nant\ folder) you'll need to add NANT to your system variables path so you can call it from the command line.

To do this:

Right click on My Computer and choose Properties

Go to the Advanced Tab

Find the System Variables section and Modify the Path variable

Add your NANT folder (c:\nant\) to the path, separating entries with the semicolon (;)

Save the settings.

Now I'd recommend adding a .BUILD file to your DNN Module's project/solution. I've provided a sample build file on our Tutorial Page at www.engagemodules.com, you do have to login in order to access the file. The provided sample file is a good start for your project, by opening up the file in VS2k5 you'll see it is a XML document with some basic information about the product name and folder location.

You'll want to find the references to Engage and EngageF3 in the BUILD file and replace them with the name of your module and business name. You can also play around with the include/exclude options in the Fileset node to add or remove certain types of files from your packages. You'll see the two sections in the build file that define which ZIP files to create, one section is called CreateBinZip and one is called CreateSrcZip.

Once you have the BUILD file setup you'll want to check a few more files in your DNN project.

In the .DNN File be sure to set your module version properly and include the SQLDATAPROVIDER files, as well as the necessary DLLs. In the AssemblyInfo.vb (.cs in our case. At Engage as we do 95% of our DNN module development in C#) be sure to setup your DLL information and version information. By setting the version number in the assemblyinfo and .dnn file you can get NANT to include the version number in the package's file name, allowing an easy way to handle upgrades from version to version for your modules.

Once you have all of the files in the solution setup properly you can run the NANT script. To do that bring up a Command Prompt, change directories to your DNN/desktopmodules/ModuleName/ folder. At the command line type "nant" and watch the magic happen.

If everything builds properly the script will create a Package folder in your Module's folder, inside of the Package folder you should find two newly created ZIP files, one labeled Install and one labeled Source.

 

Posted from weblogs.asp.net/christoc
Rate this:
Recent Comments
There are currently no comments. Be the first to make a comment.
Tuesday, January 06, 2009
Trips and Travel

1/4 Chicago for DNN Training
4/4 Kansas City Evo School

4/11 Newport Arkansas ProSolo
4/18 Kansas City Midiv
4/28 Speaking at STL .Net UG

5/11 St. Louis Event #3 cancelled
5/16 Atlanta DoubleCross
5/19-5/23 DotNetNuke Training in Washington DC
5/21 Capital DotNetNuke User Group Presentation
5/24 Atlanta National Tour
6/8 Stone Temple Pilots, St. Louis
6/16 DNN Training in St. Louis

6/21 Washington DC ProSolo
6/23 DNN Training in Baltimore
6/28 Peru National Tour
7/5 Toledo ProSolo
7/19 Milwaukee National Tour
8/2 Topeka Divisional
8/26 Red Sox at Yankee Stadium
8/27 DNN Training New Jersey
8/30 Kansas City National Tour
9/12 ProSolo Finale
9/18 SCCA Solo Nationals

9/25 New England Visual Basic User's Group
9/26 Yankees at Fenway

9/28 Yankees at Fenway
10/3-9 OpenForce Europe (Amsterdam)
10/08 Tulsa Tech Fest (unable to attend)
10/10-19 Dubai
10/14 Bloomington .Net UG (unable to attend)
11/04 Election Day
11/10-11/13 OpenForce 08
12/15-19 Valencia, CA DNN Training
12/31-1/4 Colorado Trip
1/11-1/16 Connecticut

Tags
  1. 11 items are tagged with .net
  2. 6 items are tagged with 240Z
  3. 58 items are tagged with asp.net
  4. 44 items are tagged with Autocross
  5. 7 items are tagged with Baseball
  6. 39 items are tagged with Boston Red Sox
  7. 6 items are tagged with Club Racing
  8. 29 items are tagged with Community Server
  9. 14 items are tagged with communityserver
  10. 17 items are tagged with Corvette
  11. 26 items are tagged with daily tips
  12. 6 items are tagged with Datsun
  13. 92 items are tagged with Development
  14. 167 items are tagged with DotNetNuke
  15. 7 items are tagged with DotNetnuke Conference
  16. 25 items are tagged with DotNetNuke Development
  17. 11 items are tagged with DotNetNuke Tips
  18. 10 items are tagged with DotNetNuke Training
  19. 57 items are tagged with Fitness
  20. 106 items are tagged with Friends
  21. 43 items are tagged with Games
  22. 32 items are tagged with general Software Development
  23. 21 items are tagged with HDTV
  24. 18 items are tagged with Health
  25. 366 items are tagged with Life News
  26. 12 items are tagged with Microsoft
  27. 37 items are tagged with Music
  28. 11 items are tagged with OpenForce 07
  29. 84 items are tagged with Photography
  30. 8 items are tagged with Photos
  31. 89 items are tagged with Pictures
  32. 108 items are tagged with Places to See
  33. 20 items are tagged with Project 240Z
  34. 12 items are tagged with Project 350Z
  35. 19 items are tagged with Red Sox
  36. 19 items are tagged with Red Sox in St. Louis
  37. 7 items are tagged with Saint Louis
  38. 14 items are tagged with SCCA
  39. 416 items are tagged with SEO
  40. 203 items are tagged with Site News
  41. 8 items are tagged with Snow
  42. 7 items are tagged with Solo Nationals
  43. 28 items are tagged with St. Louis
  44. 270 items are tagged with Technology
  45. 25 items are tagged with Travel
  46. 17 items are tagged with Vista
  47. 16 items are tagged with Weblog
  48. 8 items are tagged with World Series
  49. 16 items are tagged with Xbox360
  50. 11 items are tagged with Zune