Search code examples
asp.netkentico

Does it matter if my website has build errors?


I am a C# winforms programmer, not used to ASP.Net. As a winforms programmer I build regularly to detect syntax errors.

Recently I opened a Kentico website in Visual Studio and to my surprise found that there were build errors.

Does this matter?

My instinct is to go about correcting the site until it builds. This is a side track from what I set out to do.


Solution

  • If you are attempting to build any kind of quality into your project/software, then yes, it does matter if it builds.

    Regarding Kentico and build times, if you're using a website vs. a web project, yes the build times are typically longer and range anywhere from a few minutes to I've seen upwards of an hour. The build times depend greatly on the machine building it as well. So if your machine has a Celeron processor, with 1GB of RAM and a 5400 RPM drive, you're going to take longer to build than a machine with an i7 processor, 16GB of RAM and a solid state hard drive that can read/write 500+ MB/s. Also keep in mind Kentico out of the box has over 9000 system files in it so as a website, it will take some time to build.

    One of the first things I check when a site doesn't build is to ensure all the referenced DLLs are in the website/project. If not, this will cause several errors and is usually a very simple fix. If you have any kind of errors from code which resides in the /App_Code directory, your site will NOT run at all when you publish it. If you have errors within any other directory, the site will run BUT wherever those code files are referenced on the website, will display errors. So in your instance if you have webpart files in the /CMSWebparts/OurCompany folder, if those webparts are placed on pages within the website, those pages will error out even though the rest of the site is running.

    In my opinion, just fix the errors and be done with them. Then check the code into a version control system to keep track of the changes.