11 Replies - 430 Views - Last Post: 03 January 2013 - 12:20 PM
#1
Application Not Working After Target Framework Change
Posted 02 January 2013 - 01:57 PM
Any ideas?
Regards
Matt
Replies To: Application Not Working After Target Framework Change
#2
Re: Application Not Working After Target Framework Change
Posted 02 January 2013 - 02:00 PM
mouse88, on 02 January 2013 - 02:57 PM, said:
Uhhhhh.... You haven't done any debugging??????????
mouse88: What this shows us is that you aren't familiar with breakpoints and how to debug your own code.
tlhIn`toq's FAQ list
Learning to debug one's own code is an essential skill. Sadly, one that apparently few college courses teach. Silly if you ask me.
Placing breakpoints and walking through the code line by line allows you to actually WATCH it execute.
Visualizing what your code does will let you see why it behaves the way it does.
It would be well worth your time to do the tutorials on FAQ 2. A couple hours learning this skill will save you hundreds of hours of confusion in one project alone.
TOP most asked:
What does this error message mean?
FAQ 2: How do I debug
FAQ 3: How do I make Class1/Form1 talk to Class2/Form2
FAQ (Frequently Asked Questions - Updated DEC 2012
#3
Re: Application Not Working After Target Framework Change
Posted 02 January 2013 - 02:02 PM
Maybe you can show us the code involving the timer and progress bar?
#4
Re: Application Not Working After Target Framework Change
Posted 02 January 2013 - 02:22 PM
The app does not throw any exceptions when running it however if I publish and install it it gives the error in the attached image.
I have put a breakpoint on the load event of my startup form. The event fires and proceeds to call the first void which loads some user data in to a data table. After completing this it shows the form and just stops doing anything.
Based on the error message and the method that it seems to hang on I assume it is something to do with accessing the database however I didn't have this problem before I changed the framework.
If I look at the count of the rows in the data table it states "Cannot evaluate expressionbe becuase a native frame is on top of the call stack".
Regards
Matt
Attached image(s)
#5
Re: Application Not Working After Target Framework Change
Posted 02 January 2013 - 02:32 PM
Quote
Keep F-10'ing to this point. I bet you find its caught in some kind of loop so it can't respond.
You mentioned a progress bar. You did put that in its own thread, didn't you?
Quote
You do have backups of the project, right? Did you make a backup before making this big change?
How far back is your most recent backup? It might be faster to re-code an hour worth of lost code than to track down this elusive issue over 3 hours.
#6
Re: Application Not Working After Target Framework Change
Posted 02 January 2013 - 02:50 PM
Stupidly I did not back up the project so I have no choice but to try and fix.
It doesn't allow me to F10 any further it just shows the form as does nothing.
This post has been edited by tlhIn`toq: 02 January 2013 - 03:08 PM
Reason for edit:: LONG details put into spoiler tag
#7
Re: Application Not Working After Target Framework Change
Posted 02 January 2013 - 03:08 PM

So now you have to start debugging the form_load handler. You can see it gets that far.
Right after the form loads you have the frmLogin .Load event - from the ChangeLog class????
Then you load user data. All of these methods should have breakpoints at the start to see if they are being hit and so you can F-10 your way through them.
So I suspect if you breakpoint somewhere in the form creation or load you should see the change log calls... then F-11 your way into the LoadUserData() method and take it from there
#8
Re: Application Not Working After Target Framework Change
Posted 02 January 2013 - 03:36 PM
This post has been edited by andrewsw: 02 January 2013 - 03:38 PM
#9
Re: Application Not Working After Target Framework Change
Posted 02 January 2013 - 03:41 PM
If that is the case, that suggests you are using a x64 bit OS, in which case you could try setting the the platform/build target of your application to x86 (Right click on project -> Properties -> Build) , as I think that often solves this issue.
EDIT: Or, for a more general solution(s), have a look here.
This post has been edited by CodingSup3rnatur@l-360: 02 January 2013 - 03:58 PM
Reason for edit:: Added link to more general solution.
#10
Re: Application Not Working After Target Framework Change
Posted 03 January 2013 - 11:55 AM
Quote
I may also be missing something as I don't see this as an available reference to select?
Quote
I am using a x64 bit OS, I changed my app to x86 and it runs fine from visual studio but hangs the same as before if I publish and install it.
The computer that I will be using it on wont be running a x64 but OS so hopefully it will work.
I will try debugging it again putting breakpoints at the start of each method to try and pinpoint where it hangs. It seems to be where I am running the query using the table adapter but the exception is getting swallowed up so it just shows the from and stops executing the code.
Never had this problem before after just changing the target framework but then again i've never had a x64 OS until I got this laptop.
This post has been edited by mouse88: 03 January 2013 - 11:56 AM
#11
Re: Application Not Working After Target Framework Change
Posted 03 January 2013 - 12:07 PM
I assume this is forcing it to run on 32-bit on my laptop but I may be wrong.
I suppose I could say this is fixed but wish I understood why it broke in the first place.
Thanks for the help.
Matt
#12
Re: Application Not Working After Target Framework Change
Posted 03 January 2013 - 12:20 PM
I'm guessing that by flipping targeted frameworks, Visual Studio (or your IDE) tried to help you out by switching to AnyCPU targets. If you were using source control or backing up your work, you would be able to compare against your past working (and non-working) versions to see what changed.
|
|

New Topic/Question
Reply




MultiQuote






|