Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Pre-compiled model module packagingPre-compiled model module packaging
Previous
 
Next
New Post
3/25/2006 3:16 PM
 

After developing and packaging a number of DNN 4 modules in VS2005 using the dynamic compilation model, I thought I'd try the pre-compiled model as outlined by Shaun Walker.  Other than the hassle of picking through the precompiled/bin to find all the dlls with the correct hashcode appended names, all seemed to go well with the module installer placing all the pieces in the right folders, running the SQL script, registering the definitions and controls, etc.  However, when I attempted to place an instance of the new module on the test page, I received the following exception errors:

InnerException: D:\Clients\C2032\lakeregiontv.org\public_html\DesktopModules\WESNet\ModuleViewDefinitions.ascx(9): error BC30451: Name 'IsEditable' is not declared.
Message: DotNetNuke.Services.Exceptions.ModuleLoadException: D:\Clients\C2032\lakeregiontv.org\public_html\DesktopModules\WESNet\ModuleViewDefinitions.ascx(9): error BC30451: Name 'IsEditable' is not declared. ---> System.Web.HttpCompileException: D:\Clients\C2032\lakeregiontv.org\public_html\DesktopModules\WESNet\ModuleViewDefinitions.ascx(9): error BC30451: Name 'IsEditable' is not declared. at System.Web.Compilation.BuildManager.PostProcessFoundBuildResult(BuildResult result, Boolean keyFromVPP, VirtualPath virtualPath) at System.Web.Compilation.BuildManager.GetBuildResultFromCacheInternal(String cacheKey, Boolean keyFromVPP, VirtualPath virtualPath, Int64 hashCode) at System.Web.Compilation.BuildManager.GetVPathBuildResultFromCacheInternal(VirtualPath virtualPath) at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) 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 System.Web.UI.TemplateControl.LoadControl(String virtualPath) at DotNetNuke.UI.Skins.Skin.InjectModule(Control objPane, ModuleInfo objModule, PortalSettings PortalSettings) --- End of inner exception stack trace ---

InnerException: Object reference not set to an instance of an object.
Message: DotNetNuke.Services.Exceptions.ModuleLoadException: Object reference not set to an instance of an object. ---> System.NullReferenceException: Object reference not set to an instance of an object. at System.Web.UI.UserControl.get_Request() at DotNetNuke.Entities.Modules.PortalModuleBase.get_IsEditable() at DotNetNuke.UI.Containers.Title.CanEditModule() at DotNetNuke.UI.Containers.Title.Page_Load(Object sender, EventArgs e) --- End of inner exception stack trace ---

The problem stems from this common usage in the .ascx of the IsEditable property which the module control inherits from PortalModuleBase:

<ItemTemplate>
       
<asp:HyperLink NavigateUrl='<%# EditURL("desktopmoduleid",DataBinder.Eval(Container.DataItem,"DesktopModuleId")) %>' Visible='<%# IsEditable %>' runat="server" ID="Hyperlink1">
              
<asp:Image ImageUrl="~/images/edit.gif" AlternateText="Edit" Visible='<%# IsEditable %>' runat="server" ID="Hyperlink1Image" resourcekey="Edit"/>
      
</asp:HyperLink>
</ItemTemplate>

Further investigation showed that none of the public properties of PortalModuleBase OR those defined in the code file accompanying the .ascx were visible in the .ascx.  The module works fine in VB2005 development and works fine when packaged and uploaded to the test site along with the code files accompanying each .ascx using the dynamic compilation model.

When I first received these exceptions, I though that it was because I had packaged the .ascx module control files from the DesktopModules/WESNet folder rather than the modified ones that were created in the precompiled/DesktopModules/WESNet folder that were created when I published the website, the difference being that in the @Control directive, the attribute Inherits="WESNet.DNN.Modules.ModuleViewDefinitions" has been replaced with Inherits="WESNet.DNN.Modules.ModuleViewDefinitions, App_Web_moduleviewdefinitions.ascx.585487ff".  The hash code correctly corresponds with that of the pre-compiled codefile which I also verified was correctly getting loaded into the test sites bin folder.

So, once more I settled on using the dynamic compilation model for packaging a DNN 4 module.  Has anyone gotten pre-compilation to work in cases where the .ascx module control references a property or method in the accompanying code file or the code file's base class?

 

 


Bill, WESNet Designs
Team Lead - DotNetNuke Gallery Module Project (Not Actively Being Developed)
Extensions Forge Projects . . .
Current: UserExport, ContentDeJour, ePrayer, DNN NewsTicker, By Invitation
Coming Soon: FRBO-For Rent By Owner
 
New Post
3/27/2006 5:11 PM
 

I had this problem once before because Iw as using different versions of DNN.  For example I created a module in version 4.0.3 and compiled the module per Shaun’s tutorial, but when I installed it on a different portal I got the same errors that you got.

I then noticed that the site I was attempting to install the module to was version 4.0.2.  I set up another test site using 4.0.3 and I was able to install the module package and did not get the errors.  I can send you my widget example that is compiled using DotNetNuke 4.0.3 that works if you want to look at it.

Bert

 
New Post
3/28/2006 8:45 AM
 

I think that may be the root of the problem.  The controls that were causing the problem are part of a module which provides a base framework/administration for other modules I'm developing for the same site.  When I packaged (using the dynamic compilation model) one of the other modules which called upon this base framework and installed it on the test site, I immediately got dotnetnuke.dll version reference exceptions because the base module was compiled with a later build (on my development box) of dotnetnuke.dll than that on the test site.  Although both the development box and the test site had started with the same build of the DNN 4.00.02 core, I had apparently rebuilt the core library sometime during the development process.  When I restored the core library version to the match that of the test site, re-compiled my base module and re-installed it, all was well.

This brings up the question of how to avoid this in the future when pre-compiling a DNN 4 module.  Presumably, our development machines may often have later builds of the core (accidentally or intentionally) than the test or production sites. I had thought the days of .dll version h*ell were gone - guess not.

 


Bill, WESNet Designs
Team Lead - DotNetNuke Gallery Module Project (Not Actively Being Developed)
Extensions Forge Projects . . .
Current: UserExport, ContentDeJour, ePrayer, DNN NewsTicker, By Invitation
Coming Soon: FRBO-For Rent By Owner
 
New Post
3/29/2006 10:39 AM
 
I am not 100% sure of this so dont take my word...but I think the issue will only occur when only a previous version is availble. for example

compiled with 4.0.3...version available is 4.0.2 ...will not work
but
compiled with 4.02....version available is 4.03...I think this will work

if the version a dll is compiled with is not availbel it will look for a higer version dlll but not a lower one...if you test this I am curious as to if this is correct
 
New Post
6/8/2006 4:35 AM
 

Just to bump this thread up and make people notice the problem, especially following the last discussions about Web Application projects.

I got the same error ('IsEditable is not declared') with the following environment:
a) Developing with the DNN 4.0.2 Starterkit (developing the module with WAP and compiling it with DotNetNuke.dll of Starterkit, version 4.0.2.41274)
b) Installing the package to a standard DNN 4.0.2 installation on a web host, DotNetNuke.dll version 4.0.2.31882.

So be aware of this DotNetNuke.dll version issue when developing WAP modules.

Wolfgang

 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Pre-compiled model module packagingPre-compiled model module packaging


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out