Question System.Windows.Forms.Timer does not work in Release Mode but works in Debug Mode,why?

mvthakar

New member
Joined
Oct 21, 2014
Messages
4
Location
Jamnagar, Gujarat, India
Programming Experience
1-3
Hello folks,
First Post.

I'm using Visual Studio 2012 Express and .NET Framework 4.0.

As mentioned in Thread Title, (System.Windows.Forms.)Timer works fine in Debug Mode but does not work in Release Mode.
I googled it and found it might be getting collected by Garbage Collector (GC).

If it is getting GC-ed then how do I stop it?

Any suggestions?
Thanks in advance.
 
Last edited:

mvthakar

New member
Joined
Oct 21, 2014
Messages
4
Location
Jamnagar, Gujarat, India
Programming Experience
1-3
Found solution!

Never mind people!
I found solution myself and here it is:

It is happening because of .NET Framework 4.0. I changed it to version 4.5 and now it works.
 
Last edited:
Top Bottom