Oxplot not compatible with Caliburn.Micro + MEF

Oystein Bjorke 6 years ago 0
This discussion was imported from CodePlex

sharethl wrote at 2013-03-03 02:46:

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.

This is ex message

Could not load file or assembly 'System.Core, Version=, 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")) {
                return null;

tibel wrote at 2013-03-03 17:54:

Maybe this article will help you:
Using Portable Class Libraries - Update .NET Framework

As I don't get the exception on my machine.

sharethl wrote at 2013-03-03 22:48:

Wow, that really help, need to update .net 4.0.
Thanks Tibel