开发者

what is system.io.filenotfoundexception?

I have a C# program, that works fine on my computer, but on other computer.

I receive the following error:

EventType : clr20r3     
P1 : serialport terminal.exe     
P2 : 1.0.0.0     
P3 : 4ccdc565     
P4 : system     
P5 : 2.0.0.0     
P6 : 471ebf0d     开发者_开发知识库
P7 : 3b73
P8 : 51     
P9 : system.io.filenotfoundexception     

I don't understand what this means or why it work on my computer but not on the other.


You're using a file or referencing a DLL that doesn't exist on the other machine.

You can add catch blocks or an Application.UnhandledException handler to your code to get more details about the exception.


Usually if it works for your computer and not another then the path to the requested file is not the same on the development machine as the user machine. Look for hard coded paths or references to files that only exist on development machine


System.IO.FileNotFoundException is an exception that indicate (...) that a file used by your program has not been found on the target system.

Maybe terminal.exe does not exists on the target machine? Or exists in another path than the one you are using?


Looks like the file that exists on your computer either does not exist on other computers at all or simply not in the location your program is looking for it at.

From MSDN, FileNotFoundException:

he exception that is thrown when an attempt to access a file that does not exist on disk fails.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜