views:

42

answers:

3

Hi,

I'm trying to create a custom Control using a silverlight Class Library that inherits from an 3rd party control(like telerik radcontrols), and when I add my class library dll to another project, and try to use my custom Control an error occurs telling that the reference for the reference where the class that inherits with my control from the 3rd party control is missing.

for example: If i inherit my costum control from an radButton, when i try my dll in other project, the compiler ask me also to import the telerik dll.

Is there any way of merging the .dll from my class library with the one needed from the 3rd party control, or to make custom control working without the need of add the the reference for my class library and the assembly from the 3rd party control?

My goal is only to import my dll and nothing else to use my component.

Thanks

+2  A: 

I would advise against merging the assemblies because you will create extra work for yourself every time you're going to be upgrading to a newer version of your assembly or the 3rd party side (Telerik).

I you insist on doing this, you can use ILMerge

_NT
A: 

I already try to use ILMerge, but when i use my new dll i can't draw the component in the main page, but the intelSense of the VS identify that component. I don't know why.

Artur Machado
Is it an x64 problem? http://stackoverflow.com/questions/2961357/using-ilmerge-with-net-4-libraries
_NT
no... i don't have an x64... but is in VS10 and windows 7
Artur Machado
Try asking Telerik support about this. http://www.telerik.com/support.aspx
_NT
I did it... but also nothing
Artur Machado
The fastest solution would be to include the source code with your project (or to dissasemble it with Reflector). The correct solution would be to troubleshoot somehow, which I think involves searching for similar ILMerge problems.
_NT
A: 

Hi, The problem using the IlMerge is the control template for the control is lost. Is there any way for not losing it?

dfsilva