.net - FileNotFOundException in System.Windows.Forms.Application.ExecutablePath -


running visual studio 2008 .net 2.0. debug menu, select exceptions , set break when clr exceptions thrown.

then file new project, select new console application.

i add following 2 lines inside of main.

console.writeline(system.windows.forms.application.executablepath); console.readkey(); 

when execute code filenotfoundexception saying can't find \consoleapplication1\consoleapplication1\bin\debug\consoleapplication1.vshost.exe.config.

i'm wondering both why happens , how prevent happening leave break on thrown clr exceptions setting on during testing sessions.

thanks.

edit: i'm aware of vshosting system , ok existence of files , for. don't want turn of hosting. i'm not sure why call application.executablepath looking config file. able around in 1 spot changing system.reflection call same value. got same error in on "new devexpress.xtraeditors.buttonedit()" call.

the issue didn't not have app.config defined in project , had justmycode debugging option disabled. soemthing instead of call throwing exception missing app.config , since set throw on exception , not justmycode visual studio debugger catching , breaking @ point.


Comments

Popular posts from this blog

delphi - How to convert bitmaps to video? -

jasper reports - Fixed header in Excel using JasperReports -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -