Solved

.NET - Clickonce Update Application, Add "Whats New" Popup

Posted on 2013-11-15
3
521 Views
Last Modified: 2013-11-21
i have a Clickonce application. It posts to an internal server.
if there is a new version, The client applications are asked to update every time the open the program.

I need a form to open with latest changes, or whatever, ONCE after EVERY update, for EACH user

Any Suggestions?
0
Comment
Question by:Ess Kay
3 Comments
 
LVL 40

Assisted Solution

by:Jacques Bourgeois (James Burger)
Jacques Bourgeois (James Burger) earned 250 total points
ID: 39652982
Start the application in a Main method instead of starting it directly in a Form.

Store the current application version somewhere, either in the settings of the application, in a file, in the registry, you name it.

When the application starts, it checks its own version number against the stored number.

If they do not match, then this is an update. In such a case, show the update form with ShowDialog and store the new version number for the next run. When the user closes the update form, display the application startup form.

If the version of the application and the stored version match, then the update form has been displayed once. Simply skip it and go straight to the application startup form.
0
 
LVL 13

Accepted Solution

by:
jonnidip earned 250 total points
ID: 39655566
You can use this ClickOnce method that shows you if the current deploy has just been installed (so, only on the first run of every update). I am using it to clear local cache when a new update is installed (because the previous cache can contain differences from the actual objects).
System.Deployment.Application.ApplicationDeployment.CurrentDeployment.IsFirstRun

Open in new window

You can simply check it and show your changes file if the value is "true".

Regards.
0
 
LVL 15

Author Closing Comment

by:Ess Kay
ID: 39665813
johnnidip - easiest, but i dont know if it will work if there are multiple users.
james - did not provide details, but ive done something similar which worked.

I save to an xml file onClose, then load it for setting every onLoad of main form.
in the onLoad of my MAIN MDI file, i call this function




  'Whats New
    Public Sub whatsNew()
        Dim assembly__1 As Assembly = Assembly.GetExecutingAssembly()
        Dim fvi As FileVersionInfo = FileVersionInfo.GetVersionInfo(assembly__1.Location)
        Dim version As String = fvi.FileVersion
        If Me.m_Version = version Then
            'No news
        Else
            Me.m_Version = version
            'open whats new
            Dim F As New frmWhatsNew
            F.MdiParent = Me
            F.Show()
        End If
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
SSRS 2016 Rendering HTML tables 3 31
abstract class C# 1 31
VS 2015 is giving [No relevant source lines] 2 30
C# Service FileSystemwatcher isse 9 29
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question