Reference dll throwing error 'System.IO.FileNotFoundException" while using it in another application RRS feed

  • Question

  • This is the first I am facing such an issue. This was a working code for the past year and suddenly it started failing since yesterday.

    Issue: I have a dll - MESTxnService.dll which was built using reference to other dlls like MyLibrary.dll, CamstatUtil.dll,Camstar.Utility.dll etc. This MESTxn.dll is being used in another Class Library and building the - PartsMgmt.dll. PartsMgmt.dll is used as a DAO Layer in a web application.

    When I try to test the MESTxnService Class Library with console application it works as expected. But when I use this  MESTxnService.dll in PartsMgmt Library and test it using console application, it throws the following error:

    A first chance exception of type 'System.IO.FileNotFoundException' occurred in Camstar.Utility.dll A first chance exception of type 'System.IO.FileNotFoundException' occurred in MESTxnService.dll A first chance exception of type 'System.IO.FileNotFoundException' occurred in MESTxnService.dll A first chance exception of type 'System.IO.FileNotFoundException' occurred in MESTxnService.dll

    This is a production issue now - unable to understand why this would happen suddenly. Any help or pointer in much appreciated.

    Thank you very much for your time.

    Thanks Varshan

    Thursday, August 4, 2016 11:55 PM


  • Hi Varshan Balu,

    According to your description, when you use console app and reference related DLL, it works well. But it does not work when using library project.

    Firstly, please check if your library project has referenced related DLL.

    Secondly, please rebuild the console application and check if related DLL files exist in the folder (bin\Debug of console application).

    In addition, if the issue is still existing. Could you please provide a simple demo which could reproduce your issue via OneDrive, we’ll reproduce your issue on our side and try to find a solution to resolve it.

    Best regards,

    Cole Wu

    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Friday, August 5, 2016 8:51 AM