Updating Orchard after a long time

by Anton 22. March 2013 19:18

Until today we used the CMS Orchard for our homepage. Two years ago we used Orchard version 1.2. Since than we did not update once. Today we updated to version 1.6.

It is not that difficult:

  1. I updated my local version of our site (pulling from our git repository).
  2. I used the “Upgrade Site In-Place” instructions on that local copy.
  3. After that the site was not accessable. Also not the admin dashboard. Here is the bug I got:
    Orchard.OrchardException: Error while loading extension 'Orchard.Lists'. ---> System.TypeLoadException: Inheritance security rules violated while overriding member: 'Orchard.Core.Dashboard.AdminMenu.get_MenuName()'. Security accessibility of the overriding method must match the security accessibility of the method being overriden.
    I could not fix the bug other than deleting the module Orchard.Lists (simply by removing the folder in the Modules directory).
  4. After that only the admin panel works, but that is expected because Orchard 1.4 introduced breaking changes, which can easily be fixed with this instruction.
  5. Then I pushed all the changes to the repository.
  6. I cleared the bin and dependecies folders in the live site.
  7. Our TeamCity configuration then took the changes from the repository and applied them live.
  8. Again there was the bug from step 3. Again I deleted the Orchard.Lists module. But then I got the same bug for Orchard.CodeGeneration. I fixed that by adding the following line to the Assembly.Info of the Orchard.CodeGeneration Project:
    See this discussion: http://orchard.codeplex.com/discussions/394726
  9. Then I fixed the breaking changes again with step 4.

It took me some trial and error to fix the bug, because at first I did not want to remove the module. But you should not be afraid to remove a module. You can always download it afterwards and install its newest version.

enjoyed the post?


Add comment

  Country flag

  • Comment
  • Preview

About Oliver

shades-of-orange.com code blog logo I build web applications using ASP.NET and have a passion for javascript. Enjoy MVC 4 and Orchard CMS, and I do TDD whenever I can. I like clean code. Love to spend time with my wife and our children. My profile on Stack Exchange, a network of free, community-driven Q&A sites

About Anton

shades-of-orange.com code blog logo I'm a software developer at teamaton. I code in C# and work with MVC, Orchard, SpecFlow, Coypu and NHibernate. I enjoy beach volleyball, board games and Coke.