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.
I downloaded latest version of Umbraco from Download section and customized it to my requirement via backoffice.
For handling custom form submission, I used SurfaceController and created a working sample in VS solution.
Here is my doubt:
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?
What is the expected workflow for this? Should I work with VS solution ONLY instead of downloading the package from Download section.
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.
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.
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.
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.
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.
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.
Here is my doubt:
Any help will be appreciated.
Thanks.
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.
Thanks for the reply David. I was wondering what is the correct workflow to handle this kind of scenario.
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.
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
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.
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.
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.
is working on a reply...