c# - System.Linq.Dynamic: Could not load file or assembly Castle.DynamicProxy2 -
i have 3 .net 4.5 projects example.mvc (mvc 5), example.unittest, example.data. loaded dynamic linq library v1.1.13 nuget info layer "example.data" project. example.data uses entity framework 6 in utilize dynamic linq so:
var list = db.extendeduseraccounts .where(x => x.lastname.contains("doe")) .orderby("lastname, dateofbirth asc") .skip(numberofresultsperpage * (pagenumber - 1)) .take(numberofresultsperpage); homecoming list.tolist();
the example.unittest project calls method flawlessly. however, example.mvc project, references same example.data project, throws next exception:
system.reflection.reflectiontypeloadexception
"unable load 1 or more of requested types. retrieve loaderexceptions property more information."
the loaderexception says:
system.io.filenotfoundexception
{"could not load file or assembly 'castle.dynamicproxy2, version=2.1.0.0, culture=neutral, publickeytoken=407dd0808d44fbdc' or 1 of dependencies. scheme cannot find file specified.":"castle.dynamicproxy2, version=2.1.0.0, culture=neutral, publickeytoken=407dd0808d44fbdc"}
i never got error before trying utilize dynamic linq.
update:
i made error go away referencing old dlls of castle.dynamicproxy2, castle.core, , log4net. found them on rubygems.org. not prepare because assemblies outdated , may run compatability/assembly redirect issues in future, can do?
c# asp.net asp.net-mvc-5 dynamic-linq castle-dynamicproxy
No comments:
Post a Comment