Create NuGet package for widget/form component

Kentico Dev asked on June 17, 2020 17:22

Is there any good resource for creating NuGet packages for widgets.

The general resources for creating NuGet packages are fine for simple libraries. But I am in need of a guide to describe how to structure my .Net project to be able to hold only the code files for a widget.

For example, should I create a Framework or Core solution?

Should there be a separate project for controller/model and one for Views?

Correct Answer

Dmitry Bastron answered on June 17, 2020 18:32

Hi Kentico Dev,

The reason for lack of guidance on such a thing I believe it would have been much easier sharing/publishing widgets as a code, not via nugget packages. Have you looked at examples of widgets here in the marketplace? I think this will be the easiest way of sharing things like widgets, sections, templates, etc.

Nuget packages are more suitable for distributing more complicated logic like Dynamic Routing.

The only kind of nugget package generation approach I've seen was Sharable Component Boilerplate by Trevor Fayas on GitHub. Probably it will help you.

2 votesVote for this answer Unmark Correct answer

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