Multiple controls in a DLL using Visual Studio RRS feed

  • Question

  • I have a series of custom user controls (ASCX files) which have been tested and are confirmed to be in working order. Using the method provided by Microsoft (https://msdn.microsoft.com/en-us/library/aa479318.aspx) I have successfully managed to create a DLL for each control and reuse them in several different applications.

    What I would like to do now is to combine the controls into a single DLL, as importing 5 or so DLL's into each application can be a bit of a hassle, but this is where things tend to get interesting. When I combine the controls by using ILMerge I get results included but not limited to the following:

    • Controls failing to render entirely
    • Controls corrupting their Javascript so it shows as raw HTML
    • String resource errors

    I suspect this is due to selecting my primary assembly incorrectly but I receive an error no matter which DLL I select as the primary assembly. Therefore my question is whether it is indeed possible to combine several custom controls into a solitary DLL and if so how? All of my controls are in a single solution and use a single Javascript and CSS file.

    Any advice is appreciated!

    Friday, August 12, 2016 1:43 PM


  • Hi GertVe,

    welcome to MSDN forum.

    Since the issue is related to ASP.NET. I would suggest you post the issue on here.

    please remember to close your thread by mark an useful post.  Your cooperation will be grateful.

    The Common Language Runtime Internals and Architecture forum discuss and ask questions about issues regarding the very core of .NET, including security, performance, hosting, base classes, interop, reliability, debugging, GC, and profiling

    So I will move the thread to off-topic.

    Best Regards,


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place. Click HERE to participate the survey.

    Monday, August 15, 2016 9:09 AM