c# - StructureMap Could not load file or assembly -
i'm using structuremap mvc on webapi project.
when run unit tests or integration tests, xunit , resharper i'm getting:
system.io.filenotfoundexception not load file or assembly 'myapi.myservices, version=1.0.0.0, culture=neutral, publickeytoken=null' or 1 of dependencies. system cannot find path specified.
this occurs randomly on tests. when try run again don't error.
here error occurs:
objectfactory.initialize(x => { x.for<iprovider>().lifecycleis(lifecycles.getlifecycle(instancescope.perrequest)).use<sqliteprovider>(); x.for<ilog>().lifecycleis(lifecycles.getlifecycle(instancescope.singleton)).use(logger.object); x.for<isession>().lifecycleis(lifecycles.getlifecycle(instancescope.perrequest)).use(() => session); });
the stacktrace isn't helpful:
@ structuremap.objectfactory.initialize(action`1 action) in c:\buildagent\work\767273992e840853\src\structuremap\objectfactory.cs: line 61
are using resharper 8? xunit runner had nasty bug looks this. make sure update xunit extension (resharper -> extension manager) 1.2
Comments
Post a Comment