Setting up SubSonic in your DNN module Solution
18 Jun
In my modules I generally have three different projects. One for SubSonic, one for common stuff, and one for the module itself. The first thing I do when setting up a module is add a project for SubSonic. Let’s add a “Class Library” and call it “DataModel”.
I’ll get to the setup of the other projects in another post. Let’s just worry about SubSonic for right now as it is probably the easiest project to setup.
Now that we have the project added let’s add our app config. From the “Project” menu click “Add New Item…”. Select “Application Configuration File” and add it to your project.
Here is the blank app.config file that I use to get started. You will need to alter some of the settings to fit your project.
You can find more information on setting up the app.config here: http://subsonicproject.com/setup/gettingstarted/
After you have done the initial setup you will be able to generate your classes. If you haven’t already setup SubSonic in Visual Studio you can learn how here: http://michaelpardo.com/2009/06/visuals-studio-and-subsonic/
Click “Tools” and then “SubSonic” to generate the classes. You will not see the files in the Solution Explorer until you click “Show All Files” and “Refresh”. If you have done all these steps properly you will see a “Generated” folder in your project. Add the folder and build.
You’re done! Now you can reference this project in your module.


Hi! I like your srticle and I would like very much to read some more information on this issue. Will you post some more?
Konstantin,
I develop DotNetNuke modules using SubSonic all day. I will have a lot more to post about. Let me know if you are looking for something specific
Hi Michael, I’m following your approach, so I’ve created a Class Library, in my case using VB.NET and Subsonic 3.0
In the other hand I’ve a custom DNN module, done in the standard way, taken from the official DNN Module Programming book, which I’m using as a blue-print for my own custom module.
I would like to follow your three-project schema and modify o re-create the module to use Subsonic. Do you plan to continue this post covering the other projects setup? Some sample code applying your techniques would be nice. Thank you.