Updating Source Code - how to publish

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
3 years ago
Hi,

I have project using Nop 4.2 with Source Code.
I have managed so far to build project without needing to change the source code ..but now I do.

I have updated the HomeController in the Source Code (\Presentation\Nop.Web\Controllers) page and want to upload to my site.
Do I need to rebuild and publish the solution again?
When I published site the first time I ftp'd the published files to the server.
My concern is that doing this again will overwrite changes I have made to the existing published files.
Is there a better way to publish / upload my source code update?
3 years ago
You dont have to publish the whole site. The way I do it is.
After testing publish the web to a local directory.
Then if you know what .cshtml files you have changed you can just copy those files from the local published directory to the production webserver
If you have changed the code you can just copy the changed .dll's from the local published directory to the production webserver.
If you only changed the Home controller then that is probably just Nop.Web.dll
If you always do it this way you can usually see what has changed in the local directory looking at the date/time
Before copy anything to the production webserver make a backup of the complete production webserver directory in case there is a problem you can go backwards.
After you copy files to the production webserver Stop and Start the webserver to make sure the latest versions are loaded.
3 years ago
Hi Yidna,

Thanks for the suggestion.

After updating HomeController.cs and publishing these 3 files were updated (Nop.Web.Deps.json, Nop.Web.dll, Nop.Web.pdb).
When I try to upload these to the server Nop.Web.Deps.json & Nop.Web.pdb upload okay but Nop.Web.dll upload fails.
It says ‘Destination Folder Access Denied – You need permission to perform this action’  ..Any ideas why uploading this file fails?
3 years ago
It is probably locked because the website is running
You could try to stop the webserver and application pool first.
Then update that file
3 years ago
Yes, that was it.

My source code update now working : )

Thank you for your help. Much appreciated.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.