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.0DotNetNuke 4.0, Module development project and Web references...DotNetNuke 4.0, Module development project and Web references...
Previous
 
Next
New Post
3/22/2006 9:54 AM
 

Iv just started developing my first module in DNN.  My assignement is to develop a module, which in turn using web references, communicates with a webservice to submit and retrieve data. The module needs to be complied, and put in a package for distribution. No source code.

Ofcourse, I get the latest version, 4.0, and follow the instructions. And later, I notice that the pdf documentation was for version 3 ofcourse, but hey, I did learn something on how it used to be done! I then find the http://forums.asp.net/1114393/ShowPost.aspx post explaining about starter kits etc, and how it should be done in DNN 4.0. How nice =)

Ok, so I follow this instruction about how to develop modules in DNN4 and VS 2005.

First thing im having problems with is the structure in which my module is developed. First, I have a folder in the App_Code folder, with my providers. Then I have another one within the DesktopModules folder with my controls and other stuff. Ok, 2 folders with files for my module. Then, I need my web reference, so I add one, and now I have code in the App_WebReferences aswell. So, now I have 3 folders with code relating to my module. Adding another module, and that too with a web reference.. Now, I basically think I have what I think is a start of a really good mess of code... So, im thinking, the idea how they did it in DDN3 just looks better. Basically, having a module project for ur module code, compiled into a nice module dll...

But anyway, I wont give up that easy, Ill really try to do as the DNN4 starter kit intructions tell me. So, I "publish" my DNN solution, to compile it. I select the "Use fixed naming and single page assemblies" option. Now, my controls each get their own compiled dll (which to begin with, is not what I want), but the big problem here is, my 2 web references get compiled into 1 App_WebReferences.dll! Hmm.. do I need a seperate DNN solution for each module I develop? That cant be right. Also, there may be a problem with 2 modules having the same name for their web references etc.. So, Im again thinking the DNN3 way seems better. So, ill try that.

So, ok, I try the "old fashioned way" iv learned through reading the DNN documentation. Now, what project type should I use for my DNN module project? I need something which can compile Web User Controls etc, so I try something called "Visual Studio 2005 Web Application Projects" (http://msdn.microsoft.com/asp.net/reference/infrastructure/wap/default.aspx), which basically works like the old VS 2003 web application project. Now, I have a project which can compile into a nice dll, and that I can add Web User Controls to etc.. I also can add my web references, and they are also compiled nicely into my project .dll. That is my idea anyway. However, before I even start to compile my new module project, I get alot of errors in my controls. This is because my module controls references controls in the DotNetNuke site like this:
<%@ Register TagPrefix="dnn" TagName="Audit" Src="~/controls/LabelControl.ascx" %>
So im trying everything I can think of to reference that control. Changing the Src to "../../controls/LabelControl.ascx" etc etc, but I simply cant get it to work. Seems like it isnt possible to register controls that isnt part of the project. So, if I have a standalone module project, I cant use DotNetNuke's controls?

Seems like however I try to do it, there's a problem around the corner. Trying to use the DNN4 starter kit, I cant compile the project the way I need to. Trying to use a module project, and I cant compile the project because the controls reference DNN controls.

Basically, what im tryin to figure out, what is the best practice here? How should a module development and compilation/packaging environment like this be set up? Please help me out!

 
New Post
3/24/2006 6:57 AM
 
After a few days, and some more work to try to solve the problem, still no answer to my post. Im starting to think there is no way to compile and package a module in DNN4 into a single dll. Is this the case? Is there any way to compile a single dll to contain all my module code?
 
New Post
3/24/2006 12:54 PM
 

I understand your frustration as setting up the project is very important…..The problem is that DotNetNuke 4.0 is still very new and the Web Site module introduced in ASP.net 2.0 is also very new.

I don’t know if you were around during the DotNetNuke 1..x days but it took a year or so until a standard PA method came about.

The development methods come about form people like you or me trying different things and figuring out the best solution.  I am sure the reason you are not getting many response to your post is that you are steps ahead of where many people are with figuring this out….

Here are the goals I am working on

  1. Core web site needs to have the ability to be worked on using Visaul Web developer Express
  2. Provide a way to precompile a site so users do not need to distribute there source code
  3. Better naming of output dll’s – not as import as 1 or 2

The two approaches I am currently trying to work out are as follows

1.  Use website model to develop modules in.  Use Web deployment project (http://msdn.microsoft.com/asp.net/reference/infrastructure/wdp/) to merge Dll’s into less assemblies.  I almost have this working.  I use the option to create an assembly name for each folder so after I run the project I would have two dll’s for each module

DesktopModules.Widget.dll
App_SubCode_Widget.dll

2.  Use Visual Studio 2005 Web Application Projects" (http://msdn.microsoft.com/asp.net/reference/infrastructure/wap/default.aspx), as you mentioned in your above post.  AS you have found out you have errors with the label control.  This may require creating a new label control that is a Servercontrol.  I have another couple of ideas but I haven’t had time to try just yet.  The other option I am thinking of trying is to precompile the web site and then reference the precompiled DLL’s to reference the label control

I do not have much experience with web references but are the required to reside in the App_WebReferences?  I think in Visual Studio 2003 you could just take the generated stub class and put it wherever you wanted…can you do this in 2005?

Bert

 
New Post
3/25/2006 2:00 PM
 

MatteS wrote
After a few days, and some more work to try to solve the problem, still no answer to my post. Im starting to think there is no way to compile and package a module in DNN4 into a single dll. Is this the case? Is there any way to compile a single dll to contain all my module code?

This link may help:

http://www.dotnetnuke.com/Community/ForumsDotNetNuke/tabid/795/forumid/111/threadid/25695/scope/posts/Default.aspx

 

 
New Post
3/30/2006 3:35 AM
 

Thanks for your help and input!

My module code is almost finished now, and when I get to packaging, I will have to try these 2 possible solutions. Iv done some testing, and ill post more about that later.

About web references, Im completely new to how they work in .NET 2.0, but in 1.1 you could move em however you want to. However, after further testing I discovered, that in .NET 2.0, Web references seems to work a bit differently.

When creating a web reference in a VS2005 web site "project", it will be created in a folder in a App_WebReferences folder. This folder does not contain any class code like in 1.1, but 3 xlm files defining the interface for the web reference. (.disco, .discomap, .wsdl) The folder name that these files reside in seems to become the namespace for the web reference. I discovered I could move these 3 xml files whereever I wanted, and they still worked. By moving them to my module folder in App_Code, I got the web references compiled my App_Code module dll. So that solves a part of the problem. But what im tryin to figure our now is, how do I change the namespace for these web references? When I move these files from its original location, the namespace seems to vanish. And since there are no .vb file that contains class code for the reference, Iv no idea where to change it. The xml files does not contain any namespace reference either...

On a side note, I noticed that creating a web reference in a non-website project still creates a .vb file that contains the class, but for some reason that have changed when working with VS2005 web site web references.

If anyone know how to change namespace of VS2005 web site web references, please let me know! I cant find any information about it anywhere..

 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0DotNetNuke 4.0, Module development project and Web references...DotNetNuke 4.0, Module development project and Web references...


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