Custom control in external DLL

0
0

Can I have user control in external dll?

Which project should I use ?

 

Christian

  • You must to post comments
0
0

I get an error when I try to build the example that is in /extensions.

If I wanted to create a dll with all my user controls for wiseJ applications, are you saying that I would pick a “Class Library” project.  Would I need to do anything that is in the readme.pdf file in the AspNetControls zip file if I am just trying to do user controls and not do a wrapper control?

I created a really simple test app with a user control library, but it will not compile.  It is a single user control with a textbox
Error BC30652 Reference required to assembly ‘System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089’ containing the type ‘ScrollableControl’. Add one to your project. userControls C:\Trash\wiseJ_Test\Test\userControls\ucTextBox.Designer.vb 3 Active

Attachment
  • Luca (ITG)
    Which example are you using and what is the error? The readme.pdf in the /examples lists 4 types of extensions: control, widget, component, extender and lists which project in the /extensions corresponds to which type.
  • Shawn Ramirez
  • Luca (ITG)
    Looked at the Test.zip. You need to add System.Drawing and System.Windows.Forms to userControls.vbproj and change the target to .NET 4.5 (now it’s 4.5.2) because the Test project is set to 4.5. Basically you cannot use a higher version with a test project using a lower version of .NET. You also need to add the userControls project to the references in the test app. I could compile, add ucTextBox to Page1 and run fine.
  • Shawn Ramirez
    Thank you for the help. I saw that the references were asking for System.Windows.Forms but since the project is a web/wiseJ, I didn’t trust the message. I had to make one additional change to the user control project to get it to show on the toolbar, I had to change it from the Application Type of “Class Library” to “Web Control Library”.
  • You must to post comments
0
0

Yes you can. It’s a simple Class Library, like any standard custom control. All you need is to build an assembly. See the projects in /extensions.

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.