Michael Washington explains in detail the steps required for packaging a module at:
http://www.adefwebserver.com/DotNetNukeHELP/DNN_PackageModule/Default.htm
However, there are 2 points that are missing from that tutorial:
1) The DLLs are created Folder wise. That means dll for code-behinds in DesktopModules & App_Code files are generated separately. And if there are sub-folders in the main module folders, they again have separate assemblies generated. But I have seen modules (including those shipped with DNN) have just 2 assemblies, the main logic assembly (including code-behinds) & the SqlDataProvider assembly??
So, how can I achieve the same, while preserving the folder structure of my module (or would I need to put everything in the same folder)??
2) I don't want to provide my clients with the ascx markup. So, if I create my assemblies without the following option:
Allow this precompiled site to be updatable
Would it be possible for DNN to pick up my module controls from the assembly. If yes, then how should I provide the control entries in the <controls> & <files> section of DNN configuration file for my module???