Using widget from another dll

Jelle Capenberghs asked on August 5, 2019 11:45

Hello,

I made a widget with a custom controller in my own separate library 'Company.Kentico.Widgets.dll' and I registered the widget like this: [assembly: RegisterWidget("Company.Kentico.Widgets.MediaLibraryWidget", typeof(MediaLibraryWidgetController), "Choose file from Media Library", IconClass = "icon-picture", Description = "Choose a file from the media library")] Now I put the dll as a reference in my DancingGoatMvc sample project and put my widget in an editable area but I cannot select my custom widget in the admin interface. Since I registered the widget in my dll I think it should be possible to use it. How do I use my widget from another library in my Kentico project? I use Kentico12 SP.

Kind regards

Correct Answer

Dragoljub Ilic answered on August 5, 2019 12:47

Hi,

Do you have AssemblyDiscoverable attribute in your project properties (AssemblyInfo.cs) of your 'widgets' project? You should add something like this to make registrations in external libraries:

using CMS;
[assembly: AssemblyDiscoverable]

Best regards, Dragoljub

3 votesVote for this answer Unmark Correct answer

Recent Answers


Jelle Capenberghs answered on August 5, 2019 13:06

That did it, thank you very much!

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.