Oxplot not compatible with Caliburn.Micro + MEF

Mar 3, 2013 at 2:46 AM
Edited Mar 3, 2013 at 2:48 AM
Don't know should post on CM or here.

It is oxyplot-94236a582857 on XP.
CM with customized bootstrapper cannot execute GetInstance() with OxyPlot.dll in its folder.
If OxyPlot.dll is removed, it works fine, also, no problem on Win7.

Here is the executes, not virus. You can remove OxyPlot.dll and see it works fine.
Environment: XP.
https://www.box.com/s/pk71tu3zj0r2j109j6xe

This is ex message

GetInstance
Could not load file or assembly 'System.Core, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e, Retargetable=Yes' or one of its dependencies. The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047)
 protected override object GetInstance(Type serviceType, string key) {
            try {
                string contract = string.IsNullOrEmpty(key) ? AttributedModelServices.GetContractName(serviceType) : key;
                var exports = container.GetExportedValues<object>(contract);

                if (exports.Count() > 0)
                    return exports.First();

                throw new Exception(string.Format("Could not locate any instances of contract {0}.", contract));
            }
            catch (Exception ex) {
                using (StreamWriter writer = new StreamWriter("log.txt")) {
                    writer.WriteLine("GetInstance");
                    writer.WriteLine(ex.Message);
                }
                return null;
            }
        }
Mar 3, 2013 at 5:54 PM
Maybe this article will help you:
Using Portable Class Libraries - Update .NET Framework

As I don't get the exception on my machine.
Mar 3, 2013 at 10:48 PM
Edited Mar 3, 2013 at 10:49 PM
Wow, that really help, need to update .net 4.0.
Thanks Tibel