我最近从我的解决方案中删除了一个程序集及其所有引用,并将其替换为另一个程序集。
当我尝试使用StructureMap.Container.Configure()
或StructureMap.Container(Action<ConfigurationExpression> expression)
构造函数时
我得到System.IO.FileNotFoundException
,Could not load file or assembly 'WebUtilities...' or one of its dependencies. The system cannot find the file specified.
和WebUtilities
是我从解决方案中的所有项目中删除的程序集。我已经搜索了所有文件,并没有使用或提及此程序集。这个错误是如何发生的?为什么?
at System.Reflection.RuntimeAssembly.GetExportedTypes(RuntimeAssembly assembly, ObjectHandleOnStack retTypes)
at System.Reflection.RuntimeAssembly.GetExportedTypes()
at StructureMap.Graph.TypePool.<.ctor>b__0(Assembly assembly) in c:\BuildAgent\work\996e173a8ceccdca\src\StructureMap\Graph\TypePool.cs:line 16
at StructureMap.Util.LightweightCache`2.get_Item(TKey key) in c:\BuildAgent\work\996e173a8ceccdca\src\StructureMap\Util\LightweightCache.cs:line 77
at StructureMap.Graph.TypePool.<>c__DisplayClass3.<For>b__2(Assembly x) in c:\BuildAgent\work\996e173a8ceccdca\src\StructureMap\Graph\TypePool.cs:line 21
at System.Linq.Enumerable.<SelectManyIterator>d__14`2.MoveNext()
at StructureMap.StringExtensions.Each[T](IEnumerable`1 enumerable, Action`1 action) in c:\BuildAgent\work\996e173a8ceccdca\src\StructureMap\Extensions.cs:line 10
at StructureMap.Graph.AssemblyScanner.ScanForTypes(TypePool types, PluginGraph pluginGraph) in c:\BuildAgent\work\996e173a8ceccdca\src\StructureMap\Graph\AssemblyScanner.cs:line 127
at StructureMap.PluginGraphBuilder.<>c__DisplayClass2.<RunConfigurations>b__1(AssemblyScanner x) in c:\BuildAgent\work\996e173a8ceccdca\src\StructureMap\PluginGraphBuilder.cs:line 82
at StructureMap.StringExtensions.Each[T](IEnumerable`1 enumerable, Action`1 action) in c:\BuildAgent\work\996e173a8ceccdca\src\StructureMap\Extensions.cs:line 12
at StructureMap.PluginGraphBuilder.RunConfigurations() in c:\BuildAgent\work\996e173a8ceccdca\src\StructureMap\PluginGraphBuilder.cs:line 82
at StructureMap.PluginGraphBuilder.Build() in c:\BuildAgent\work\996e173a8ceccdca\src\StructureMap\PluginGraphBuilder.cs:line 45
at StructureMap.ConfigurationExpression.BuildGraph() in c:\BuildAgent\work\996e173a8ceccdca\src\StructureMap\ConfigurationExpression.cs:line 54
at StructureMap.PipelineGraph.For(Action`1 action) in c:\BuildAgent\work\996e173a8ceccdca\src\StructureMap\PipelineGraph.cs:line 19
at StructureMap.Container..ctor(Action`1 action) in c:\BuildAgent\work\996e173a8ceccdca\src\StructureMap\Container.cs:line 25
at IoC.ObjFactory.GetContainer(Action`1 expression) in d:\development\Projects\commerce\Source Code\Shared\IoC\ObjFactory.cs:line 40
这发生在我的本地计算机上,我已经删除了所有临时ASP .Net文件,重启了Visual Studio和PC几次,手动删除了解决方案中所有项目的所有bin和obj文件夹。没有项目引用程序集。