Prev: Supported image-formats by Windows.Media.BitmapDecoder?
Next: Linq to XML - managing xsd with multiple schemas
From: Phil on 15 Oct 2009 12:31 I have done a bit more testing, and I think the problem may be to do with versioning. I get the same problem if I serialise to a file, and then rebuild and re-deploy the application. The new version does not seem to want to deserialise the data produced with the old version. I have tried setting AssemblyFormat = Formatters.FormatterAssemblyStyle.Simple before the Serialze and Deserialize calls, but this doesn't seem to make any difference.
From: Adam Benson on 21 Oct 2009 04:25 Something may be blowing up behind the scenes as its deserializing which is why your object has nothing in it. Try using DbgView to see if there are any exceptions being thrown as your object is deserializing. AB "Phil" <p> wrote in message news:BI6dnbJJLov400rXnZ2dnUVZ8v6dnZ2d(a)brightview.co.uk... >I have done a bit more testing, and I think the problem may be to do with > versioning. I get the same problem if I serialise to a file, and then > rebuild and re-deploy the application. The new version does not seem to > want > to deserialise the data produced with the old version. > I have tried setting > AssemblyFormat = Formatters.FormatterAssemblyStyle.Simple > before the Serialze and Deserialize > calls, but this doesn't seem to make any difference. > > >
From: Phil on 4 Nov 2009 05:20
"Adam Benson" <Adam.Benson(a)community.nospam> wrote in message news:O4ixLgiUKHA.1236(a)TK2MSFTNGP05.phx.gbl... > Something may be blowing up behind the scenes as its deserializing which > is why your object has nothing in it. Try using DbgView to see if there > are any exceptions being thrown as your object is deserializing. > Thanks Adam, I've left this for a while, as I didn't seem to be getting anywhere, but I will need to come back to it soon. I haven't used DbgView, so I'll take a look at that, and see if it helps to shed any light on the problem. Is this something included with VS2008, or is it something extra I need to download? I did do some further tests last week, and I think my original assumption was correct, that the problem is an incompatibuility between the release and debug versions, not anything to do with the version number of the assemblies. It is a very simple class, just a few private member variables (mostly arrays of double or string) with public properties to get/set the values. I did have an additional complication that my assemblies were being loaded from a database in the released version rather than directly from a DLL, but I have moved these classes into a separate new DLL, and I still have the problem. Thanks Phil. |