FileLoadException when loading references


I'm using Spring.Net to dynamic load my object graph.

10 .exe consoles will start on the same time and via Spring.Net they will instantiate the same libraries. The consoles have no references to the libraries. 1 out of 10 times I get an Exception when Spring.Net (using reflection) creates the instances. I’m not sure why this happens, but probably it has something to do with the 10 consoles starting on the same time. It seems to happen often when the server has been rebooted (Windows Server 2008 R2)

Any ideas are appreciated!

Here is an stacktrace where it cannot load a reference to (referenced from the GAC)

System.IO.FileLoadException: Could not load file or assembly 'Oracle.DataAccess, Version=, Culture=neutral, PublicKeyToken=89b483f429c47342' or one of its dependencies. The process cannot access the file because it is being used by another process. (Exception from HRESULT: 0x80070020)

asked on Stack Overflow May 17, 2011 by Stig • edited Jul 8, 2011 by Marijn

0 Answers

Nobody has answered this question yet.

User contributions licensed under CC BY-SA 3.0