Hi All,
I've developed a module that has a subfolder in a subfolder. The module controls are in DesktopModules/Hslda/Quiz, and the class files are in App_Code/Hslda/Quiz.
This worked fine during development, but upon packaging up my module and attempting to deploy it to another site, I've run into a few problems:
1) DNN, upon installation, seemed to turn Hslda/Quiz into Hslda_Quiz, and now it can't find my user controls. Here's a sample error: DotNetNuke.Services.Exceptions.ModuleLoadException: The file '/dnn/DesktopModules/HSLDA_Quiz/Quiz.ascx' does not exist.
2) It is inserting the following into the web.config:
<codeSubDirectories>
<add directoryName="Hslda/Quiz" />
</codeSubDirectories>
This is not valid, only immediate subdirectories of App_Code (in this case, Hslda) are valid. Changing it to this:
<codeSubDirectories>
<add directoryName="Hslda" />
</codeSubDirectories>
Fixes the problem. But I'd rather not that installing my module completely breaks the site, and I have to manually edit the web.config file to fix it!
My module is written in C#, and at this point I am not precompiling it.
So, what should I do? Are nested subfolders simply not supported for module development, and I should move from "Hslda/Quiz" to "HsldaQuiz" (a single folder deep)?
My module name is HSLDA_Quiz, and the manifest file is HSLDA_Quiz.dnn. Here it is in it's entirety:
<dotnetnuke version="3.0" type="Module">
<folders>
<folder>
<name>HSLDA_Quiz</name>
<friendlyname>HSLDA Quiz</friendlyname>
<foldername>Hslda/Quiz</foldername>
<modulename>HSLDA_Quiz</modulename>
<description>Quiz module for displaying a multiple choice quiz</description>
<version>01.00.00</version>
<businesscontrollerclass>HSLDA.Web.DotNetNuke.Modules.Quiz.QuizController</businesscontrollerclass>
<modules>
<module>
<friendlyname>HSLDA Quiz</friendlyname>
<cachetime>0</cachetime>
<controls>
<control>
<src>Quiz.ascx</src>
<type>View</type>
</control>
<control>
<key>Edit</key>
<title>Edit Quiz</title>
<src>EditQuiz.ascx</src>
<type>Edit</type>
</control>
<control>
<key>Settings</key>
<title>Quiz Settings</title>
<src>Settings.ascx</src>
<type>Edit</type>
</control>
<control>
<key>ViewGrades</key>
<title>View Grades</title>
<src>QuizGrades.ascx</src>
<type>Edit</type>
</control>
</controls>
</module>
</modules>
<files>
<file>
<path>Providers\DataProvider\SqlDataProvider</path>
<name>01.00.00.SqlDataProvider</name>
</file>
<file>
<path></path>
<name>EditQuestion.ascx</name>
</file>
<file>
<path></path>
<name>EditQuestion.ascx.cs</name>
</file>
<file>
<path></path>
<name>EditQuiz.ascx</name>
</file>
<file>
<path></path>
<name>EditQuiz.ascx.cs</name>
</file>
<file>
<path></path>
<name>Quiz.ascx</name>
</file>
<file>
<path></path>
<name>Quiz.ascx.cs</name>
</file>
<file>
<path></path>
<name>QuizGrades.ascx</name>
</file>
<file>
<path></path>
<name>QuizGrades.ascx.cs</name>
</file>
<file>
<path></path>
<name>QuizQuestion.ascx</name>
</file>
<file>
<path></path>
<name>QuizQuestion.ascx.cs</name>
</file>
<file>
<path></path>
<name>Settings.ascx</name>
</file>
<file>
<path></path>
<name>Settings.ascx.cs</name>
</file>
<file>
<path></path>
<name>Uninstall.SqlDataProvider</name>
</file>
<file>
<path>[app_code]Providers\DataProviders\SqlDataProvider</path>
<name>SqlDataProvider.cs</name>
</file>
<file>
<path>[app_code]</path>
<name>DataProvider.cs</name>
</file>
<file>
<path>[app_code]</path>
<name>QuestionAnswerData.cs</name>
</file>
<file>
<path>[app_code]</path>
<name>QuestionData.cs</name>
</file>
<file>
<path>[app_code]</path>
<name>QuizAttemptData.cs</name>
</file>
<file>
<path>[app_code]</path>
<name>QuizController.cs</name>
</file>
<file>
<path>[app_code]</path>
<name>QuizData.cs</name>
</file>
</files>
</folder>
</folders>
</dotnetnuke>
-Josh