Xamarin上的StructureMap:System.Reflection.TypeExtensions未找到
似乎我无法使用StructureMap: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
[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。我现在不记得了