locked
After renaming page (e.g. groupedItems) the html file cannot be found anymore

    Question

  • I tried renaming a page in my app, for example the groupedItems page.

    > Exclude groupedItems.html, groupedItems.css, groupedItems.js from the project

    > Rename them on the file system (for example to groupedItemsX.html, etc.)

    > Include them in the project again

    After updating the references in the code I tried to start the app. This resulted in the following exception:

    The app couldn’t resolve ms-appx://6d47b841-9f83-45fb-b5e1-fce46f3a8d2b/pages/cover/groupeditems.html because of this error: RESOURCE_NOT_FOUND

    Hence, it looks like references to the old filename are cached somewhere. How can I make sure the new filenames will be used?



    • Edited by metrostyle Thursday, August 02, 2012 2:06 PM
    Wednesday, August 01, 2012 12:00 PM

Answers

  • I don't know exactly what the problem was, but I got it to work now :) Basically, I just recreated the entire folder structure and the exception doesn't appear anymore.

    Thanks for your help!

    Thursday, August 02, 2012 3:00 PM

All replies

  • Did you try a clean build?

    Jeff Sanders (MSFT)

    Thursday, August 02, 2012 1:35 PM
    Moderator
  • Yes, that didn't work.
    Thursday, August 02, 2012 2:05 PM
  • Normally you just right click on the file and choose rename.  Did you create a new folder in your project called cover?  Did you choose use existing and point to the file when adding it to the new folder?


    Jeff Sanders (MSFT)

    Thursday, August 02, 2012 2:25 PM
    Moderator
  • This time I tried renaming the files using the right click option (which apparently is only available when the project isn't running), but I get the same exception. It's still looking for the old filename.

    Yes, I added the files as you describe.

    Thursday, August 02, 2012 2:48 PM
  • PS, make sure the package action is set to 'Content' for each of these files after you add them (Properties).


    Jeff Sanders (MSFT)

    Thursday, August 02, 2012 2:48 PM
    Moderator
  • I don't know exactly what the problem was, but I got it to work now :) Basically, I just recreated the entire folder structure and the exception doesn't appear anymore.

    Thanks for your help!

    Thursday, August 02, 2012 3:00 PM
  • Thanks for this metrostyle - I was wondering why I couldn't rename a "NewFolder" in my project for ages - stopping the project made "rename" available. Was totally unclear why ....... maybe they should prompt " Please stop your project to rename your NewFolder ! "

    :)

    Thursday, December 13, 2012 2:17 PM