开发者

Method works in Visual Studio but not from exe

开发者 https://www.devze.com 2023-03-10 18:02 出处:网络
I have a really wierd problem with my app. When i debug the application from visual studio it works perfectly but when i execute the exe file from the debug folder one of the methods does not work at

I have a really wierd problem with my app. When i debug the application from visual studio it works perfectly but when i execute the exe file from the debug folder one of the methods does not work at all.

the weird thing is that it is just one method everything else in the application works

i read up on similar types of problems and most articles go in the direction of the configuration manager where the setting for pla开发者_JAVA百科tform is set to 'anyCPU' i changed the platform to x64 because my development machine has a 64 bit OS but i still get the same problem occuring..

this problem has me stumped for the last couple hours....

any help would be appreciated

thanks


Are you sure that while debugging thru Visual studio u r not checking any properties manually(at run time)? I mean by putting some breakpoint and then traverse thru the property tree of the object. Because that can result in intializing some stuff which can lead to different execution path. I am saying this from my personal experience, as i was debugging and checked some properties at run time, which was resulting in desired result.


delete all .dll and .exe file in your solution directory(those which are solution's project output) and then rebuild all project


If you are working with webservices there could be the problem, that the answer from the server is to slow. while debugging the program "runs slower" and the answer has many time. Without debugging programm runs fast and you have the problem of the answer not beeing there when you need it.

I've had this kind of problem one time and too needed a long time to get the point ;-)

Another solution could be a different security police in and out of VisualStudio (I'm not really sure but sometimes it seems like Programs have more rights while debugging (at least on my PC)).

0

精彩评论

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