Search code examples
c#windows-phone-8windows-phone-8.1

First C# real project (Exception from HRESULT: 0x80070002)


First time poster here! I have a curious problem: I am making a small windows phone app using the pivot template, but when I try to launch it with my own JSON file it returns me an error (HRESULT: 0x80070002).

I tried reseting everything (start a whole new project with only my different JSON file (DataModel/SampleData.json) and I still have this same bug, so the problem must come from here.

The file can be seen in http://justpaste.it/pgit , I sent it to a validator and it tells me it is valid (also I couldn't see any syntax difference between the original file and mine).

Since I have not modified anything in the code of the main pivot template (only the "SampleData".json file), this bug should be really easy to replicate.

Best regards


Solution

  • The first problem was that I didn't set the "Build Action" and "Copy to Output directory" in the file's properties... (I knew it would be something simple as that).

    After that the file still couldn't be opened so I changed the charset of the file to Unicode [It also works with UTF-8] (it was ANSI).

    Now the app lauches without problem but nothing appears on screen (but that's another problem).