Monday, June 8, 2009

Error registering COM+ dll using Regsvcs.exe

“Could not load file or assembly System.IO.FileNotFoundException”

This error happens due to various reasons. The first solution that you will find for this issue is, “Copy all the dependency files to the destination server and register the dll”. This seems to be an easy fix, hence we miss this solution by oversight. Do not go by an understanding that target machine has the similar environment as our development machine and there is not need to copy the dependencies. Dependencies need not be the framework dll, it can also be any specific dll created for this process. In such case copy the latest of that dlls to the bin folder of the solution and build the code. Copy the latest build and the dependency dlls to the target machine and register the dll.

There may be other reasons for which you may receive this error. Information about the same are available in the following link.

http://blogs.msdn.com/dougste/archive/2006/09/05/741329.aspx

Additional information on COM+ registration
http://social.msdn.microsoft.com/Forums/en-US/netfxremoting/thread/343e7086-8b24-4314-ad5a-4115dfaadce0