how to solve Break Mode (An unhandled exception of type 'System.IO.FileNotFoundException' occurred in Unknown Module.)

Vaggelis.v 1 Reputation point
2022-03-28T14:38:32.053+00:00

I am a begginer
and 2 to days before i installed visual studio Community
and i started learning in c# . after the next day in other worlds yesterday i countered this error An unhandled exception of type 'System.IO.FileNotFoundException' occurred in Unknown Module. and the program was inside break mode i searched in the internet for a sollution but it was to complicated for me to understannd. I decided to delete the app and intall it again everything was working fine in errors that i made the debugger showed me in which line was the mistake that i was doing. Today i having the same issues the break mode is opening without having any mistakes with this error once again(An unhandled exception of type 'System.IO.FileNotFoundException' occurred in Unknown Module.)
pls i need help this thing is annoying

VB
VB
An object-oriented programming language developed by Microsoft that is implemented on the .NET Framework. Previously known as Visual Basic .NET.
2,728 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Michael Taylor 54,401 Reputation points
    2022-03-28T14:55:46.633+00:00

    Break mode means the debugger is breaking into your code because something of interest happened. In this case it was an unhandled exception (error). Fortunately the debugger will show you the line of code it is failing on (generally) along with the callstack as to how you go there and the actual exception message which should indicate the file that it could not find.

    When the debugger breaks in please post the exception message and callstack or a screenshot of the error information so we can understand where the error is. If your code is trying to load some file then that is most likely the place and showing us that code would also help.

    187534-image.png


  2. MotoX80 33,921 Reputation points
    2022-03-28T19:26:30.697+00:00

    What kind of project did you create? Your image shows program.dll.

    187661-capture1.png

    By itself a dll is not executable. It needs to be a .exe. Here I created a C# console app. Note that the process is TestConsoleC.exe.

    187671-capture.png


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.