Upgrading Application from .NET 1.1 to 2.0

Lanc1988

Contributor
Joined
Nov 27, 2003
Messages
508
I am trying to upgrade a small application that simply downloads a file from my website (an update basically) and then when its finished it launches the install for the update.

The program works fine in vb.net 2003 with .NET framework 1.1 and when I upgrade to 2.0 it appears there are no problems but when I run the program it doesnt work at all and it doesnt give me any clues where the problems are.

I've attached the program. Someone else wrote this code for me a couple years ago so I can only kinda follow along with it. Hopefully the fix is something simple.

This program is a small part of a larger project that I have already converted to 2.0 and it works fine but this is keeping me from releasing the whole project.

Thanks.
 

Attachments

When you say it doesn't work at all are you refering to the InvalidOperationException that is thrown due to cross thread calls?

If so this is due to .Net 2 and later being more strict about updating the UI from anything other than the main UI thread - this was a bad idea even in .Net 1 it just wasn't enforced in .Net 1.

Any line that is either in the StartDLThread method or is called from it cannot directly update the user interface, you need to get the form to invoke a method to do the real work.

The following should give you an idea
http://www.xtremedotnettalk.com/showthread.php?t=100158&highlight=invokerequired
http://www.xtremedotnettalk.com/showthread.php?t=101944&highlight=invokerequired
 
Thanks for the info.

I just noticed something that seems kinda strange for my updater application. I ran the .exe for it on my computer that doesnt have .net 1.0 or 1.1 installed (only 2.0, 3.0, and 3.5) and it runs and works perfectly.. how is this possible when it was created in vb.net 2003 with .net 1.1?
 
Back
Top