Forcing browsers to reload Silverlight xap after an update

Great! Worked even in Windows Phone development.

I've put the line:

NavigationService.Navigate(new Uri("/Game.xaml?versao="+version, UriKind.RelativeOrAbsolute));

And then Override the method OnNavigatedTo:

protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e)
{
    base.OnNavigatedTo(e);
    string var;
    if (NavigationContext.QueryString.TryGetValue("version", out var))
    {
        ...
    }
}

This has to do with how your browser handles resource requests. Flash has similar issues and there are a couple workarounds.

Here's an article that details the issue and possible solutions.

I would suggest doing something like this:

Say you have this for your xap in your html:

<param name="source" value="ClientBin/myApp.xap"/>

I would version it so whenever you do a push you change the version number. Example:

<param name="source" value="ClientBin/myApp.xap?ver=1"/>