1

So I have Umbraco v6 currently setup via a release download and split into a class library and a website. I need to upgrade to v7 at some point and have some question on how I should setup.

What are the pros/cons of setting up through Nuget vs Downloading source and creating project?

Devin

Devin Gleason Lambert
  • 1,516
  • 1
  • 13
  • 22
  • Based on E.J. Brennan's answer I've decided to go forward with a test project using Nuget. – Devin Gleason Lambert Feb 24 '16 at 11:33
  • A few more points I didn't ask about: 1) How is the upgrade process in nuget vs source? 2) In 6 I am using a two project solution, class library and web site, how is this, can nuget be split up? – Devin Gleason Lambert Feb 24 '16 at 12:41
  • Also 3) are there any chance of me migrating my Zip based project to a Nuget based project? – Devin Gleason Lambert Feb 24 '16 at 16:43
  • 1
    2) You'd typically install the full UmbracoCms package in the "web" project and just Umbraco.Core in your class library (if needed). 3) I don't think so, but I've never tried. In theory the Nuget package should just overwrite everything, but it won't know to remove unused bits. And there might be issues with assembly references as well. – Jannik Anker Feb 25 '16 at 13:59

1 Answers1

2

The pro of using nuget is that you don't have to build the project from scratch. If you have a need and/or desire to understand how umbraco is built, by all means pull down the source code, but if you just want to use umbraco, and customized it thru the hooks it provides, then the nuget packages will be easier.

I've done both (though not with the latest version), and using nuget is far easier and quicker to get going.

E.J. Brennan
  • 45,870
  • 7
  • 88
  • 116
  • "customized it thru the hooks it provides" Can you think of any examples? – Devin Gleason Lambert Feb 23 '16 at 20:16
  • 1
    For example, in one of my apps I need to run some code each time the user 'publishes' a document. I can do this by chaining a function to the Core.Services.ContentService.Published event. This way it calls my custom code after it does what it needs to do, and I never had to touch the umbraco source code to make it happen. Here is a more complete list of events you can use: https://our.umbraco.org/wiki/reference/api-cheatsheet/using-applicationbase-to-register-events/overview-of-all-events/ – E.J. Brennan Feb 23 '16 at 21:27
  • Great example. So I do attach to umbraco events, are you saying this would be something I would not be able to do via a Nuget package installation? – Devin Gleason Lambert Feb 23 '16 at 22:11
  • 1
    No, I am saying that even just using the pre-compiled nuget libraries you can extend umbraco without the source code. Get the source code if you are interested, but its not generally needed even if you want to extend umbraco functionality with custom logic. – E.J. Brennan Feb 24 '16 at 01:08