Copied to clipboard

Flag this post as spam?

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


  • Hans P. 4 posts 84 karma points
    Jul 28, 2023 @ 06:45
    Hans P.
    0

    Umbraco 12 - What files to re-upload to server, after initial upload?

    Hi guys,

    I'm used to work with Umbraco versions 8 and below. Have done so for years. Recently I've decided to start working with the newer versions.

    It took me some time to get into a new workflow, that I'm not used to.

    What I'm used to do, is download all the Umbraco files (as non binaries), then run the files as a webproject.

    Then I would work in the 'Views' folders for all my '.cshtml' files, and in 'App_code' folder for all my '.cs' files.

    After I upload all the files to the server (initial upload), I would only upload whatever files i change (like '.cs' files and '.cshtml').

    Now working in Umbraco 12, everything is working fine. But as I understand, all my '.cs' files are compiled to '.dll' files(?).

    And now to my question: After the initial upload (all files uploaded to server), what files do I need to re-upload to the server? Like which files are changed? Is it a single '.dll' file or how? I'm aware that i need to upload 'Views' folder and 'css/js/img' folders.

    I hope question makes sense, I'm finding it hard to explain myself.

    Thank you in advance.

  • Huw Reddick 1929 posts 6697 karma points MVP 2x c-trib
    Jul 28, 2023 @ 07:48
    Huw Reddick
    1

    Hi Hans,

    If you make changes to .cs files then after rebuilding you can just upload the dll, managing Views/static assets is still the same, just upload any that have changed.

  • Hans P. 4 posts 84 karma points
    Jul 28, 2023 @ 07:57
    Hans P.
    0

    Hi Huw

    Thank you for your response. But which dll to upload? There are many dll files in the root folder.

  • Huw Reddick 1929 posts 6697 karma points MVP 2x c-trib
    Jul 28, 2023 @ 10:02
    Huw Reddick
    100

    it will be the one with the same name as your project.

    I normally publish my website to a local folder on my PC, I then use WinSCP to synch the files to my web server, WinSCP does a compare and will only transfer new/changed files.

    In order to do this you will need to stop your website, .net core will not allow you to overwrite your project dll if the site is running.

  • Hans P. 4 posts 84 karma points
    Jul 28, 2023 @ 11:15
    Hans P.
    0

    ok thanks. Just did this and found the files that change, this part is working.

    Last question, is there a way to get around having to stop the server? I'm on a shared host environment. The host doesn't allow for my app-pool the being stopped. Only restarted.

    Thanks again :)

  • Huw Reddick 1929 posts 6697 karma points MVP 2x c-trib
    Jul 28, 2023 @ 11:31
    Huw Reddick
    0

    I have not tried this myself, but I'm pretty sure it should still work for .netcore.

    If you add a file called "app_offline.htm" to the root of your website in IIS this should stop your app pool and may then allow you to update your sites dll

  • Hans P. 4 posts 84 karma points
    Jul 28, 2023 @ 11:42
    Hans P.
    0

    WOW! Dind't know about that, this actually worked. Thanks Huw, you've helped me tremendously, today.

    cheers

  • Huw Reddick 1929 posts 6697 karma points MVP 2x c-trib
    Jul 28, 2023 @ 12:16
    Huw Reddick
    0

    No problem, obviously just remove or rename the file to start it back up :)

Please Sign in or register to post replies

Write your reply to:

Draft