简体   繁体   中英

How to create a package for Umbraco with Visual Studio?

How do I create a package for Umbraco inside Visual Studio? I know that you can create a package inside Umbracos backoffice, but I am not interested in that right now. I just need something simple, like a hello world package

Unfortunately, it's not so simple. It depends what is going to be the package content. If those will be static files, dlls etc. - it's a job for MsBuild and you can use it to gather all the required files and create a package or even distrubute it.

There's a great article by Jeavon Leopold on 24days.in: http://24days.in/umbraco/2014/packaging-with-appveyor/ combined with CI done with AppVeyor.

The challange starts when you want to include document types, datatypes or any other Umbraco-related content there too. And this is really easy to be done with Umbraco Packaging through the backoffice (you just need to select what should be included). Using your custom build and automatic packaging, you need to remember that if anything should be included inside the Umbraco backoffice, it needs to be handled by the creation of those objects in your code (eg on application startup events custom handlers) and ensure that if it's not exist it should be re-created etc.

Personally, I suggest you to check how other package creators are handling it, as a lot of packages is open-sourced eg:

etc.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM