silverlightsilverlight-oob

Silverlight 4 Out of Browser: "Unable to determine the URL to the Xap file from web"


For some reason, whenever I now try and run my SL4 application out-of-browser, when I run it I get the following message:

"Unable to determine the URL to the Xap file from web "

refers to an old name of my web project, and it has now been renamed. I've gone through all references of said project name and can't find any more; clearly it's getting it from somewhere though!

Googled but found nothing (aside from a link to an SO question which is now removed!).

Any help gratefully received...


Solution

  • The issue comes from a misconfiguration of the project's user file. VS can't find which XAP file it should use during the debugging experience.

    In the myproject.csproj.user file, change

    <OutOfBrowserProjectToDebug>OldName</OutOfBrowserProjectToDebug>
    

    to

    <OutOfBrowserProjectToDebug>NewName</OutOfBrowserProjectToDebug>