System.IO.FileNotFoundException

  • Thread starter Thread starter Austin
  • Start date Start date
A

Austin

Hi,

I have an three assemblies in my application.
1. Assembly1.dll - Since this is a shared assembly it is registerd in
GAC
2. Assembly2.dll - This dll refers to Assembly1.dll for acheiving some
functions. This is not a shared assembly this is developed exclusively
to be used by Assembly3.exe.
3. Assembly3.exe - This is an console appliction which makes use of
Assembly2.dll

When i execute Assembly3.exe, it breaks at the point where it tries to
access one of the method of Assembly2.dll.

I am not able to figure out the problem.

If any one has come across such problem and resolved, please guide me
to resolve it.

Thanks in Advance,
Austin.
 
Is Assembly2 located in the same folder as Assembly3 does? If so... Have you
written a try/catch statement where the exception is being thrown? What file
is the exception referenced to? Are you referencing some other assembly from
within Assembly1 and these are shared too? Check out your assemblies'
references

Regards,
 
You can also try using the FUSLOGVW.exe utility (located in the \SDK\v1.1\Bin
directory of you VS.net installation folder). This utility will tell you
where your application is trying to load assemblies from.

HTH, Jakob.
 
Hi All,

Thanks you very much for your responses.

To answer few of your questions

Assembly3 and Assembly2 are in the same folder.
From Assembly1 i am refering some other assemblies too which are again
in GAC.

FUSLOGVW.exe - I haven't used it and not sure how it works... Let me
try.

Exception that i received:
***********************************************************
File or assembly name Assembly1, or one of its depende
ncies, was not found.
at Assembly2.Class1.Init(String culture, Stri
ng path)
at Assembly3.TestClass..ctor(ITransportationClassFactory
classFactory, CultureInfo culture, String spoolPath) in
d:\test\sources\TestClass.cs:line 54
at Assembly3.TestHarness.ExecuteTestCases(String condition) in
d:\test\sources\testharness.cs:line 126
at Assembly3.TestHarness.Main(String[] args) in
d:\test\sources\testharness.cs:line 48
***********************************************************

Thanks,
Austin.
 
Back
Top