Create a Nuget package that adds a Custom Dashboard
I am working on some code that will be used by multiple projects and as well as being a class library, it also needs to have / create a custom dashboard.
How do I go about doing that? I have a project for the class library, but how do I create the dashboard so that it can be included in the Nuget package?
My assumption is that I will need to add an Umbraco project to my class library solution so that I can create the dashboard. Then I package the class library and dashboard parts into a Nuget package? Is that generally correct?
Thanks for your reply and the links, Huw. Could you also tell me if my assumption, below is correct or not please.
My assumption is that I will need to add an Umbraco project to my
class library solution so that I can create the dashboard. Then I
package the class library and dashboard parts into a Nuget package? Is
that generally correct?
If all you need are some classes and a some dashboard files in App_Plugins folder, you can just create a new project using the Umbraco package template, your code and dashboard files then go in that project and you can just pack it to create your nuget package.
So it really depends on what needs to be packaged up to go with your dashboard.
When you use the template, it will already contain a AppPlugins folder and a required .targets file that copies the content of AppPlugins to the consuming application.
Create a Nuget package that adds a Custom Dashboard
I am working on some code that will be used by multiple projects and as well as being a class library, it also needs to have / create a custom dashboard.
How do I go about doing that? I have a project for the class library, but how do I create the dashboard so that it can be included in the Nuget package?
My assumption is that I will need to add an Umbraco project to my class library solution so that I can create the dashboard. Then I package the class library and dashboard parts into a Nuget package? Is that generally correct?
checkout Kevin's blog post
https://dev.to/kevinjump/umbraco-10-razor-class-library-packages-pt1-3nfa
It is very helpful.
Also, a useful discussion here might help
https://our.umbraco.com/forum/using-umbraco-and-getting-started/110642-creating-nugat-package-for-umbraco
Thanks for your reply and the links, Huw. Could you also tell me if my assumption, below is correct or not please.
Not necesarily,
If all you need are some classes and a some dashboard files in App_Plugins folder, you can just create a new project using the Umbraco package template, your code and dashboard files then go in that project and you can just pack it to create your nuget package.
So it really depends on what needs to be packaged up to go with your dashboard.
Like Huw Reddick says: install the Umbraco templates and use the template for a new Umbraco package: https://docs.umbraco.com/umbraco-cms/fundamentals/setup/install/install-umbraco-with-templates.
When you use the template, it will already contain a AppPlugins folder and a required .targets file that copies the content of AppPlugins to the consuming application.
is working on a reply...