Serialization bug revisited?

Serialization bug revisited?

Old forum URL:

Michael posted on Tuesday, September 03, 2013

Hi everyone

We've recently upgraded to CSLA 4.5.30 using NuGet.

Our application loads plug-ins from different directories using MEF. When a plug-in hits DataPortal.Execute() inside a command derived from CommandBase, we are getting the following:

System.Runtime.Serialization.SerializationException: Unable to find assembly 'Company.Product.Business, Version=x.x.x.x.

The silly part is that the command in question is defined in this very assembly.

If we move the plug-in assemblies into the same directory as the main application, the bug disappears. (This is not an acceptable workaround.)

So, is it the old serialization bug revisited?

With older versions of CSLA, we included the source project in our solution and had modified versions of the serialization bug workaround in DataPortal and EnterpriseServicesPortal, which had a recursion check.

Now that we're relying on NuGet, how can we fix this?

Thanks in advance.


RockfordLhotka replied on Thursday, September 05, 2013

It sounds like the same issue. And it could be possible because the issue occurs when assemblies are dynamically loaded in some circumstances (I'm sure there's a pattern, but I don't know the specific rules).

I'm not sure any code containing the workaround is still in the core CSLA codebase, so you might need to add it directly to your app's startup code.

Michael replied on Thursday, September 05, 2013

Thanks  for the reply, Rocky.

Running the old workaround code on startup has fixed it.

Copyright (c) Marimer LLC