Re: [Ikvm-developers] Unable to find assembly IKVM.OpenJDK.Core when deserializing object with Bina
Brought to you by:
jfrijters
|
From: Volker B. <vol...@go...> - 2013-05-27 18:39:38
|
Hi Todd, Do you have run the serialize and deserialize with the same IKVM version? It look like you use different versions. Do you have a stacktrace of the exception? Volker Am 27.05.2013 06:33, schrieb Todd Schiller: > I'm trying to serialize and deserialize a C# List of IKVM Java objects > using a BinaryFormatter. The program serializes the list to a file, > and then attempts to deserialize the file the next time the program is > run. > > Originally, I received the following error stating that the assembly > containing the IKVM Java type could not be found when deserializing > the list: > > Unable to find assembly 'daikon, Version=0.0.0.0, Culture=neutral, > PublicKeyToken=null'. > > To address this problem, I added an AssemblyResolve handler which > returns the assembly of the referenced type: > > AppDomain.CurrentDomain.AssemblyResolve += (sender, args) => > typeof(daikon.inv.Invariant).Assembly; > > While this appears to solve the original problem, I now get the > following error when trying to deserialize the list: > > Unable to find assembly 'IKVM.OpenJDK.Core, Version=7.2.4630.5, > Culture=neutral, PublicKeyToken=13235d27fcbfff58'. > > I have tried the following to fix the problem with no success: (1) > Adding an AssemblyResolve event using the assembly > typeof(java.lang.Boolean).Assembly, and (2) as per a previous thread > on this mailing list, adding the following entry to the AssemblyInfo: > "[assembly: > IKVM.Attributes.CustomAssemblyClassLoader(typeof(ikvm.runtime.AppDomainAssemblyClassLoader))]". > > > Let me know if you need any more information; any help or ideas would > be greatly appreciated. > > Regards, > Todd > > > ------------------------------------------------------------------------------ > Try New Relic Now & We'll Send You this Cool Shirt > New Relic is the only SaaS-based application performance monitoring service > that delivers powerful full stack analytics. Optimize and monitor your > browser, app, & servers with just a few lines of code. Try New Relic > and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may > > > _______________________________________________ > Ikvm-developers mailing list > Ikv...@li... > https://lists.sourceforge.net/lists/listinfo/ikvm-developers |