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

Vaggelis.v 1 Reputation point

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

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

2 answers

Sort by: Most helpful
  1. Michael Taylor 41,811 Reputation points

    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.


  2. MotoX80 29,371 Reputation points

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


    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.