开发者

Trouble creating the DNN Survey Module from source code

My boss has asked me to set up DotNetNuke's Survey Module and make a few custom changes to it for a client. But I'm having trouble just getting the bare-bones code to run properly!

Here's what I've done so far:

  1. Downloaded both the source & install folders from http://dnnsurvey.codeplex.com/releases/view/65186
  2. Created a new VB Web Application Project
  3. Took out all the default pages
  4. Copied the Survey source code into the VB Web Application Project in exactly the same structure
  5. Made a batch script that creates an installation folder identical to DNN's install folder (double-checked by running a folder-diff on it, and all files/folders were identical)
  6. Zipped up my installation folder using 7-zip

The source code compiles perfectly. But even though the files/folders are identical, DNN's zipped package will work properly on my DNN site, and my own zipped package will fail with this famous error message:

Error: Survey is currently unavailable. DotNetNuke.Services.Exceptions.ModuleLoadException: Could not load type 'DotNetNuke.Modules.Survey.survey'. ---> System.Web.HttpParseException: Could not load type 'DotNetNuke.Modules.Survey.survey'. ---> System.Web.HttpParseException: Could not load type 'DotNetNuke.Modules.Survey.survey'. ---> System.Web.HttpException: Could not load type 'DotNetNuke.Modules.Survey.survey'. at System.Web.UI.TemplateParser.GetType(String typeName, Boolean ignoreCase, Boolean throwOnError) at System.Web.UI.TemplateParser.ProcessInheritsAttribute(String baseTypeName, String codeFileBaseTypeName, String src, Assembly assembly) at System.Web.UI.TemplateParser.PostProcessMainDirectiveAttributes(IDictionary parseData) --- End of inner exception stack trace --- at System.Web.UI.TemplateParser.ProcessException(Exception ex) at System.Web.UI.TemplateParser.ParseStringInternal(String text, Encoding fileEncoding) at System.Web.UI.TemplateParser.ParseString(String text, VirtualPath virtualPath, Encoding fileEncoding) --- End of inner exception stack trace --- at System.Web.UI.TemplateParser.ParseString(String text, VirtualPath virtualPath, Encoding fileEncoding) at System.Web.UI.TemplateParser.ParseFile(String physicalPath, VirtualPath virtualPath) at System.Web.UI.TemplateParser.ParseInternal() at System.Web.UI.TemplateParser.Parse() at System.Web.Compilation.BaseTemplateBuildProvider.get_CodeCompilerType() at System.Web.Compilation.BuildProvider.GetCompilerTypeFromBuildProvider(BuildProvider buildProvider) at System.Web.Compilation.BuildProvidersCompiler.ProcessBuildProviders() at System.Web.Compilation.BuildProvidersCompiler.PerformBuild() at System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath) at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) 开发者_JAVA技巧at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) at System.Web.UI.TemplateControl.LoadControl(VirtualPath virtualPath) at DotNetNuke.UI.ControlUtilities.LoadControl[T](TemplateControl containerControl, String ControlSrc) at DotNetNuke.UI.Modules.ModuleHost.LoadModuleControl() --- End of inner exception stack trace ---

I've already asked about this on the DNN forums, but they don't have much to say about it :( So, I thought I'd try StackOverflow as well.

Does anybody have any idea what the problem could be? Thanks very much in advance!


If you want to create package, correctly, you have to first install the module that you have in your dnn instance. Once you are done with that, you did the right job till step4. After step 4 I generally do following:

  • Go to project properties, and point the bin directory path to parent dnn installation's bin directory
  • Add reference of dotentnuke.dll and microsoft data acecss application blogs dll
  • Rebuild the project

Once you can correctly compile the app, you are ready to customize it.

Always use dnn's module create wizard to create package. it is easier and error free way of packaging and delivering the modules.

let me know if you need any other help


I ended up solving this one on my own. These are the steps I took:

  1. Removed all Namespace DotNetNuke.Modules.Survey declaractions
  2. Deleted the ascx, ascx.vb, and designer files for survey, Settings, and EditSurvey
  3. Created new, empty ones with those names (but used "Survey" instead of "survey")
  4. Copied/pasted the ascx code into each ascx file (and changed DotNetNuke.Modules.survey to DotNetNuke.Modules.Survey)
  5. Did a build
  6. Copied/pasted the ascx.vb code into each ascx.vb file (and removed the Namespace declarations in these files)
  7. Did a build, which was 100% successful this time

Bizarre way to solve the problem, but it worked. :3

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜