I took a quick look at the code in DotNetNuke.Entities.Modules.PaWriter.vb to determin where in the code the failure to process vb class files in a folder under App_Code was occuring. As I suspected, the problem stems from my mismatched folder structures being \DesktopModules\WESNet\EPrayer\ vs \App_Code\WESNet_EPrayer. In the method PaWriter.CreatePrivateAssembly, the module folder and App_Code folder are determined from the modules FolderName field as follows:
_Folder = Common.Globals.ApplicationMapPath & "\DesktopModules\" & objModule.FolderName
_AppCodeFolder = Common.Globals.ApplicationMapPath & "\App_Code\" & objModule.FolderName
Both folder structures must match. In my case, \App_Code\WESNet\EPrayer\ did not exist so none of the vb class files were being processed. Since the web.config node <codeSubDirectories> will not accept directories more than one directory beneath App_Code, I was under the mistaken understanding that it was invalid to have a folder structure of \App_Code\WESNet\EPrayer\. I have found that this folder structure is permitted but cannot be added as a DirectoryName to the <codeSubDirectories> node. This should not be necessary anyway as both my module and DNN use VB. I'm not sure how one would handle it for a C# module in which case an entry in <codeSubDirectories> would be required.
After changing my App_Code folder structure to match that of the module, all vb class files were processed and added to the .zip and there corresponding <file> nodes added to the .dnn manifest.
I'm wondering if it might be well for the PaWriter to "discover" the appropriate App_Code folder based first on FolderName and then (if the path does not exist) on the ModuleName property. This possibility would, of course, have to also be accounted for when writing the .dnn manifest.
The second and major problem is that all <file><path> nodes of the manifest include the absolute path as follows for example (extra spaces added to prevent filtering out of the xml tags in this forum post:
< file >
< path>C:\DotNetNuke4\Website\DesktopModules\WESNet\EPrayer< /path >
< name >Settings.ascx.vb< /name >
< /file >
< file >
< path >C:\DotNetNuke4\Website\DesktopModules\WESNet\EPrayer< /path >
< name >Uninstall.SqlDataProvider< /name >
< /file >
< file >
< path >[app_code]C:\DotNetNuke4\Website\App_Code\WESNet\EPrayer< /path >
< name >CategoryInfo.vb< /name >
< /file >
This can't be correct - at least I've never seen a .dnn manifest with other than relative paths and would be expected to cause problems on installation of the module. The PaWriter code makes not attempt to output only the relative path:
'Add the files
For Each file As PaFileInfo In _Files
Dim nodeFile As XmlNode = xmlManifest.CreateElement("file")
'Add file properties
XmlUtils.AppendElement(xmlManifest, nodeFile, "path", file.Path, False)
XmlUtils.AppendElement(xmlManifest, nodeFile, "name", file.Name, False)
'Add file Node to files
nodeFiles.AppendChild(nodeFile)
Next
I'll do some more testing, but any comments would be appreciated in the meantime.