Posted 16 years ago by ori
Version: 4.0.0262
Platform: .NET 2.0
Environment: Windows XP (32-bit)
Avatar
Hello,

I have the following code:

dotNetProjectResolver = new DotNetProjectResolver();
dotNetProjectResolver.AddExternalReferenceForMSCorLib();
dotNetProjectResolver.AddExternalReferenceForSystemAssembly("system");
dotNetProjectResolver.AddExternalReferenceForSystemAssembly("system.Data");
dotNetProjectResolver.AddExternalReference("MyFirstAssembly.dll"); 
dotNetProjectResolver.AddExternalReference("MySecondAssembly.dll");
I don't know why, but some times (about 20% of all times) that I run this code I got the following exception:
Could not load file or assembly 'MyFirstAssembly.dll' or one of its dependencies. The system cannot find the file specified.
I was sure it is something with my dll, but after I have had enough exceptions in my log I decided not to use 'MyFirstAssembly.dll' in the intelli-prompt. After the line in comment I started to get the same error for MySecondDll - so now I know it is something inside the component.
Is there a way you can check it?

Thanks,
Ori

Comments (1)

Posted 16 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Look at the information in the Exception that was raised, and if there are any inner exceptions, often those give you the details on what exactly the problem is. So be sure to look down the entire tree of inner exceptions if there are any.

Also note that if your custom assembly references another system assembly that is not available on your system but a newer version is, our most recent builds will look for those newer versions as well. So that has helped work around some customer issues where references couldn't be loaded. Not sure if that is the case for you but it's worth checking out since you are on an older build.

[Modified at 02/06/2008 08:14 PM]


Actipro Software Support

The latest build of this product (v24.1.0) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.