Failed to create a System.Type

May 15, 2010 at 10:08 AM

Hi

This library looks really awesome... it's just what I need.

However, I can not seem to get it to work for me. I've been trying to start with a really simple example, but I keep getting this error when it tries to read the xaml:

 

Failed to create a 'System.Type' from the text 'Microsoft.Practices.Unity.ContainerControlledLifetimeManager, Microsoft.Practices.Unity.Silverlight, Version=2.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'

 

I should mention that I am using Silverlight 4 in my project and that I am using Unity 2.0.

Do you know if this is a problem due to me using the above environment?

If so, do you have any plans to add support to it?

Also, do you have support for typeconverters in the config file?

Thanks for doing great work... I really think MS should add support for config files in unity for silverlight.

/K

Coordinator
May 28, 2010 at 11:52 AM

Hi mirtul,

thanks for your grate comments and appologies for the late reply.

As you already noted the problem lies in the version of Unity assembly. The current release build is for Silverlight 3 and Unity 1.2.

I have already ported the codebase for silverlight 4.0 unity 2.0, which will be available today for download. The port works like a charm without breaking changes, and the only drawback is the new UnityConfiguration xsd changed (to the better I believe) but Sonics xaml notation follows the previous xsd schema. I will try to find the time to change the classes in the near future to comply with the new shcema.

Best regards,

Constantinos.

Coordinator
May 28, 2010 at 2:28 PM
Edited May 28, 2010 at 2:29 PM

Hi mirtul,

The release is out for support of unity 2.0. As for the TypeConverters is concerned please elaborate. You could give me a configuration example (one that would work in the server side world) and I will try to make it work with sonic.

Best Regards,

Constantinos

Jul 5, 2010 at 10:42 AM
Hi... thanks for the upgrade.... I'm playing around with this in a spare time project, and recently I haven't had a lot of it available, so I haven't gotten around to testing your latest release yet :D. I'll try to check if the latest version works for me soon. TypeConverters allows you to specify run some code to convert a parameter value in the configuration to another value. What I wanted to accomplish with typeconverters was to be able to use appsettings in my unity configuration file. The user swheaton in this thread tried something similar, however it seems he never got it to work though. http://unity.codeplex.com/Thread/View.aspx?ThreadId=38312