Possible Duplicate:
Suggest a method for auto-updating my C# program
I’m sorry if this question has been asked already.
i have a problem whit online update because i don’t know how can add code for check for update program and after check if find newer version upgrade itself.
However, every time I make changes to the program
people will have to download the new version.
i have a host and no any problem whit host.
well only i need add code for check for online update
how can add code for check for update when open program ?
what can i do ?
what do i do ?
can u please help me ?
please give me sample code or sample project for understand.
thanks.
Have you looked at the ClickOnce technology? This is automatically built-in to either
1) not check for updates
2) check for updates before the application starts or
3) check for updates after the application finishes.
It’s a great way to circumvent your issues, and it’s easy to implement.
Or if you want to manually do this, utilize the
System.Reflectionnamespace and use theAssembly.GetExecutingAssembly().GetName().Versionproperty to get the application’s version. Then do whatever conditional comparison you need to do to see if that’s the newest version, and if not then update the application.