MSDN > Home page del forum > Windows Presentation Foundation (WPF) > Is my old XBAP cached somewhere?
Formula una domandaFormula una domanda
 

Con rispostaIs my old XBAP cached somewhere?

  • domenica 12 novembre 2006 13.24Jonas Beckeman Medaglie utenteMedaglie utenteMedaglie utenteMedaglie utenteMedaglie utente
     

    Since running from VS doesn't work, I'm launching the XBAP directly from the bin folder manually. This works *the first time* I run the XBAP, but if I change something in the solution and recompile, I still see the old XPAB in the browser.

    I've tried Clean and Rebuild the solution, and I've emptied IE's cache, but it's still the original file that is run.

    What to do? TIA

Risposte

  • lunedì 13 novembre 2006 0.18LesterLobo - MSFTModeratoreMedaglie utenteMedaglie utenteMedaglie utenteMedaglie utenteMedaglie utente
     Con risposta
    use mage -cc from the sdk tools to clear the cache
  • lunedì 13 novembre 2006 6.46Ashish Shetty - MSFTModeratoreMedaglie utenteMedaglie utenteMedaglie utenteMedaglie utenteMedaglie utente
     Con risposta

    Jonas, can you clarify why running the XBAP from VS "does not work". I'm not aware of a known issue and this would be a pretty serious bug.

    Scott, when you debug an XBAP within VS, the deployment mechanism does not use ClickOnce. Consequently, the app is not inducted to the ClickOnce application store. This has various benefits, not the least of which is the fact that you do not have to increment the version number of the application in order to "update" the store.

    Mage -cc clears the application store of all online ClickOnce-deployed apps.

    In contrast, when an XBAP is launched by direct navigation (via the browser) or by shell activation (double clicking), the app is ClickOnce-deployed. It is therefore inducted to the application store, if the same version from the same location (I'm hand-waving over the details for which you can refer to the Deployment section of the SDK) isn't already present in the application store. If the latter is true, the copy of the app from the store is launched and no download/induction is required. As with other content on the web, when the application is updated on the server (i.e. the ApplicationVersion is incremented), the most recent bits will be downloaded/inducted and launched.

    I hope this clarifies things.

Tutte le risposte

  • lunedì 13 novembre 2006 0.18LesterLobo - MSFTModeratoreMedaglie utenteMedaglie utenteMedaglie utenteMedaglie utenteMedaglie utente
     Con risposta
    use mage -cc from the sdk tools to clear the cache
  • lunedì 13 novembre 2006 2.27Scott Cable Medaglie utenteMedaglie utenteMedaglie utenteMedaglie utenteMedaglie utente
     
    I had the same problem and ended up creating new projects for each change to prove to myself that I was on the right track. So thanks for the tip but could you also expand on it a little to let us know what is going on in the background re-caching of the xbap.

    Thanks
    Scott

  • lunedì 13 novembre 2006 6.46Ashish Shetty - MSFTModeratoreMedaglie utenteMedaglie utenteMedaglie utenteMedaglie utenteMedaglie utente
     Con risposta

    Jonas, can you clarify why running the XBAP from VS "does not work". I'm not aware of a known issue and this would be a pretty serious bug.

    Scott, when you debug an XBAP within VS, the deployment mechanism does not use ClickOnce. Consequently, the app is not inducted to the ClickOnce application store. This has various benefits, not the least of which is the fact that you do not have to increment the version number of the application in order to "update" the store.

    Mage -cc clears the application store of all online ClickOnce-deployed apps.

    In contrast, when an XBAP is launched by direct navigation (via the browser) or by shell activation (double clicking), the app is ClickOnce-deployed. It is therefore inducted to the application store, if the same version from the same location (I'm hand-waving over the details for which you can refer to the Deployment section of the SDK) isn't already present in the application store. If the latter is true, the copy of the app from the store is launched and no download/induction is required. As with other content on the web, when the application is updated on the server (i.e. the ApplicationVersion is incremented), the most recent bits will be downloaded/inducted and launched.

    I hope this clarifies things.

  • lunedì 13 novembre 2006 7.55Jonas Beckeman Medaglie utenteMedaglie utenteMedaglie utenteMedaglie utenteMedaglie utente
     

    OK, will read up on ClickOnce.

    Anyway, not a big problem now since I got VS to launch IE for running (see separate thread).

    (OT: this forum text editor is *not* very good. May I suggest teleriks radeditor, or just... anyone but this. And oh, "alert me" doesn't work. Thanks.)

  • lunedì 13 novembre 2006 14.03Esp_99 Medaglie utenteMedaglie utenteMedaglie utenteMedaglie utenteMedaglie utente
     

    I can't load xbaps inside VS too... Somethimes it works, sometimes not. Often I get message that my compiled xbap-file not found - but I navigate through folders and it is there. I launch it manually. Sometimes I get another errors. But I can tell that launching xbaps from VS succed 1 from 10 times but it is ok when I do it manually (no errors)

    I use VS 2005 Pro, Net 3.0 SDK (build 6000) and November CTP of "Orcas", IIS not installed, IE7, XP SP2 Home

  • lunedì 4 dicembre 2006 15.40Kallex Medaglie utenteMedaglie utenteMedaglie utenteMedaglie utenteMedaglie utente
     

    Hi Ashish!

    I just started developing XBAP on Vista Ultimate 64 RTM with proper VS 2005 .NET 3.0 expansions added in.

    Creating the normal "XAML Browser Application (WPF)" with its normal default options (so just go coding and hit F5 to debug) it indeed behaves as the application was cached in the store.

    No rebuilds whatsoever update the application, until the command mage.exe -cc is issued.

    On first run I get the "downloading" message, whereas on subsequent calls I don't get the message anymore (until I use mage.exe -cc).

     

    If I understood your post correctly, this is not the behaviour VS debugging should cause.

  • lunedì 4 dicembre 2006 19.02Andrew Whiddett Medaglie utenteMedaglie utenteMedaglie utenteMedaglie utenteMedaglie utente
     

    I had the same problem...

    Turned out the settings in the debug properties 'sometimes' loses the .xbap extension.

    (1) Right click on the project, select properties menu item.

    (2) Click on the debug tab.

    (3) Check that the start Options/Command line arguments looks something like:

    -debug "C:\Projects\<ThePathToTheDebugXBAP.xbap"

    The '.xbap' at the end sometimes gets lost.

     

    Regards

    Andrew Whiddett

  • lunedì 4 dicembre 2006 20.02Kallex Medaglie utenteMedaglie utenteMedaglie utenteMedaglie utenteMedaglie utente
     

    Hi Andrew!

    Checked the extensions; the .xbap is properly at the end, so in my case that wasn't causing it.

    Edit: Currently feasible workaround is have mage.exe -cc called at pre-build step, but obviously VS doesn't seem to work as supposed to.

    Br,

    Kalle

  • lunedì 4 dicembre 2006 20.30Bill_Henning Medaglie utenteMedaglie utenteMedaglie utenteMedaglie utenteMedaglie utente
     

    I ran into this same thing when first working with an XBAP project.  I haven't done much research into Clickonce but here's my short version of what I found on my own...

    It seems that if you publish to the same path/file, it does pull up cached versions.  This was driving me nuts for a while because I'd make a change and it wouldn't show it.  I later found that if I placed my XBAP in another folder it worked.

    Then I started using the VS Publish feature and that writes out a stub page the redirects to a different folder for each build.  Like MyApp_1_0_0_0 then next publish is MyApp_1_0_0_1, etc.  That accomplishes the same result as what I originally did above.  So now I use the Publish feature and all is good.  But the annoying thing is that you have to delete all the old build folders since they don't go away on their own.

    Basically the gist is, use the Publish wizard. :)