من تا روز قبل هیچ مشکلی دراستفاده از StructureMap نداشتم وازکار کردن باهاش لذت میبردم ولی با استفاده از NuGet دیروز آخرین نسخه StructureMap رو از سایت گرفتم وموقع اجرای برنامه به محض اولین وهله سازی (uow) اشکال میگیره و پیغام Error in the application میده.... ولی اگه دستی و بدون استفاده ازStructureMap وهله سازی کنم کارها روی روال پیش میره.... Error Code =205 و توی سایتها زیاد سرچ زدم ولی موارد قید شده راهگشای این مشکل نبود...درضمن توی Error Details هم پیغام زیر رو نمایش میده :
StructureMap Exception Code: 205 Missing requested Instance property "path" for InstanceKey "fcfc9943-37d0-45d3-aebc-dad30fe29e59"
که اگه ConnectionString من مشکل داره پس چرا بدون استفاده از StructureMap اون وهله سازی میکنه؟
و کدهای ایجاد و وهله سازی :ObjectFactory.Initialize(x => { x.For<IUnitOfWorkCentralSystem>().HybridHttpOrThreadLocalScoped().Use<ContextCentralSystem>(); x.For<IYearService>().Use<YearService>(); x.For<IUserService>().Use<UsersService>(); }); var _uow = ObjectFactory.GetInstance<IUnitOfWorkCentralSystem>();