Victor Hadianto

Hi,

I'm currently at loss with this current problem. This is the scenario: I have several c# libraries (all strongly named) in my solution. This solution processes data and serialised the result into a MS SQL Server database.

From my VSTO project (using VB.NET) I tried to access the database and deserialise the result back into my object. Everything works until the moment of deserialisation where I get the SerializationException: Type is not resolved for member ...

I have a test project that accesses the database and deserialise my object and it is working perfectly fine, so I'm certain that the serialisation/deserialisation code is working, but just not within VSTO framework.

Any ideas

Cheers,

Victor




Re: Visual Studio Tools for Office SerializationException: Type is not resolved for member ...

Victor Hadianto

Well for everyone benefit I found what the problem was. Turned out if .NET is hosted by an external process (ie: Excel) it often fails to load referenced assemblies. I had to reference the assemblies manually on the project reference and this problem is gone.

To find out which Assemblies .NET is trying to load you need to hook into the AssemblyResolve event of the current app domain. The error message is a red-herring thus sent me to a wild goose chase for a good part of the day.