Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at

  • Morten Devold 10 posts 79 karma points
    Oct 27, 2016 @ 18:39
    Morten Devold

    Looking for some guidance with Umbraco + Visual Studio

    I'm looking for some tips or best practices when it comes to running Umbraco with Visual Studio.

    I want to have the following setup (as per

    1. Empty web application that has Umbraco installed from NuGet
    2. An empty project for custom code

    What I want to achieve is to be able to reuse the setup to create similar Umbraco instances where design and content types are the same, but the actual content varies (We're talking 10-15 sub locations). Can a new site be prepared simply by publishing the web solution and point it to a new/empty instance of the database (where document types, macros etc. have been defined)?

    When setting up my Umbraco project, I started with an empty web application template, and installed Umbraco from NuGet. After running the solution, Umbraco is up and running with localdb and the default theme.

    The other project is also an empty web project, with Umbraco.Core installed from NuGet. Is is a better approach to create it as an MVC project template?

    Any help would be greatly appreciated, would be good to know if I'm heading in the right direction.

  • Geoffry Brown 8 posts 79 karma points
    Nov 07, 2016 @ 02:00
    Geoffry Brown

    Hey Morten

    You may want to have a look at the Umbraco Cloud for your sites. They have the ability to create new sites from another site in your cloud, like a baseline. This has a few benefits for you:

    1. Automatically creates a great solution for you with a core and a web csproject, the web project being the one associated with your online site through git and the other core project you check into your own source control like github.
    2. allows you to use a web site as a starting point for another website, which seems to be your exact need.
    3. Allows you to keep any site created off your baseline to be updated when your baseline changes, so for example if you add some doctypes or templates they can be synced with your sites that were based off this baseline.

    Have used for 3 sites now and it is pretty great, especially in a multi team environment. There is some gotchas but it is new and they have great support.

    But if the Umbraco Cloud is not an option you could create a site like you already seem to have done and get it to the point where you are happy with the completeness of and save it as a reusable solution. When you want to create a new site simply copy this project and setup your iis and you should be good to go, this assumes your db is a compact database.

    If you are really looking for a flexible custom setup you could take the solution you created and create a project type in visual studio and using T4 templates have a custom project type being available when new project is selected.

    There is also a 3rd option and you could export your doctypes to a file and then import them into new projects. This is probably the least interesting for you but it could be interesting if you have a bank of them you can choose to import based on the needs of the site.

    And as a final option that I can think of to get some reuse would be a custom template package where you could generate everything from umbraco after it is all setup. So you could probably do option 2 and have a default solution with no doctypes templates or anything then install a package from the back office. Benefit here would be the ability to have different site types you can use.

    This is a very flexible CMS and there is probably many other ways to do this but these are some I have thought of in the past to help with this exact issue.

    Personally I enjoy solving these issues so I wish you luck and great times solving it for your needs.

    EDIT: If you need to migrate to full sql server from compact for production there are tools to convery the compact database to a full sql instance.


  • Nigel Wilson 936 posts 2058 karma points
    Nov 07, 2016 @ 02:45
    Nigel Wilson

    Another possibility is to create the empty site with all the core files, document types, templates, etc that you require, then you can create a Package from within the developer section.

    The Package can then be simply installed on blank sites as desired.

    From experience getting the package 100% complete can be quite an iterative approach especially if it contains a wide range of files.

    Effectively you are creating a starter kit, but for your own personal use.



Please Sign in or register to post replies

Write your reply to: