I am having an interesting time with DNN and using the new compiled modules template. I have read the ADefwebserver tutorial on using the new (er...or old) Web Application Projects (WAP) way of ASP developement. But I have several oddities and strangenesses that I was wondering if anyone could shed some light on.
I am using Visual Studio 2005 Team Edition with the whole Team System set up in place. I started my application as the DNN 4.4.1 Starter kit, and I place it in its own folder under Inetpub\wwwroot. It is set up as a web application in IIS (at least to the best of my ability. I have had some trouble with that as well). After I used the Starter kit by going to File - New - Website, and maded sure the website ran in IE, I went to Project - New Item - and chose the New DNN Compiled Module template. Visual Studio asked where I wanted the project placed. After reading the ADefwebserver tutorial I now knew to put it under the Desktop Modules folder under Inetpub\wwwroot\AppName. Before that I had put them in other locations and then DNN never seemed to work with them.
Now a new solution is automatically created for me since I now have one project and one website in the solution. I had not originally opened the DNN solution that came with DNN, as I used the starter kit to create the web site. The interesting thing at this point is that each file that was created with the Compiled Module is listed twice in the solution. This is because each file is listed in the project I just created but its also listed under the Desktop Modules folder in the web site because it's physically under the Desktop Modules folder. You can't edit the same file from both places in the solution as you will get a message saying that the file is opened in another project. I find this "double listing" of a single source file to be odd, but, I assume, who ever wrote the Compiled Module template must know this. I can only assume that it's by design, but I think this is the beginning of Visual Studio getting confused.
At this point I have several issues with References but eventually I got it sorted out. I also reset the output directory for the compiled dll to the AppName/bin folder so that the web site could see it. DNN seemed to work before but sometimes my changes didn't seem to show up in other parts of the code.
I am trying to use Telerik controls and I found that I can't drag the RadGrid off the Toolbox and drop it on a View.ascx control from inside the project. I have to do it from the copy of View.ascx inside of the Desktop Modules\ModuleName folder. If I attempt to do it from the Project copy, I will get a Visual Studio error saying that the control can't be found in the 'Control Assembly'. The forums on the Telerik website say this is a Visual Studio problem. Maybe, but I still haven't seen a way to fix it.
In my solution I add another project, and I don't know if this problem is before or after I add the second project. But I start getting squiggly lines under the 'DataProvider' variable that says that it's ambiguous in the '<MyCompany>.Modules.<ModuleName> namespace. I have had a couple of projects within this solution that I have subsequently removed from the solution that had similiar names as the current projects but the names are not exactly the same. So I don't think this should have anything to do with this. But now I have two projects under DNN that both have two source files named exactly the same and both defining classes with the exact same name: DataProvider.vb and SqlDataProvider. They are under different namespaces at the class level, but the 'Root Namespace' under the Project properties tab was blanked out (as I followed the directions that the template gave after using the Compiled Module template. Don't know if this has anything to do with it or not)
Due to the above ambiguous problems I started messing with the namespaces at the class level. So instead of a 'Ticket' module having the original name of 'YourCompany.Module.Ticket' I changed it to 'BobsCompany.Module.Ticket'. At that point and even after recompiling, lots of references seem to get lost and I have to 'Clean' the solution and recompile several times before the references can resolve themselves. Sometimes I delete the relevent dlls in the bin directory also.
I guess the main thing I would like to clear up here is why is DataProvider ambiguous, and with what? And is this double listing of source files done on purpose and could that be the source of any of these problems? Isn't this Solution - Project structure a little strange?
Your thoughts would be appreciated...
Thanks,
Tom