I don’t know how many of you are interested or follow up on this effort. For those of you that do, I’m happy to say that the first release is very close.
The issue I still have to solve before publishing my code is the configuration one. Subsonic uses Web.Config to specify Database connection strings and the .Net 2.0 provider model to specify the Database drivers to be used. All these are configured in a custom configuration section that is read with a WebConfigurationSection descendant class at built time.
Since though custom build providers are not available at the Windows Forms platform I had to use another technique to emit the generated code in my programs. For this I decided to use Visual Studio Custom Tools following Dino Esposito’s article on MSDN Magazine. The problem with this implementation is that since your BaseCodeGeneratorWithSite class is registered as a COM object and created in Visual Studio’s scope, it has no longer access to types that could resolve the Custom App.Config Section (doesn’t know where to find the assemblies).
I’m thinking on putting the configuration section on the custom file that is passed on the BaseCodeGeneratorWithSite class as a parameter in the GenerateCode(string inputFileName, string inputFileContent) method. What do you think?