In this tutorial, you will learn how to debug issues when installing Umbraco Forms on a server. This post isn't necessarily about troubleshooting Umbraco in particular, this post is more of an overview of the issues I encountered trying to get a C# Umbraco website up and running with a build server (Cruise Control). Before I tried getting the project to build and deploy correctly on the build server, I made sure that the build script worked successfully on my local machine. It did not and the first issue I encountered, was this one:

SVN was being used for source-control (ewww 🤢), so the error made it obvious there was a merge issue, but it didn't make it obvious which file was causing the issue. After trying an 'Entire Solution' search in Visual Studio, I decided to change the MsBuild logging level on the server. The build flag was set to, verbosity:quiet. Changing the logging output mode of the build is a handy tip whenever you try to set-up a Ci/Cd pipeline. The build options you can choose from includes quiet, minimal, normal, detailed and diagnostic. For troubleshooting, I tend to find detailed mode the most useful option. After changing my set-up to use detailed and pushing a new build I now had this error:

This allowed me to figure out the location of the issue. The issue was somewhere in the bin\Debug folder. To fix this, first I added the folder to the SVN ignore list and also on the build server. Next, I did a SVN Resolve. After pushing again, I was now faced with this issue:

This error was very annoying and the cause was not immediately obvious In my project, I was importing System.Runtime using Nuget so it was referenced, however, the build server was obviously missing something. In the end, the problem was with ASP.NET 4.5.2 and not having the correct dependencies installed on the server. After some Google research, a lot of other people have been encountering the same issue. Following some useful advice from Stackoverflow, installing the https://www.microsoft.com/en-gb/download/details.aspx?id=42637 fixed the error. The builds server could now compile my site, which was a good step forward. I now faced another issue:

This error was a bit of red herring. At first, I thought it was going to be something to do with the WebHelpers Nuget package. Instead, it was me being an idiot 🤦🤦🤦. The client's build process did not clear the website's webroot on a new commit. When I tried to push my new Umbraco Forms v7.5 files, the old unneeded v6.2 assemblies and the new 7.5 assemblies got tangled up together in the bin folder. The result was the exception above. Fixing this issue is straightforward, make sure you delete everything in your webroot before you copy all the new 7.5 files into it (remember to always backup). After triggering the build server again, the project was built successfully and the site loaded and worked as expected.

Getting a Ci/Cd pipeline to work with Umbraco can be a pain, but, it is a worthwhile pain 😩. Just because something works on your PC does not mean it will work on build server. Getting a site to work on a build server can be annoying, I wasted a good half a day over a few simple issues. When you upgrade, my advice would be to always have confidence that your build works on your PC first before configuring your build server. Happy Coding 🤘