Код: Выделить всё
Код: Выделить всё
MyLibrary.dll.configКод: Выделить всё
Unhandled Exception: System.ComponentModel.Composition.CompositionException: The composition produced a single composition error. The root cause is provided below. Review the CompositionException.Errors property for more detailed information.
1) Could not load file or assembly 'Microsoft.Bcl.AsyncInterfaces, Version=6.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Resulting in: An exception occurred while trying to create an instance of type 'MyLibrary.MyType'.
Resulting in: Cannot activate part 'MyLibrary.MyType'.
Element: MyLibrary.MyType --> MyLibrary.MyType --> AssemblyCatalog (Assembly="MyLibrary, Version=3.9.0.0, Culture=neutral, PublicKeyToken=null")
Resulting in: Cannot get export 'MyLibrary.MyType (ContractName="LibraryBaseType")' from part 'MyLibrary.MyType'.
Element: MyLibrary.MyType (ContractName="LibraryBaseType") --> MyLibrary.MyType --> AssemblyCatalog (Assembly="MyLibrary, Version=3.9.0.0, Culture=neutral, PublicKeyToken=null")
at System.ComponentModel.Composition.Hosting.CompositionServices.GetExportedValueFromComposedPart(ImportEngine engine, ComposablePart part, ExportDefinition definition)
at System.ComponentModel.Composition.Hosting.CatalogExportProvider.GetExportedValue(CatalogPart part, ExportDefinition export, Boolean isSharedPart)
at System.ComponentModel.Composition.Primitives.Export.get_Value()
at System.ComponentModel.Composition.ExportServices.GetCastedExportedValue[T](Export export)
at System.Lazy`1.CreateValue()
at System.Lazy`1.LazyInitValue()
at MainApplication.Start(String[] args) in ...\MainApplication.cs:line 65
at MainApplication.Main(String[] args) in ...\MainApplication.cs:line 31
Подробнее здесь: https://stackoverflow.com/questions/750 ... y-with-mef
Мобильная версия