nopCommerce 2.40 Operation could destabilize the runtime error Fix

nopCommerce 2.40 Operation could destabilize the runtime error Fix

Recently my web hosting provider decided to upgrade to .NET 4.5 , and as you may or may not know, .NET 4.0 and .NET 4.5 do not run side by side. This may cause some breaking changes in your 4.0 applications without you even knowing it, which is what happened to me. I was suddenly getting a “Operation could destabilize the runtime” error when navigating to my nopCommerce site… that was a new one for me, “destabilize the runtime?”, no idea what that means, but anyways….here is how it was fixed.

After some googling and searching on the nopCommerce support forums, it seemed like I was left with two choices:

  1. Download the newest version of nopCommerce, install that, and run the database upgrade script on my 2.40 version
  2. Download the complete source for 2.40, use NuGet and update all references to the FluentValidation library, so as to get the newest version that works with .NET 4.5.

 

 

 

 

Being that I just wanted the site to work, I didn’t want to go through the hassle of updating the database and redeploying code, I went with option 2. Sometime’s lazy is better, especially when you need a fix asap.

This was one of those instances where I gained an even bigger appreciation for NuGet, it really is helpful for updating third party libraries in your app very quickly, and even in a fairly large app like nopCommerce, you can easily dig through an entire solution and all of its projects to update those libraries. Doing that manually would be a pretty big pain in the but.

Long story short, if you want to fix this error, and keep your existing 2.40 nopCommerce install… download the source, download/install NuGet, update all references to the FluentValidation library, build, redeploy the newly built dlls, and with any luck, you’ll be back up and running!

Good luck!

 

By | 2018-03-05T22:43:43+00:00 November 12th, 2012|Categories: ASP.NET|0 Comments

About the Author:

Leave A Comment