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.0Compile module into a DLL or deploy as sourcefiles?Compile module into a DLL or deploy as sourcefiles?
Previous
 
Next
New Post
9/2/2006 4:34 PM
 

Hi,

Perhaps a dumb question, but I wrote a couple of DNN4 modules with the starterkit. Everything works fine, but how can I deploy these modules? I created a dnn file, but it seems that some .vb files needed to be uploaded (app_code)... How does this work? Are these files compiled on the server... as what?

I prefer to compile every module to a dll (I did it also in DNN3), but when I try this I'm encountering some strange behaviour regarding the reference to the DotNetNuke.dll. I add a WebUsercontrol to the dnn-project and drag this to a seperate Class Library project, at first site it seems to work. Only the .vb file is not nested under the .ascx file. A bigger problem is that it seems not possible to use classes from the DotNetNuke namespace after the webusercontrol is inherited from the PortalModuleBase. After that I cann't access the DotNetNuke namespace. If I add a seperate Class-module I CAN refer to the DotNetNuke namespace.... I don't understand this behaviour.

So concrete, how can I compile the existing modules to seperate DLL's or, if not possible, how can I deploy these modules. (sql-files, .dnn files.. all are made)

Thanks,

André Obelink, Visual Basic MVP

 

 
New Post
9/2/2006 11:01 PM
 

You can create a Class library (equipvalent to project in vs2003) and move all your class .vb there.  You can then compile the Class library into DLL.  For the *.ascx.vb, I do not know how to compile these into DLL.  I just leave it as is and package them in the PA.  


Robert Tango
www.workcontrol.com
Custom Modules: UserManager|UserDirectory|UserImport|PortalSSO
 
New Post
9/4/2006 3:13 PM
 
That's no good -- how am I supposed to release a module without the source code?

Jason Honingford - Web & Software Developer
www.PortVista.com
 
New Post
9/4/2006 4:16 PM
 
As I'm understanding, DNN's recommended way to produce PA's is to include the source and not actually pre-compile. I don't understand why this is recommended, since it's not the most secure and best performing. It's fine for development, but I don't know yet how to pre-compile the project if you have DNN loaded up, and if you use the app_code, you're not using the pre-compile method anyway...

Therefore, the best method seems to actually be create your modules separate from DNN (don't load the entire DNN project). It's the same way you make them in .NET 1.1 basically. Others have posted about this, and I'm starting to agree. It's either that, or go back to making modules in 1.1.

Jason Honingford - Web & Software Developer
www.PortVista.com
 
New Post
9/4/2006 6:27 PM
 

You can blame .NET 2.0 and Visual Studio 2005 for all these problems and you can point your finger at Visual Web Developer for introducing these breaking project changes with DotNetNuke development.

In VS 2003 we used the WAP (Web Application Project) model. VS 2005 changed to WDP (Web Deployment Project) model which was supposed to enhance .NET 2.0 development and deployment with more flexible options like single assemblies by website, content folder, all UI components or each compiled file, pre & post build actions, and modifying web.config based on Visual Studio build configs, along with other features.

The world complained about the breaking changes between the models and Microsoft released an interim update and add-in to allow VS 2005 to support the previous WAP. In fact. the upcoming VS 2005 SP1 includes both both WAP and WDP models.

Still following?  Ok, here is why it gets all mixed up... 

  • WAP is NOT supported Visual Web Developer Express Edition.
  • All 2005 Express Editions are tied to the specific .NET 2.0 framework.
  • .NET 2.0 introduced run time and design time breaking changes

This means that DotNetNuke projects had to be converted to WDP in order for professionals and hobbyists alike. There is great debate over which model is better, especially within the DNN community.

Having said all that, this is where most of the confusion lies with the non-professional developers. VWD Express Edition cannot creat class libraries or pre compile dlls or perform the advanced capabilities of Visual Studio. They can however build and evaluate web projects that can be deployed to IIS/ASP.NET (with source). Visual Studio allows you to develop and debug projects and create debug or release dlls, along with mechanisms to publish your sites.

  • Note that VS 2005 and WAP have a few issues with debug/release builds and may leave file droppings.
  • Launching Visual Studio in release/debug mode sets the mood attaching to ASP.NET.
  • When a web hit sparks ASP.NET to life, the current web.config setting may lead to unexpected behavior.

Upon the first request to an IIS/ASP.NET 2.0 website it shadow copies your dlls and aspx and code behinds to a temp folder (to prevent locking/partial update issues) then recompiles your site to serve it to the Internet world. Version 1.x only monitored a few files such as web.config but with the new project model any file change to any folder of your application in your IIS virtual site will cause a recompile for that part of the application. An aspx file may have a code behind file available on the site (source) or it may be pre-compilled into a dll with a namespace. This is how aspx files can be modified 'live' to return results immediately.

Sorry for long winded explanation, but it is the only way to explain the recent rise in confusion from installation to module development within our community. As we speak, the release candidate of .NET 3.0 (WinFX) is available from Microsoft, so it won't be long until we need to support 3 flavours of DotNetNuke for our hungry followers.


Dwayne J. Baldwin
 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Compile module into a DLL or deploy as sourcefiles?Compile module into a DLL or deploy as sourcefiles?


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