Copied to clipboard

Flag this post as spam?

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


  • Abilash Ashok 63 posts 418 karma points
    Feb 01, 2017 @ 06:59
    Abilash Ashok
    0

    Deploy SurfaceController changes to production

    Hello,

    I have been playing some time with SurfaceController. I created a working sample by downloading Umbraco CMS package via nuget in Visual Studio. I have few doubts regarding deployment of changes.

    Here is what I had done so far.

    1. I downloaded latest version of Umbraco from Download section and customized it to my requirement via backoffice.
    2. For handling custom form submission, I used SurfaceController and created a working sample in VS solution.

    Here is my doubt:

    1. How should I move the changes in VS Solution into already existing website. Can I simply replace few DLLs in my original website? Will that work?
    2. What is the expected workflow for this? Should I work with VS solution ONLY instead of downloading the package from Download section.

    Any help will be appreciated.

    Thanks.

  • David Peck 690 posts 1896 karma points c-trib
    Feb 01, 2017 @ 09:34
    David Peck
    0

    Hi,

    I'd be cautious about mixing the issues of an upgrade with your surface controller.

    Specific to your controller; yes you can just add/replace the dll containing your controller on the server.

    With regard to your dll being compiled using a different version of Umbraco to the one online this is ill advised. I'd make sure you're using the correct version. This is easily done using nuget e.g.:

    Install-Package UmbracoCMS.Core -Version 7.1.6

    Alternatively upgrade the whole website to the latest as a preliminary step.

  • Abilash Ashok 63 posts 418 karma points
    Feb 01, 2017 @ 10:35
    Abilash Ashok
    0

    Thanks for the reply David. I was wondering what is the correct workflow to handle this kind of scenario.

    1. Should I ALWAYS deploy my website from Visual Studio solution ONLY and ignore the package from Umbraco Download section

    OR

    2 . Use the latest from Umbraco Downloads and move changes from VS solution to the hosted version.

    Can you please suggest on the expected workflow to follow here?

    Thanks.

  • David Peck 690 posts 1896 karma points c-trib
    Feb 01, 2017 @ 11:07
    David Peck
    100

    Personally I use nuget rather than the download section. Most serious developers would, I think. That said it might complicate things if you've not comfortable with nuget. If you're using Visual Studio then nuget helps manage dependencies better and upgrades are simpler.

    If you've not seen this page then it may help. https://our.umbraco.org/documentation/getting-started/setup/install/install-umbraco-with-nuget

  • Abilash Ashok 63 posts 418 karma points
    Feb 01, 2017 @ 11:13
    Abilash Ashok
    0

    Thanks for the reply David. That clarifies lot of doubt. I started Umbraco evaluation with package downloaded from Umbraco Download section. And when I was experimenting Surface Controller, I was of the impression that I only need to replace few files to propagate the changes.

    You answer makes sense. It makes sense to start the development from VS instead of downloading the package and manually upgrade changes in the long run.

    That helped a lot. Thanks again.

  • David Peck 690 posts 1896 karma points c-trib
    Feb 01, 2017 @ 11:36
    David Peck
    0

    To be clear, you can just replace the affected files but I recommend you compile against the correct version of Umbraco is all.

    Alternatively you could just put your controller.cs (uncompiled) in the App_Code folder and it will compile when your application starts. Then you don't need to worry about the version it is compiled against.

  • Abilash Ashok 63 posts 418 karma points
    Feb 01, 2017 @ 11:42
    Abilash Ashok
    0

    Replacing affected files and copying controller files are manual way to make changes which makes it difficult when we have multiple environments - dev, QA, staging, production. If I rely on VS, then I can publish the changes in just one-click to different environments.

    Thanks.

Please Sign in or register to post replies

Write your reply to:

Draft