Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/xamarin/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Xamarin上的StructureMap:System.Reflection.TypeExtensions未找到_Xamarin_Dependency Injection - Fatal编程技术网

Xamarin上的StructureMap:System.Reflection.TypeExtensions未找到

Xamarin上的StructureMap:System.Reflection.TypeExtensions未找到,xamarin,dependency-injection,Xamarin,Dependency Injection,似乎我无法使用StructureMap: [Mono] The class System.Reflection.TypeExtensions could not be loaded, used in System.Reflection.TypeExtensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 我添加了System.Reflection.TypeExtensions: <package

似乎我无法使用StructureMap:

[Mono] The class System.Reflection.TypeExtensions could not be loaded, used in System.Reflection.TypeExtensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
我添加了System.Reflection.TypeExtensions:

<package id="System.Reflection.TypeExtensions" version="4.0.0" targetFramework="monoandroid60" />

我可以在参考资料中看到那个DLL。我仍然会犯同样的错误

有什么提示吗

我需要StructureMap,因为我在使用SimpleInjector时无法传递构造函数参数。在structuremap中,很容易:

_container.With(offer).GetInstance<OfferDetailsViewModel>(); // "offer" will be passed to the ctor of OfferDetailsViewModel
\u container.With(offer).GetInstance();//“报价”将传递给报价人的ctor

似乎还没有人回答这个问题。你找到答案了吗?还是转到了AutoFac或类似的东西?@ColinPear不,我坚持使用SimpleInjector。你使用的是可移植类库(PCL)吗?我不知道这是否只是模板的一部分。@ColinPear我想当时我已经切换到共享项目而不是PCL。我现在不记得了