locked
System.IO.FileNotFoundException occured in unknown module. RRS feed

  • Question

  • I have a c# project that i am trying to debug. And when i run it i get this error. I have other people in my team running the same project in the same version of VS but they do not get this error. Anyone have any idea about how i can fix this?

    An unhandled exception of type 'System.IO.FileNotFoundException' occurred in Unknown Module.
    Could not load file or assembly 'System.Runtime, Version=4.2.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies . occurred

    Tuesday, April 7, 2020 6:13 PM

All replies

  • Could not load file or assembly 'System.Runtime, Version=4.2.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies . occurred

    The System.Runtime DLL is missing when you try to run the solution from your computer.

    Tuesday, April 7, 2020 11:09 PM
  • Hi inbr,

    Thank you for posting here.

    There are many possible causes of this error, so it is difficult to say what the real cause is.

    Perhaps you can try to delete the contents of the bin folder and then rebuild the project.

    To prevent unnecessary losses, don't forget to back up these files before doing this.

    Best Regards,

    Timon


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Wednesday, April 8, 2020 1:47 AM
  • If you still need help then you need to provide more information. Since you are debugging you can tell us what the code is doing when it gets the error. Do you know how to use breakpoints? You can set a breakpoint on a line prior to the line that gets the error; that might help. Do you know how to look at the stack during debugging? That might help.

    Error such as this often are the result of not handling a previous error. Ensure that the program checks for potential problems before they can occur and catches errors that do occur. The error says unhandled exception because the exception was unhandled and usually it is possible to handle the exception (with try/catch blocks).



    Sam Hobbs
    SimpleSamples.Info

    Sunday, April 12, 2020 8:37 PM